|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <head> |
|
4 <title>Test that mozpasspointerevents works</title> |
|
5 </head> |
|
6 <body onload="startTest()"> |
|
7 <iframe id="f" style="border:none; width:200px; height:200px; pointer-events:none" mozpasspointerevents |
|
8 src="data:text/html,<html style='pointer-events:none'><div style='margin:100px; width:100px; height:100px; background:yellow; pointer-events:auto'>"> |
|
9 </iframe> |
|
10 |
|
11 <script type="application/javascript"> |
|
12 var SimpleTest = window.opener.SimpleTest; |
|
13 var is = window.opener.is; |
|
14 |
|
15 function startTest() { |
|
16 var f = document.getElementById("f"); |
|
17 var fRect = f.getBoundingClientRect(); |
|
18 var e1 = document.elementFromPoint(fRect.left + 10, fRect.top + 10); |
|
19 is(e1, document.body, "check point in transparent region of the iframe"); |
|
20 var e2 = document.elementFromPoint(fRect.left + 110, fRect.top + 110); |
|
21 is(e2, f, "check point in opaque region of the iframe"); |
|
22 window.close(); |
|
23 SimpleTest.finish(); |
|
24 } |
|
25 </script> |
|
26 </body> |
|
27 </html> |