haikuwebkit/LayoutTests/pointer-lock/lock-lost-on-esc-in-fullscr...

58 lines
1.9 KiB
HTML
Raw Permalink Normal View History

Remove runtime toggle for pointer-lock https://bugs.webkit.org/show_bug.cgi?id=165577 <rdar://problems/29566996> Reviewed by Jon Lee. Source/WebCore: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. Covered by existing tests. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::pointerLockEnabled): Deleted. * dom/Document.idl: * dom/Element.idl: * page/Page.h: * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::requestPointerUnlock): (WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible): Source/WebKit/mac: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences pointerLockEnabled]): Deleted. (-[WebPreferences setPointerLockEnabled:]): Deleted. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPointerLockEnabled): Deleted. (WKPreferencesGetPointerLockEnabled): Deleted. * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Tools: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): Websites/webkit.org: No need to have pointer-lock tested. * experimental-features.html: Also sort the list alphabetically. LayoutTests: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * platform/mac/TestExpectations: Enable the pointer-lock tests that should work. * pointer-lock/pointer-lock-api.html: Fix a bad DOM call. * pointer-lock/pointerlock-interface-disabled-expected.txt: Removed. * pointer-lock/pointerlock-interface-disabled.html: Removed. Canonical link: https://commits.webkit.org/183176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-08 02:53:41 +00:00
<!DOCTYPE HTML>
<html>
<head>
<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>
<div id="target1"></div>
</div>
<script>
description("Test that pointerlockchange event is dispatched on esc in fullscreen.")
window.jsTestIsAsync = true;
shouldBeDefined("window.testRunner");
targetDiv1 = document.getElementById("target1");
todo = [
function () {
document.documentElement.webkitRequestFullScreen();
eventExpected("onwebkitfullscreenchange", "Entered fullscreen", 1, document);
// doNextStep called by event handler.
},
function () {
doNextStepWithUserGesture();
},
function () {
expectOnlyChangeEvent("Lock targetDiv1.");
targetDiv1.requestPointerLock();
// doNextStep called by event handler.
},
function () {
shouldBe("document.pointerLockElement", "targetDiv1");
doNextStepWithUserGesture();
},
function() {
document["onpointerlockchange"] = function () {
testPassed("onpointerlockchange" + " received after: " + "Sending Escape keyDown event.");
};
//expectOnlyChangeEvent("Lock targetDiv1.");
eventExpected("onwebkitfullscreenchange", "Sending Escape keyDown event.", 1, document);
debug("Sending Escape keyDown event.");
if (window.eventSender)
eventSender.keyDown("escape");
},
function() {
shouldBe("document.pointerLockElement", "null");
shouldBe("document.webkitIsFullScreen", "false");
doNextStep();
},
];
doNextStepWithUserGesture();
</script>
<script src="../http/tests/resources/js-test-post.js"></script>
</body>
</html>