cssom-view-window-screen-interface.html (1859B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test: cssom view window screen attribute</title> 5 <link rel="author" title="jingke" href="mailto:jingkewhu@gmail.com"> 6 <link rel="help" href="http://www.w3.org/TR/cssom-view/#the-screen-interface"> 7 <meta name="flags" content="dom"> 8 <meta name="assert" content="window screen interface"> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 </head> 12 <body> 13 <div id="myDiv"></div> 14 <div id="log"></div> 15 <script> 16 test(function(){assert_true(window.screen.width >= 0 && window.screen.width < 6000000);}, 17 "window.screen.width >= 0 && window.screen.width < 6000000"); 18 test(function(){assert_true(window.screen.height >= 0 && window.screen.height < 6000000);}, 19 "window.screen.height >= 0 && window.screen.height < 6000000"); 20 test(function(){assert_true(window.screen.availWidth >= 0 && window.screen.availWidth <= window.screen.width);}, 21 "window.screen.availWidth >= 0 && window.screen.availWidth <= window.screen.width"); 22 test(function(){assert_true(window.screen.availHeight >= 0 && window.screen.availHeight <= window.screen.height);}, 23 "window.screen.availHeight >= 0 && window.screen.availHeight <= window.screen.height"); 24 test(function(){assert_in_array(window.screen.colorDepth, [0, 16, 24, 30, 32]);}, 25 "window.screen.colorDepth == 0 || window.screen.colorDepth == 16 || window.screen.colorDepth == 24 || window.screen.colorDepth == 30 || window.screen.colorDepth == 32"); 26 test(function(){assert_equals(window.screen.pixelDepth, window.screen.colorDepth);}, 27 "window.screen.pixelDepth must return the value returned by window.screen.colorDepth"); 28 </script> 29 30 </body> 31 </html>