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

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

Issue 279313003: Create Document exitPointerLock and pointerLockElement API methods. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge Created 6 years, 7 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
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 <script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"> </script> 5 <script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"> </script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <div> 8 <div>
9 <iframe id="iframe1"></iframe> 9 <iframe id="iframe1"></iframe>
10 <div id="target2"></div> 10 <div id="target2"></div>
(...skipping 14 matching lines...) Expand all
25 function () { 25 function () {
26 // Nest target element into iframe document. 26 // Nest target element into iframe document.
27 targetIframe1.contentDocument.body.innerHTML ="<div><div></div></div >"; 27 targetIframe1.contentDocument.body.innerHTML ="<div><div></div></div >";
28 targetDiv1 = targetIframe1.contentDocument.body.firstChild.firstChil d 28 targetDiv1 = targetIframe1.contentDocument.body.firstChild.firstChil d
29 expectNoEvents("Lock target in iframe. (main document handler)"); 29 expectNoEvents("Lock target in iframe. (main document handler)");
30 expectOnlyChangeEvent("Lock target in iframe. (iframe handler)", tar getIframe1.contentDocument); 30 expectOnlyChangeEvent("Lock target in iframe. (iframe handler)", tar getIframe1.contentDocument);
31 targetDiv1.requestPointerLock(); 31 targetDiv1.requestPointerLock();
32 // doNextStep called by event handler. 32 // doNextStep called by event handler.
33 }, 33 },
34 function () { 34 function () {
35 shouldBe("targetIframe1.contentDocument.webkitPointerLockElement", " targetDiv1"); 35 shouldBe("targetIframe1.contentDocument.pointerLockElement", "target Div1");
36 shouldBe("targetDiv1.parentElement.parentElement", "targetIframe1.co ntentDocument.body"); 36 shouldBe("targetDiv1.parentElement.parentElement", "targetIframe1.co ntentDocument.body");
37 expectOnlyChangeEvent("Remove iframe & immediately lock target2. (ma in document handler)"); 37 expectOnlyChangeEvent("Remove iframe & immediately lock target2. (ma in document handler)");
38 expectNoEvents("Remove iframe & immediately lock target2. (iframe ha ndler)", targetIframe1.contentDocument); 38 expectNoEvents("Remove iframe & immediately lock target2. (iframe ha ndler)", targetIframe1.contentDocument);
39 targetIframe1.parentElement.removeChild(targetIframe1); 39 targetIframe1.parentElement.removeChild(targetIframe1);
40 targetDiv2.requestPointerLock(); 40 targetDiv2.requestPointerLock();
41 shouldBe("document.webkitPointerLockElement", "null"); 41 shouldBe("document.pointerLockElement", "null");
42 // doNextStep called by event handler. 42 // doNextStep called by event handler.
43 }, 43 },
44 ]; 44 ];
45 doNextStep(); 45 doNextStep();
46 </script> 46 </script>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698