| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="/js-test-resources/js-test.js"></script> | |
| 5 <script src="../resources/pointer-lock/pointer-lock-test-harness-prefixed.js"></
script> | |
| 6 </head> | |
| 7 <body> | |
| 8 <div> | |
| 9 <div id="target1"></div> | |
| 10 <iframe src="../resources/pointer-lock/inner-iframe-prefixed.html" sandbox="al
low-pointer-lock allow-scripts" onload="doNextStepWithUserGesture()"></iframe> | |
| 11 </div> | |
| 12 <script> | |
| 13 description("Test sandboxed iframe with allow-pointer-lock allows pointer lo
ck."); | |
| 14 window.jsTestIsAsync = true; | |
| 15 | |
| 16 targetDiv1 = document.getElementById("target1"); | |
| 17 iframe = document.getElementsByTagName("iframe")[0]; | |
| 18 | |
| 19 todo = [ | |
| 20 function () { | |
| 21 iframe.contentWindow.postMessage(["eval", 'document.body.webkitRequest
PointerLock()'], "*"); | |
| 22 window.onmessage = function (messageEvent) { | |
| 23 message = messageEvent.data; | |
| 24 shouldBeEqualToString("message", "inner-iframe-prefixed.html onweb
kitpointerlockchange, document.webkitPointerLockElement = [object HTMLBodyElemen
t]"); | |
| 25 window.onmessage = null; | |
| 26 doNextStep(); | |
| 27 } | |
| 28 }, | |
| 29 ]; | |
| 30 // doNextStep() called by iframe onload handler. | |
| 31 </script> | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |