no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / layout / base / tests / test_preserve3d_sorting_hit_testing.html
blob2b975a0ef66bf056f7c1cf40856adf2645aab57a
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">
17 /** Test for Bug 684759 **/
19 SimpleTest.waitForExplicitFinish();
21 function run() {
23 var iframe = document.getElementById("iframe");
25 var doc = iframe.contentDocument;
27 var big= doc.getElementById("big");
28 var small = doc.getElementById("small");
30 function check(x, y, expected_element, description)
32 is(doc.elementFromPoint(x, y).id, expected_element.id,
33 "point (" + x + ", " + y + "): " + description);
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");
42 SimpleTest.finish();
45 </script>
46 </pre>
47 </body>
48 </html>