4 https://bugzilla.mozilla.org/show_bug.cgi?id=684759
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"/>
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>
15 <script type=
"application/javascript">
17 /** Test for Bug
684759 **/
19 SimpleTest.waitForExplicitFinish();
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");