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: LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-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/bug90391-move-then-window-open-crash-prefixed.html
diff --git a/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-prefixed.html b/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-prefixed.html
new file mode 100644
index 0000000000000000000000000000000000000000..a092e7d4a3c27b3922b1fdfd7d571c958d3bc992
--- /dev/null
+++ b/LayoutTests/pointer-lock/bug90391-move-then-window-open-crash-prefixed.html
@@ -0,0 +1,53 @@
+<!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("bug 90391: pointer lock mouse move events then window.open should not crash.")
+ window.jsTestIsAsync = true;
+
+ targetdiv1 = document.getElementById("target1");
+
+ todo = [
+ function () {
+ debug(" Locking targetdiv1.")
+ targetdiv1.webkitRequestPointerLock();
+ document.onwebkitpointerlockchange = function () {
+ document.onwebkitpointerlockchange = null;
+ testPassed("document.onwebkitpointerlockchange event received.");
+ doNextStep();
+ };
+ },
+ function () {
+ debug(" Sending mouse move events.")
+ var mouseMoveEvents = 0;
+ targetdiv1.onmousemove = function () {
+ if (++mouseMoveEvents == 2) {
+ targetdiv1.onmousemove = null;
+ doNextStep();
+ }
+ }
+ if (window.eventSender) {
+ eventSender.mouseMoveTo(100, 100);
+ eventSender.mouseMoveTo(200, 200);
+ }
+ },
+ function () {
+ debug(" Calling window.open.")
+ gc();
+ window.open();
+ testPassed("Didn't crash");
+ document.webkitExitPointerLock();
+ doNextStep();
+ },
+ ];
+ doNextStepWithUserGesture();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698