Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom-prefixed.html

Issue 437443005: Revert of Revert of Remove prefixed Pointer Lock API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness-pref ixed.js"></script>
6 </head>
7 <body>
8 <div>
9 <iframe id="iframe1"></iframe>
10 <div id="target2"></div>
11 </div>
12 <script>
13 description("Test removing an iframe containing a locked element causes lock to be released.")
14 window.jsTestIsAsync = true;
15
16 targetIframe1 = document.getElementById("iframe1");
17 targetDiv2 = document.getElementById("target2");
18
19 todo = [
20 function () {
21 // Load a blank iframe.
22 targetIframe1.src = "about:blank";
23 targetIframe1.onload = function () { doNextStepWithUserGesture(); }
24 },
25 function () {
26 // Nest target element into iframe document.
27 targetIframe1.contentDocument.body.innerHTML ="<div><div></div></div >";
28 targetDiv1 = targetIframe1.contentDocument.body.firstChild.firstChil d
29 expectNoEvents("Lock target in iframe. (main document handler)");
30 expectOnlyChangeEvent("Lock target in iframe. (iframe handler)", tar getIframe1.contentDocument);
31 targetDiv1.webkitRequestPointerLock();
32 // doNextStep called by event handler.
33 },
34 function () {
35 shouldBe("targetIframe1.contentDocument.webkitPointerLockElement", " targetDiv1");
36 shouldBe("targetDiv1.parentElement.parentElement", "targetIframe1.co ntentDocument.body");
37 expectOnlyChangeEvent("Remove iframe & immediately lock target2. (ma in document handler)");
38 expectNoEvents("Remove iframe & immediately lock target2. (iframe ha ndler)", targetIframe1.contentDocument);
39 targetIframe1.parentElement.removeChild(targetIframe1);
40 targetDiv2.webkitRequestPointerLock();
41 shouldBe("document.webkitPointerLockElement", "null");
42 // doNextStep called by event handler.
43 },
44 ];
45 doNextStep();
46 </script>
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698