| <script src="../resources/js-test-pre.js"></script> |
| <script src="../resources/pointer-lock/pointer-lock-test-harness.js"></script> |
| <iframe src="../resources/pointer-lock/inner-iframe.html" sandbox="allow-scripts" onload="doNextStepWithUserGesture()"></iframe> |
| description("Test sandboxed iframe blocks pointer lock.") |
| window.jsTestIsAsync = true; |
| targetDiv1 = document.getElementById("target1"); |
| iframe = document.getElementsByTagName("iframe")[0]; |
| iframe.contentWindow.postMessage(["eval", 'document.body.webkitRequestPointerLock()'], "*"); |
| window.onmessage = function (messageEvent) { |
| message = messageEvent.data; |
| shouldBeEqualToString("message", "inner-iframe.html onwebkitpointerlockerror"); |
| // doNextStep() called by iframe onload handler. |
| <script src="../resources/js-test-post.js"></script> |