<html>
<head>
  <link id="rel-icon" rel="icon" sizes="23x47 19x42" type="image/x-icon" href="http://test.com/oldfavicon.ico"/>
  <link id="no-sizes" rel="icon" type="image/x-icon" href="http://test.com/oldfavicon.ico"/>
  <link id="empty-sizes" rel="icon" sizes="" type="image/x-icon" href="http://test.com/oldfavicon.ico"/>

  <script src="../../resources/js-test-pre.js"></script>
</head>
<body>
  
  <script>
      description('Tests for sizes attribute of the link element.');

      var icon=document.getElementById("rel-icon");

      shouldEvaluateTo('icon.sizes.length',2);
      shouldBeEqualToString('icon.sizes.value',"23x47 19x42");
      
      icon.sizes="10x10 20x20 30x30";
      shouldEvaluateTo('icon.sizes.length',3);
      shouldBeEqualToString('icon.sizes.value',"10x10 20x20 30x30");

      var icon=document.getElementById("no-sizes");
      shouldEvaluateTo('icon.sizes.length',0);
      shouldBeEqualToString('icon.sizes.value',"");

      var icon=document.getElementById("empty-sizes");
      shouldEvaluateTo('icon.sizes.length',0);
      shouldBeEqualToString('icon.sizes.value',"");
</script>  
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
