tor-browser

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

test_preserve3d_sorting_hit_testing.html (1356B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=684759
      5 -->
      6 <head>
      7  <title>Test for Bug 684759</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body onload="run()">
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=684759">Mozilla Bug 684759</a>
     13 <iframe src="preserve3d_sorting_hit_testing_iframe.html" id="iframe" height="1000" width="1000" style="border:none"></iframe>
     14 <pre id="test">
     15 <script type="application/javascript">
     16 
     17 /** Test for Bug 684759 */
     18 
     19 SimpleTest.waitForExplicitFinish();
     20 
     21 function run() {
     22  
     23  var iframe = document.getElementById("iframe");
     24  
     25  var doc = iframe.contentDocument;
     26 
     27  var big= doc.getElementById("big");
     28  var small = doc.getElementById("small");
     29 
     30  function check(x, y, expected_element, description)
     31  {
     32 is(doc.elementFromPoint(x, y).id, expected_element.id,
     33    "point (" + x + ", " + y + "): " + description);
     34  }
     35 
     36  check(650, 250, small, "Small object should be infront of big");
     37  check(650, 308, big, "Check bounds of small object");
     38  check(650, 207, big, "Check bounds of small object");
     39  check(607, 250, big, "Check bounds of small object");
     40  check(708, 250, big, "Check bounds of small object");
     41 
     42  SimpleTest.finish();
     43 }
     44 
     45 </script>
     46 </pre>
     47 </body>
     48 </html>