tor-browser

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

test_bug1089417.html (1329B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1089417
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 1089417</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="application/javascript">
     12 
     13  /** Test for Bug 1089417 */
     14 
     15  SimpleTest.waitForExplicitFinish();
     16 
     17  function run() {
     18    var f = document.getElementById("f");
     19    var fwin = f.contentWindow;
     20    var fdoc = f.contentDocument;
     21 
     22    f.height = "400";
     23    fdoc.getElementById("s").disabled = false;
     24    is(fwin.getComputedStyle(fdoc.documentElement).backgroundColor,
     25       "rgb(0, 128, 0)",
     26       "media query change should have restyled");
     27 
     28    f.height = "200";
     29    fdoc.getElementById("s").disabled = true;
     30    fdoc.getElementById("s").disabled = false;
     31    is(fwin.getComputedStyle(fdoc.documentElement).backgroundColor,
     32       "rgb(255, 0, 0)",
     33       "media query change should have restyled");
     34    SimpleTest.finish();
     35  }
     36 
     37  </script>
     38 </head>
     39 <body onload="run()">
     40 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1089417">Mozilla Bug 1089417</a>
     41 <div id="display">
     42  <iframe id="f" src="file_bug1089417_iframe.html" width="300" height="200"></iframe>
     43 </div>
     44 <pre id="test">
     45 </pre>
     46 </body>
     47 </html>