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

Side by Side Diff: LayoutTests/pointer-lock/pointerlock-then-fullscreen.html

Issue 535313002: Indicate user gesture for mouse down/up while pointer locked. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/pointer-lock/pointerlock-then-fullscreen-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <div id="target1"></div> 9 <div id="target1"></div>
10 </div> 10 </div>
11 <script> 11 <script>
12 description("Test that pointerlockchange event is dispatched when lock is lo st.") 12 description("Test pointerlock then fullscreen.")
13 window.jsTestIsAsync = true; 13 window.jsTestIsAsync = true;
14 shouldBeDefined("window.testRunner"); 14 shouldBeDefined("window.testRunner");
15 15
16 targetDiv1 = document.getElementById("target1"); 16 targetDiv1 = document.getElementById("target1");
17 17
18 todo = [ 18 todo = [
19 function () { 19 function () {
20 expectOnlyChangeEvent("Lock targetDiv1."); 20 expectOnlyChangeEvent("Lock targetDiv1.");
21 targetDiv1.requestPointerLock(); 21 targetDiv1.requestPointerLock();
22 // doNextStep called by event handler. 22 // doNextStep called by event handler.
23 }, 23 },
24 function () { 24 function () {
25 shouldBe("document.pointerLockElement", "targetDiv1"); 25 shouldBe("document.pointerLockElement", "targetDiv1");
26 expectOnlyChangeEvent("Host initiated unlock."); 26 document.body.onmousedown = function () {
27 testRunner.didLosePointerLock(); 27 targetDiv1.webkitRequestFullscreen();
28 // doNextStep called by event handler. 28 }
29 document.onwebkitfullscreenchange = function () {
30 doNextStep();
31 }
32 eventSender.mouseDown();
29 }, 33 },
30 function () { 34 function () {
31 shouldBe("document.pointerLockElement", "null"); 35 shouldBe("document.pointerLockElement", "targetDiv1");
36 shouldBe("document.webkitFullscreenElement", "targetDiv1");
32 doNextStep(); 37 doNextStep();
33 }, 38 },
34 ]; 39 ];
35 doNextStepWithUserGesture(); 40 doNextStepWithUserGesture();
36 </script> 41 </script>
37 </body> 42 </body>
38 </html> 43 </html>
39 44
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/pointer-lock/pointerlock-then-fullscreen-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698