tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

window-screen-height-immutable.html (944B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <title>CSSOM View - 4.2 - screen.height immutability</title>
      5    <link rel="author" title="Neils Christoffersen" href="mailto:neils.christoffersen@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="screen.height is immutable">
      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        var originalVal = window.screen.height;
     17 
     18        // try to set window.screen.height
     19        window.screen.height = 0;
     20 
     21        // verify window.screen.height didn't change
     22        test(function() {
     23            assert_equals(window.screen.height, originalVal, "window.screen.height should be immutable")
     24        }, "immutability test");
     25    </script>
     26 </body>
     27 </html>