| Index: chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html
|
| ===================================================================
|
| --- chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html (revision 132411)
|
| +++ chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html (working copy)
|
| @@ -15,11 +15,24 @@
|
| document.webkitCancelFullScreen();
|
| }
|
|
|
| -function lockMouse1() {
|
| +//Wait for notification from JS, then notify test of success or failure
|
| +//callback that the click has registered and the mouse lock state has changed.
|
| +function lockMouse1(callback) {
|
| console.log("lockMouse1()");
|
| navigator.webkitPointer.lock(document.getElementById("lockTarget1"),
|
| - function(){console.log("lock success")},
|
| - function(){console.log("lock failed")});
|
| + function() {
|
| + console.log("lock success")
|
| + if (callback) {
|
| + callback("success");
|
| + }
|
| + },
|
| + function() {
|
| + console.log("lock failed")
|
| + if (callback) {
|
| + callback("failure");
|
| + }
|
| + }
|
| + );
|
| }
|
|
|
| function lockMouse2() {
|
| @@ -58,6 +71,7 @@
|
| lockMouse1();
|
| enterFullscreen();
|
| }
|
| +
|
| </script>
|
| </head>
|
| <body title="This tooltip should not be shown if the mouse is locked.">
|
| @@ -71,6 +85,7 @@
|
| <button id="unlockMouse" onclick="unlockMouse();">unlockMouse()</button><br>
|
| <button id="enterFullscreenAndLockMouse1" onclick="enterFullscreenAndLockMouse1()">enterFullscreenAndLockMouse1()</button><br>
|
| <button id="lockMouse1AndEnterFullscreen" onclick="lockMouse1AndEnterFullscreen()">lockMouse1AndEnterFullscreen()</button><br>
|
| + <button id="cancelFullscreen" onclick="cancelFullscreen()">cancelFullscreen()</button><br>
|
| <div id="lockTarget1">lockTarget1</div>
|
| <div id="lockTarget2">lockTarget2</div>
|
| </div>
|
|
|