4 <script src=
"/js-test-resources/js-test.js"></script>
5 <script src=
"../resources/pointer-lock/pointer-lock-test-harness.js"></script>
9 <div id=
"target1"></div>
10 <iframe src=
"../resources/pointer-lock/iframe-allows-inner-iframe.html" sandbox=
"allow-pointer-lock allow-scripts" onload=
"doNextStepWithUserGesture()"></iframe>
13 description("Test nested sandboxed iframes with allow-pointer-lock allow pointer lock.");
14 window
.jsTestIsAsync
= true;
16 targetDiv1
= document
.getElementById("target1");
17 iframe
= document
.getElementsByTagName("iframe")[0];
21 iframe
.contentWindow
.postMessage(["pass message down", "eval", 'document.body.requestPointerLock()'], "*");
22 window
.onmessage = function (messageEvent
) {
23 message
= messageEvent
.data
;
24 shouldBeEqualToString("message", "inner-iframe.html onpointerlockchange, document.pointerLockElement = [object HTMLBodyElement]");
25 window
.onmessage
= null;
30 // doNextStep() called by iframe onload handler.