OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>Vibrate in cross-origin iframe with user gesture is allowed.</tit
le> | |
5 <script src="/resources/testharness.js"></script> | |
6 <script src="/resources/testharnessreport.js"></script> | |
7 <script> | |
8 if (window.testRunner) { | |
9 testRunner.dumpAsText(); | |
10 testRunner.dumpChildFramesAsText(); | |
11 } | |
12 function loaded() | |
13 { | |
14 document.getElementsByTagName('h4')[0].innerHTML = document.domain; | |
15 var iframe = document.getElementById("i"); | |
16 // The iframe uses eventSender to emulate a user navigatation, which
requires absolute coordinates. | |
17 // Because the iframe is cross-origin, it can't get the offsets itse
lf, so leak them. | |
18 frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, "
*"); | |
19 } | |
20 </script> | |
21 </head> | |
22 <body onload="loaded();"> | |
23 <p>This tests that a cross-origin iframe with user gesture can vibrate.</p> | |
24 <h4>DOMAIN</h4> | |
25 <iframe id="i" src="http://localhost:8000/security/resources/cross-origin-if
rame-for-vibrate-with-user-gesture-allowed.html"></iframe> | |
26 </body> | |
27 </html> | |
OLD | NEW |