test_bug492925.html (1023B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=492925 5 --> 6 <head> 7 <title>Test for Bug 492925</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 10 <style> 11 @media tv, print { 12 #div2 { 13 overflow: hidden; 14 } 15 } 16 </style> 17 </head> 18 <body> 19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=492925">Mozilla Bug 492925</a> 20 <p id="display"></p> 21 <div id="content" style="display: none"> 22 23 </div> 24 <pre id="test"> 25 <script type="application/javascript"> 26 27 /** Test for Bug 492925 */ 28 29 var sheet = document.styleSheets[1]; 30 var rule = sheet.cssRules[0]; 31 var media = rule.media; 32 33 is(media.mediaText, "tv, print", "Unexpected media string"); 34 is(media[0], "tv", "[0] should be 'tv'"); 35 is(media[1], "print", "[1] should be 'print'"); 36 is(media.item(0), "tv", ".item(0) should be 'tv'"); 37 is(media.item(1), "print", ".item(1) should be 'print'"); 38 39 40 41 42 </script> 43 </pre> 44 </body> 45 </html>