tor-browser

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

1161752.html (2752B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <title>Testcase for bug 1161752</title>
      5 <style>
      6  object.overlapping-green
      7    {
      8      height: 56px;
      9      width: 500px;
     10      vertical-align: top;
     11    }
     12 
     13  div.red-overlapped-reference
     14    {
     15      background-color: red;
     16      bottom: 56px;
     17      height: 50px;
     18      left: 300px;
     19      position: relative;
     20      width: 100px;
     21      z-index: -1;
     22    }
     23 </style>
     24 <script>
     25 function runTest1() {
     26  var root = document.querySelector('#test1').contentDocument.documentElement;
     27  root.style.direction='rtl';
     28  root.offsetHeight;
     29 }
     30 function runTest2() {
     31  var root = document.querySelector('#test2').contentDocument.documentElement;
     32  root.style.display='none';
     33  root.offsetHeight;
     34  root.style.display='block';
     35  root.offsetHeight;
     36 }
     37 function runTest3() {
     38  var doc = document.querySelector('#test3').contentDocument;
     39  var root = doc.documentElement;
     40  doc.removeChild(root);
     41  var newRoot = root.cloneNode(true);
     42  newRoot.setAttribute('dir','rtl');
     43  doc.appendChild(newRoot);
     44 }
     45 function runTest4() {
     46  var root = document.querySelector('#test4').contentDocument.documentElement;
     47  root.style.direction='rtl';
     48  root.offsetHeight;
     49 }
     50 </script>
     51 </head>
     52 <body>
     53 
     54  <p>Test passes if there are three filled green rectangles and <strong>no red</strong>.</p>
     55 
     56 
     57  <div><object id="test1" data="1161752-1-embed.html" type="text/html" class="overlapping-green" onload="runTest1()">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
     58  <div class="red-overlapped-reference"></div>
     59 
     60  <div><object id="test2" data="1161752-2-embed.html" type="text/html" class="overlapping-green" onload="runTest2()">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
     61  <div class="red-overlapped-reference"></div>
     62 
     63  <div><object id="test3" data="1161752-3-embed.html" type="text/html" class="overlapping-green" onload="runTest3()">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
     64  <div class="red-overlapped-reference"></div>
     65 
     66  <div><object id="test4" data="1161752-4-embed.html" type="text/html" class="overlapping-green" onload="runTest4()">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
     67  <div class="red-overlapped-reference"></div>
     68 
     69  <div><object id="test5" data="1161752-5-embed.html" type="text/html" class="overlapping-green">This test requires a browser with capability to embed an HTML document thanks to the HTML &lt;object&gt; element.</object></div>
     70  <div class="red-overlapped-reference"></div>
     71 
     72 </body>
     73 </html>