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

Unified Diff: chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html

Issue 10082033: Add tests for fullscreen mode and mouse lock mode. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | chrome/test/functional/fullscreen_mouselock.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
dennis_jeffrey 2012/04/23 19:42:38 add a space right after the // in each of the abov
dyu1 2012/04/23 22:31:22 Done.
+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")
dennis_jeffrey 2012/04/23 19:42:38 semicolon
dyu1 2012/04/23 22:31:22 Done.
+ if (callback) {
+ callback("success");
+ }
+ },
+ function() {
+ console.log("lock failed")
dennis_jeffrey 2012/04/23 19:42:38 semicolon
dyu1 2012/04/23 22:31:22 Done.
+ 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>
scheib 2012/04/23 20:08:20 This seems redundant with exitFullscreen().
dyu1 2012/04/23 22:31:22 Done.
<div id="lockTarget1">lockTarget1</div>
<div id="lockTarget2">lockTarget2</div>
</div>
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | chrome/test/functional/fullscreen_mouselock.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698