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

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

Issue 438693003: Use the unprefixed Pointer Lock API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « chrome/test/data/extensions/platform_apps/web_view/pointerlock/inject_pointer_lock.js ('k') | no next file » | 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
diff --git a/chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html b/chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html
index f979a9c9a99d5e7b9ba83bc7cf0caca78306fc0a..8b3571d8ae50d9e910cf37a1eb2f4e7c28f6a85f 100644
--- a/chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html
+++ b/chrome/test/data/fullscreen_mouselock/fullscreen_mouselock.html
@@ -38,7 +38,7 @@ function lockMouse1(callback) {
}
};
function possibleSuccess() {
- if (document.webkitPointerLockElement == target) {
+ if (document.pointerLockElement == target) {
console.log("lock success");
if (callback)
callback("success");
@@ -46,9 +46,9 @@ function lockMouse1(callback) {
failure();
}
};
- document.onwebkitpointerlockchange = possibleSuccess;
- document.onwebkitpointerlockerror = failure;
- target.webkitRequestPointerLock();
+ document.onpointerlockchange = possibleSuccess;
+ document.onpointerlockerror = failure;
+ target.requestPointerLock();
}
// In the PyAuto test the fullscreen is initiated, accepted and enters into a
@@ -65,16 +65,16 @@ function lockMouseAndSetLockResult(targetId) {
lock_result = "failure"
};
function possibleSuccess() {
- if (document.webkitPointerLockElement == target) {
+ if (document.pointerLockElement == target) {
console.log("lock success");
lock_result = "success"
} else {
failure();
}
};
- document.onwebkitpointerlockchange = possibleSuccess;
- document.onwebkitpointerlockerror = failure;
- target.webkitRequestPointerLock();
+ document.onpointerlockchange = possibleSuccess;
+ document.onpointerlockerror = failure;
+ target.requestPointerLock();
}
function lockMouse1AndSetLockResult() {
@@ -104,7 +104,7 @@ function spamLockMouse2() {
function unlockMouse() {
console.log("unlockMouse()");
- document.webkitExitPointerLock();
+ document.exitPointerLock();
}
function enterFullscreenAndLockMouse1() {
« no previous file with comments | « chrome/test/data/extensions/platform_apps/web_view/pointerlock/inject_pointer_lock.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698