tor-browser

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

test_frame_reconstruction_body_writing_mode.html (1127B)


      1 <!DOCTYPE html>
      2 <html>
      3  <meta charset="utf-8">
      4  <title>
      5    Test for Bug 1593752: Test we don't reframe the html element when
      6    inserting a canonical body element with the same writing-mode.
      7  </title>
      8  <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
      9  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     12 
     13  <script>
     14  SimpleTest.waitForExplicitFinish();
     15 
     16  const utils = SpecialPowers.getDOMWindowUtils(window);
     17 
     18  function runTest() {
     19    document.documentElement.offsetTop;
     20 
     21    // We expect to construct only the canonical body because its writing-mode
     22    // is the same as html's writing-mode.
     23    const expectedFrameConstructCount = utils.framesConstructed + 1;
     24    document.body.before(document.createElement("body"));
     25    document.documentElement.offsetTop;
     26 
     27    is(utils.framesConstructed, expectedFrameConstructCount,
     28       "We should not reframe <html>!");
     29 
     30    SimpleTest.finish();
     31  }
     32  </script>
     33  <body onload="runTest();"></body>
     34 </html>