test_bug646757.html (1292B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=646757 5 --> 6 <head> 7 <title>Test for Bug 646757</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 style="margin:0" id="body"> 12 <div style="height:20.3px; width:400px; background:pink" id="d1"></div> 13 <div style="height:20px; width:400px; background:yellow" id="d2"></div> 14 <div style="height:9.7px; width:400px;" id="space1"></div> 15 <div style="height:20.7px; width:400px; background:pink" id="d3"></div> 16 <div style="height:20px; width:400px; background:yellow" id="d4"></div> 17 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=646757">Mozilla Bug 646757</a> 18 <p id="display"></p> 19 <div id="content" style="display: none"> 20 21 </div> 22 <pre id="test"> 23 <script class="testbody" type="text/javascript"> 24 function testPoint(x, y, id) { 25 is(document.elementFromPoint(x, y).id, id, 26 "checking element at " + x + "," + y); 27 } 28 29 /** Test for Bug 646757 */ 30 testPoint(200, 20, "d1"); 31 testPoint(200, 20.2, "d1"); 32 testPoint(200, 20.4, "d2"); 33 testPoint(200, 21, "d2"); 34 35 testPoint(200, 70, "d3"); 36 testPoint(200, 70.6, "d3"); 37 testPoint(200, 70.8, "d4"); 38 testPoint(200, 71, "d4"); 39 </script> 40 </pre> 41 </body> 42 </html>