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

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') | no next file with comments »
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.
+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.">
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698