Commit aed8d1bd authored by scheib@chromium.org's avatar scheib@chromium.org

Move pointer lock test resources to http/tests/resources in preparation for...

Move pointer lock test resources to http/tests/resources in preparation for adding new tests to http.
https://bugs.webkit.org/show_bug.cgi?id=91882

Reviewed by Adrienne Walker.

* http/tests/resources/pointer-lock/pointer-lock-test-harness.js: Renamed from LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js.
* pointer-lock/bug90391-move-then-window-open-crash.html:
* pointer-lock/lock-already-locked.html:
* pointer-lock/lock-element-not-in-dom.html:
* pointer-lock/lock-fail-responses.html:
* pointer-lock/locked-element-iframe-removed-from-dom.html:
* pointer-lock/locked-element-removed-from-dom.html:
* pointer-lock/mouse-event-api.html:
* pointer-lock/mouse-event-delivery.html:
* pointer-lock/pointer-lock-api.html:
* pointer-lock/pointerlockchange-pointerlockerror-events.html:
* pointer-lock/pointerlocklost-event.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b87e5cc8
2012-07-20 Vincent Scheib <scheib@chromium.org>
Move pointer lock test resources to http/tests/resources in preparation for adding new tests to http.
https://bugs.webkit.org/show_bug.cgi?id=91882
Reviewed by Adrienne Walker.
* http/tests/resources/pointer-lock/pointer-lock-test-harness.js: Renamed from LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js.
* pointer-lock/bug90391-move-then-window-open-crash.html:
* pointer-lock/lock-already-locked.html:
* pointer-lock/lock-element-not-in-dom.html:
* pointer-lock/lock-fail-responses.html:
* pointer-lock/locked-element-iframe-removed-from-dom.html:
* pointer-lock/locked-element-removed-from-dom.html:
* pointer-lock/mouse-event-api.html:
* pointer-lock/mouse-event-delivery.html:
* pointer-lock/pointer-lock-api.html:
* pointer-lock/pointerlockchange-pointerlockerror-events.html:
* pointer-lock/pointerlocklost-event.html:
2012-07-20 Zan Dobersek <zandobersek@gmail.com>
Unreviewed GTK gardening, adding platform-specific baseline for
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<div>
......@@ -49,6 +49,6 @@
];
doNextStepWithUserGesture();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<div>
......@@ -102,6 +102,6 @@
];
doNextStepWithUserGesture();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<div>
......@@ -26,6 +26,6 @@
];
doNextStepWithUserGesture();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<script>
......@@ -38,6 +38,6 @@
];
doNextStepWithUserGesture();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<div>
......@@ -44,6 +44,6 @@
];
doNextStep();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<div>
......@@ -48,6 +48,6 @@
];
doNextStep();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
</head>
<body>
<script>
......@@ -9,6 +9,6 @@
shouldBeDefined("mouseEvent.webkitMovementX");
shouldBeDefined("mouseEvent.webkitMovementY");
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body id="body">
<div>
......@@ -98,6 +98,6 @@
];
doNextStepWithUserGesture();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<script>
......@@ -35,6 +35,6 @@
];
doNextStepWithUserGesture();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<div>
......@@ -92,6 +92,6 @@
];
doNextStep();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
<script src="resources/pointer-lock-test-harness.js"></script>
<script src="../http/tests/resources/js-test-pre.js"></script>
<script src="../http/tests/resources/pointer-lock/pointer-lock-test-harness.js"></script>
</head>
<body>
<div>
......@@ -100,7 +100,7 @@
];
doNextStepWithUserGesture();
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>
......@@ -5816,6 +5816,23 @@ void Document::addDocumentToFullScreenChangeEventQueue(Document* doc)
void Document::webkitExitPointerLock()
{
if (page())
page()->pointerLockController()->requestPointerLock(element, 0, 0);
else
element->document()->enqueueDocumentEvent(Event::create(eventNames().webkitpointerlockerrorEvent, true, false));
}
bool Document::webkitPointerLockEnabled() const
{
return isAttributeOnAllOwners(webkitallowpointerlockAttr, ownerElement());
}
void Document::webkitExitPointerLock()
{
Element* element;
if (!page() || !(element = page()->pointerLockController()->element()))
return;
if (securityOrigin()->canAccess(element->document()->securityOrigin()))
page()->pointerLockController()->requestPointerUnlock();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment