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

Unified Diff: LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-prefixed.html

Issue 424213007: Revert of Remove prefixed Pointer Lock API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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
Index: LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-prefixed.html
diff --git a/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-prefixed.html b/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-prefixed.html
new file mode 100644
index 0000000000000000000000000000000000000000..f9ecedccd6baf97528cf6b90b8913228ff7ac60d
--- /dev/null
+++ b/LayoutTests/pointer-lock/pointerlockchange-event-on-lock-lost-prefixed.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness-prefixed.js"></script>
+</head>
+<body>
+<div>
+ <div id="target1"></div>
+</div>
+<script>
+ description("Test that webkitpointerlockchange event is dispatched when lock is lost.")
+ window.jsTestIsAsync = true;
+ shouldBeDefined("window.testRunner");
+
+ targetDiv1 = document.getElementById("target1");
+
+ todo = [
+ function () {
+ expectOnlyChangeEvent("Lock targetDiv1.");
+ targetDiv1.webkitRequestPointerLock();
+ // doNextStep called by event handler.
+ },
+ function () {
+ shouldBe("document.webkitPointerLockElement", "targetDiv1");
+ expectOnlyChangeEvent("Host initiated unlock.");
+ testRunner.didLosePointerLock();
+ // doNextStep called by event handler.
+ },
+ function () {
+ shouldBe("document.webkitPointerLockElement", "null");
+ doNextStep();
+ },
+ ];
+ doNextStepWithUserGesture();
+</script>
+</body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698