test_bug968148.html (1345B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=968148 5 --> 6 <head> 7 <title>Test for Bug 968148</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 10 <script type="text/javascript"> 11 function testWithoutImplicitPointerCapture() { 12 var iframe = document.getElementById("testFrame"); 13 iframe.src = "bug968148_inner.html"; 14 } 15 16 function testWithImplicitPointerCapture() { 17 var iframe = document.getElementById("testFrame"); 18 iframe.src = "bug968148_inner2.html"; 19 } 20 21 function runTest() { 22 SimpleTest.waitForExplicitFinish(); 23 window.addEventListener("message", (event) => { 24 if (event.data == "finishTest") { 25 SimpleTest.finish(); 26 } else if (event.data == "run next") { 27 SpecialPowers.pushPrefEnv({ 28 "set": [ 29 ["dom.w3c_pointer_events.implicit_capture", true] 30 ] 31 }, testWithImplicitPointerCapture); 32 } 33 }); 34 35 SpecialPowers.pushPrefEnv({ 36 "set": [ 37 ["dom.w3c_pointer_events.implicit_capture", false] 38 ] 39 }, testWithoutImplicitPointerCapture); 40 } 41 </script> 42 </head> 43 <body onload="runTest();"> 44 <iframe id="testFrame" height="500" width="500"></iframe> 45 </body>