haikuwebkit/Tools/DumpRenderTree/TestOptions.h

75 lines
3.5 KiB
C
Raw Permalink Normal View History

Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script https://bugs.webkit.org/show_bug.cgi?id=164965 Patch by Sam Weinig <sam@webkit.org> on 2016-11-26 Reviewed by Simon Fraser. Source/JavaScriptCore: * runtime/CommonIdentifiers.h: Add identifiers needed for RuntimeEnabledFeatures. Source/WebCore: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::reset): * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled): (WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled): Add intersection observer setting. * page/IntersectionObserver.idl: * page/IntersectionObserverEntry.idl: Convert to use EnabledAtRuntime extended attribute. * page/Settings.in: Remove the old intersection observer setting. Source/WebKit/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences intersectionObserverEnabled]): (-[WebPreferences setIntersectionObserverEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Add a preference, defaulting to off, for enabling IntersectionObserver. Source/WebKit2: * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetIntersectionObserverEnabled): (WKPreferencesGetIntersectionObserverEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Add a preference, defaulting to off, for enabling IntersectionObserver. Tools: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add new files. * DumpRenderTree/TestOptions.h: Added. * DumpRenderTree/TestOptions.mm: Added. (parseBooleanTestHeaderValue): (TestOptions::TestOptions): Port TestOption parsing from WKTR to DRT. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): (resetWebViewToConsistentStateBeforeTesting): (runTest): * WebKitTestRunner/TestController.cpp: Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting preferences conditionally. (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver. LayoutTests: * intersection-observer/intersection-observer-entry-interface.html: * intersection-observer/intersection-observer-interface.html: * resources/testharnessreport.js: Switch from enabling IntersectionObserver via internals.settings to using comment header switches. Canonical link: https://commits.webkit.org/182691@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-27 04:21:49 +00:00
/*
Prevent navigating top level frames to Data URLs https://bugs.webkit.org/show_bug.cgi?id=206962 <rdar://problem/56770676> Source/WebCore: Reviewed by Youenn Fablet. Revise our loading behavior to match Chrome and Firefox by blocking top level frame navigations to Data URLs. Test: fast/loader/data-url-frame-allowed.html, fast/loader/data-url-load-denied.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::disallowDataRequest const): Added, (WebCore::DocumentLoader::continueAfterContentPolicy): Validate whether the load should continue if it is a Data URL. * loader/DocumentLoader.h: (WebCore::DocumentLoader::setAllowsDataURLForMainFrame): Added. (WebCore::DocumentLoader::allowsDataURLForMainFrame const): Added. * loader/FrameLoader.cpp: (WebCore::FrameLoader::load): If the main frame loader as triggered by user action, or direct call to the client API, allow top-frame navigation to Data URLs. (WebCore::FrameLoader::reload): If the original load allowed top-frame navigation to Data URLs, continue to do so in the reload. * loader/FrameLoader.h: Source/WebKit: Reviewed by Youenn Fablet. Expose a new off-by-default preference to allow top-level navigation to Data URIs. Tests: fast/loader/data-url-frame-allowed.html, fast/loader/data-url-load-denied.html * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetTopNavigationToDataURLsAllowed): (WKPreferencesGetTopNavigationToDataURLsAllowed): * UIProcess/API/C/WKPreferencesRefPrivate.h: * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _setTopNavigationToDataURLsAllowed:]): (-[WKPreferences _topNavigationToDataURLsAllowed]): * UIProcess/API/Cocoa/WKPreferencesPrivate.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _setupPageConfiguration:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _allowTopNavigationToDataURLs]): (-[WKWebViewConfiguration _setAllowTopNavigationToDataURLs:]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController configuration]): Source/WebKitLegacy/mac: Reviewed by Youenn Fablet. Expose a new off-by-default preference to allow top-level navigation to Data URIs. Tests: fast/loader/data-url-frame-allowed.html, fast/loader/data-url-load-denied.html * WebCoreSupport/WebInspectorClient.mm: (-[WebInspectorWindowController init]): * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences allowTopNavigationToDataURLs]): (-[WebPreferences setAllowTopNavigationToDataURLs:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: Reviewed by Youenn Fablet. Expose a new off-by-default preference to allow top-level navigation to Data URIs. * Interfaces/WebKit.idl: Touch file to trigger a build. * Interfaces/IWebPreferences.idl: Ditto. * Interfaces/IWebPreferencesPrivate.idl: Expose new API version to avoid breaking shipping binaries. * WebPreferenceKeysPrivate.h: * WebPreferences.cpp: (WebPreferences::initializeDefaultSettings): Update for new setting. (WebPreferences::QueryInterface): Add support for IWebPreferencesPrivate8 interface. (WebPreferences::allowTopNavigationToDataURLs): Added. (WebPreferences::setAllowTopNavigationToDataURLs): Added. * WebPreferences.h: * WebView.cpp: (WebView::notifyPreferencesChanged): Update to handle Data URL setting. Tools: Reviewed by Youenn Fablet. Revise test running code to allow data URL navigations by default, since they are so frequently used in testing. However, provide a flag to turn this off in tests so we can confirm proper function. * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (DownloadAttributeDoesNotStartDownloads): Revise configuration to allow script navigation of the main frame to a Data URL. (StartDownloadWithDownloadAttribute): Ditto. * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (WebViewWillPerformClientRedirect): Ditto. (WebViewDidCancelClientRedirect): Ditto. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (NavigateToDataURLThenBack): Ditto. (ContentExtensionBlocksMainLoadThenReloadWithoutExtensions): Ditto. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): (WTR::TestController::platformCreateWebView): LayoutTests: Reviewed by Youenn Fablet." Revise our loading behavior to match Chrome and Firefox by blocking top level frame navigations to Data URLs. * fast/loader/data-url-frame-allowed.html: Added. * fast/loader/data-url-frame-allowed-expected.txt : Added. * fast/loader/data-url-load-denied.html: Added. * fast/loader/data-url-load-denied-expected.txt: Added. Canonical link: https://commits.webkit.org/220327@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-06 17:32:18 +00:00
* Copyright (C) 2016-2020 Apple Inc. All rights reserved.
Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script https://bugs.webkit.org/show_bug.cgi?id=164965 Patch by Sam Weinig <sam@webkit.org> on 2016-11-26 Reviewed by Simon Fraser. Source/JavaScriptCore: * runtime/CommonIdentifiers.h: Add identifiers needed for RuntimeEnabledFeatures. Source/WebCore: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::reset): * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled): (WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled): Add intersection observer setting. * page/IntersectionObserver.idl: * page/IntersectionObserverEntry.idl: Convert to use EnabledAtRuntime extended attribute. * page/Settings.in: Remove the old intersection observer setting. Source/WebKit/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences intersectionObserverEnabled]): (-[WebPreferences setIntersectionObserverEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Add a preference, defaulting to off, for enabling IntersectionObserver. Source/WebKit2: * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetIntersectionObserverEnabled): (WKPreferencesGetIntersectionObserverEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Add a preference, defaulting to off, for enabling IntersectionObserver. Tools: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add new files. * DumpRenderTree/TestOptions.h: Added. * DumpRenderTree/TestOptions.mm: Added. (parseBooleanTestHeaderValue): (TestOptions::TestOptions): Port TestOption parsing from WKTR to DRT. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): (resetWebViewToConsistentStateBeforeTesting): (runTest): * WebKitTestRunner/TestController.cpp: Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting preferences conditionally. (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver. LayoutTests: * intersection-observer/intersection-observer-entry-interface.html: * intersection-observer/intersection-observer-interface.html: * resources/testharnessreport.js: Switch from enabling IntersectionObserver via internals.settings to using comment header switches. Canonical link: https://commits.webkit.org/182691@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-27 04:21:49 +00:00
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
Share TestFeatures and TestCommand infrastructure between DumpRenderTree and WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=217614 Reviewed by Dean Jackson. Move TestFeatures and TestCommand code from WebKitTestRunner to TestRunnerShared and adopt shared code in both WebKitTestRunner and DumpRenderTree. This allows us to remove duplicate argument and test header parsing code and avoid updating both when we want want change things. To support different sets of test header options, featureDefaultsFromTestHeaderForTest now has a parameter for a key type map, rather than the old hardcoded set. This allows WebKitTestRunner and DumpRenderTree, which currently have slightly different options to continue to behave in the same way. Eventually, it will probably make sense to have these mostly generated from the WebPreferences*.yaml configuration files. Matching precedent, shared files use the WTR namespace. * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * TestRunnerShared/CMakeLists.txt: * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Add new files. * DumpRenderTree/DumpRenderTree.h: Removes TestCommand and parseInputLine now that they come from shared TestCommand.h * DumpRenderTree/DumpRenderTreeCommon.cpp: Removed. Moved contents to shared TestCommand.cpp * DumpRenderTree/TestOptions.cpp: * DumpRenderTree/TestOptions.h: Adopt model from WebKitTestRunner and use initialization from TestFeatures. * DumpRenderTree/mac/DumpRenderTree.mm: Adopt shared TestFeatures and TestCommand infrastructure. Construct TestOptions in a similar manner to WebKitTestRunner by merging together hardcoded / path based features and test header based features. * DumpRenderTree/mac/UIDelegate.h: * DumpRenderTree/mac/UIDelegate.mm: Update for new namespace. * TestRunnerShared/TestCommand.cpp: Added. * TestRunnerShared/TestCommand.h: Added. * TestRunnerShared/TestFeatures.cpp: Added. * TestRunnerShared/TestFeatures.h: Added. * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestOptions.cpp: * WebKitTestRunner/TestOptions.h: Moved from WebKitTestRunner. Generalized to TestFeatures to take a key type map, rather than hard coding it. Replace use of WebKit types, like WKURLRef, with std::string and std::filesystem::path. Canonical link: https://commits.webkit.org/230379@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-12 21:54:50 +00:00
#include "TestFeatures.h"
#include <string>
Share TestFeatures and TestCommand infrastructure between DumpRenderTree and WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=217614 Reviewed by Dean Jackson. Move TestFeatures and TestCommand code from WebKitTestRunner to TestRunnerShared and adopt shared code in both WebKitTestRunner and DumpRenderTree. This allows us to remove duplicate argument and test header parsing code and avoid updating both when we want want change things. To support different sets of test header options, featureDefaultsFromTestHeaderForTest now has a parameter for a key type map, rather than the old hardcoded set. This allows WebKitTestRunner and DumpRenderTree, which currently have slightly different options to continue to behave in the same way. Eventually, it will probably make sense to have these mostly generated from the WebPreferences*.yaml configuration files. Matching precedent, shared files use the WTR namespace. * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * TestRunnerShared/CMakeLists.txt: * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Add new files. * DumpRenderTree/DumpRenderTree.h: Removes TestCommand and parseInputLine now that they come from shared TestCommand.h * DumpRenderTree/DumpRenderTreeCommon.cpp: Removed. Moved contents to shared TestCommand.cpp * DumpRenderTree/TestOptions.cpp: * DumpRenderTree/TestOptions.h: Adopt model from WebKitTestRunner and use initialization from TestFeatures. * DumpRenderTree/mac/DumpRenderTree.mm: Adopt shared TestFeatures and TestCommand infrastructure. Construct TestOptions in a similar manner to WebKitTestRunner by merging together hardcoded / path based features and test header based features. * DumpRenderTree/mac/UIDelegate.h: * DumpRenderTree/mac/UIDelegate.mm: Update for new namespace. * TestRunnerShared/TestCommand.cpp: Added. * TestRunnerShared/TestCommand.h: Added. * TestRunnerShared/TestFeatures.cpp: Added. * TestRunnerShared/TestFeatures.h: Added. * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestOptions.cpp: * WebKitTestRunner/TestOptions.h: Moved from WebKitTestRunner. Generalized to TestFeatures to take a key type map, rather than hard coding it. Replace use of WebKit types, like WKURLRef, with std::string and std::filesystem::path. Canonical link: https://commits.webkit.org/230379@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-12 21:54:50 +00:00
#include <unordered_map>
namespace WTR {
class TestOptions {
public:
static const TestFeatures& defaults();
static const std::unordered_map<std::string, TestHeaderKeyType>& keyTypeMapping();
explicit TestOptions(TestFeatures features)
: m_features(std::move(features))
{
}
bool webViewIsCompatibleWithOptions(const TestOptions&) const;
// Test-Runner-Specific Features
bool dumpJSConsoleLogInStdErr() const { return boolTestRunnerFeatureValue("dumpJSConsoleLogInStdErr", false); }
bool enableDragDestinationActionLoad() const { return boolTestRunnerFeatureValue("enableDragDestinationActionLoad", false); }
bool layerBackedWebView() const { return boolTestRunnerFeatureValue("layerBackedWebView", false); }
bool useEphemeralSession() const { return boolTestRunnerFeatureValue("useEphemeralSession", false); }
std::string additionalSupportedImageTypes() const { return stringTestRunnerFeatureValue("additionalSupportedImageTypes", { }); }
std::string jscOptions() const { return stringTestRunnerFeatureValue("jscOptions", { }); }
Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script https://bugs.webkit.org/show_bug.cgi?id=164965 Patch by Sam Weinig <sam@webkit.org> on 2016-11-26 Reviewed by Simon Fraser. Source/JavaScriptCore: * runtime/CommonIdentifiers.h: Add identifiers needed for RuntimeEnabledFeatures. Source/WebCore: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::reset): * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled): (WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled): Add intersection observer setting. * page/IntersectionObserver.idl: * page/IntersectionObserverEntry.idl: Convert to use EnabledAtRuntime extended attribute. * page/Settings.in: Remove the old intersection observer setting. Source/WebKit/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences intersectionObserverEnabled]): (-[WebPreferences setIntersectionObserverEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Add a preference, defaulting to off, for enabling IntersectionObserver. Source/WebKit2: * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetIntersectionObserverEnabled): (WKPreferencesGetIntersectionObserverEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Add a preference, defaulting to off, for enabling IntersectionObserver. Tools: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add new files. * DumpRenderTree/TestOptions.h: Added. * DumpRenderTree/TestOptions.mm: Added. (parseBooleanTestHeaderValue): (TestOptions::TestOptions): Port TestOption parsing from WKTR to DRT. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): (resetWebViewToConsistentStateBeforeTesting): (runTest): * WebKitTestRunner/TestController.cpp: Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting preferences conditionally. (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver. LayoutTests: * intersection-observer/intersection-observer-entry-interface.html: * intersection-observer/intersection-observer-interface.html: * resources/testharnessreport.js: Switch from enabling IntersectionObserver via internals.settings to using comment header switches. Canonical link: https://commits.webkit.org/182691@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-27 04:21:49 +00:00
const auto& boolWebPreferenceFeatures() const { return m_features.boolWebPreferenceFeatures; }
const auto& doubleWebPreferenceFeatures() const { return m_features.doubleWebPreferenceFeatures; }
const auto& uint32WebPreferenceFeatures() const { return m_features.uint32WebPreferenceFeatures; }
const auto& stringWebPreferenceFeatures() const { return m_features.stringWebPreferenceFeatures; }
Remove remaining alternative preference setting mechanisms from LayoutTests https://bugs.webkit.org/show_bug.cgi?id=218417 Reviewed by Simon Fraser. Source/WebKit: Remove now unused bundle SPI that was only used by the WebKitTestRuner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleOverrideBoolPreferenceForTestRunner): Deleted. (WKBundleSetAllowUniversalAccessFromFileURLs): Deleted. (WKBundleSetAllowFileAccessFromFileURLs): Deleted. (WKBundleSetAllowStorageAccessFromFileURLS): Deleted. (WKBundleSetMinimumLogicalFontSize): Deleted. (WKBundleSetFrameFlatteningEnabled): Deleted. (WKBundleSetJavaScriptCanAccessClipboard): Deleted. (WKBundleSetPopupBlockingEnabled): Deleted. (WKBundleSetAuthorAndUserStylesEnabled): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::addOriginAccessAllowListEntry): (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Deleted. (WebKit::InjectedBundle::setAllowUniversalAccessFromFileURLs): Deleted. (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs): Deleted. (WebKit::InjectedBundle::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (WebKit::InjectedBundle::setMinimumLogicalFontSize): Deleted. (WebKit::InjectedBundle::setFrameFlatteningEnabled): Deleted. (WebKit::InjectedBundle::setAsyncFrameScrollingEnabled): Deleted. (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard): Deleted. (WebKit::InjectedBundle::setPopupBlockingEnabled): Deleted. (WebKit::InjectedBundle::setAuthorAndUserStylesEnabled): Deleted. * WebProcess/InjectedBundle/InjectedBundle.h: Source/WebKitLegacy/win: * WebPreferenceKeysPrivate.h: Update key to match cocoa WebKitLegacy for shared use by DumpRenderTree. Tools: Remove various one off solutions for setting preferences in WebKitTestRunner and DumpRenderTree keeping only test header commands (which can be set without JS and can be in place before the inital load) and internals.settings, which can be used when dynamic changing is required. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::supportedUInt32WebPreferenceFeatures): (WTR::TestOptions::defaults): * DumpRenderTree/TestOptions.h: * DumpRenderTree/TestRunner.cpp: (setPagePausedCallback): (TestRunner::staticFunctions): (setAuthorAndUserStylesEnabledCallback): Deleted. (setJavaScriptCanAccessClipboardCallback): Deleted. (setXSSAuditorEnabledCallback): Deleted. (setAllowUniversalAccessFromFileURLsCallback): Deleted. (setAllowFileAccessFromFileURLsCallback): Deleted. (setNeedsStorageAccessFromFileURLsQuirkCallback): Deleted. (setTelephoneNumberParsingEnabledCallback): Deleted. (setPopupBlockingEnabledCallback): Deleted. (setPluginsEnabledCallback): Deleted. * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (resetWebPreferencesToConsistentValues): (webPreferenceFeatureValue): (setWebPreferencesForTestOptions): (runTest): (boolWebPreferenceFeatureValue): Deleted. (shouldEnableDeveloperExtras): Deleted. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setAuthorAndUserStylesEnabled): Deleted. (TestRunner::setXSSAuditorEnabled): Deleted. (TestRunner::setAllowUniversalAccessFromFileURLs): Deleted. (TestRunner::setAllowFileAccessFromFileURLs): Deleted. (TestRunner::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (TestRunner::setPopupBlockingEnabled): Deleted. (TestRunner::setPluginsEnabled): Deleted. (TestRunner::setJavaScriptCanAccessClipboard): Deleted. (TestRunner::setTelephoneNumberParsingEnabled): Deleted. (TestRunner::setDeveloperExtrasEnabled): Deleted. * DumpRenderTree/win/DumpRenderTree.cpp: (resetWebPreferencesToConsistentValues): (webPreferenceFeatureValue): (setWebPreferencesForTestOptions): (runTest): (shouldEnableDeveloperExtras): Deleted. (boolWebPreferenceFeatureValue): Deleted. * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::setAuthorAndUserStylesEnabled): Deleted. (TestRunner::setXSSAuditorEnabled): Deleted. (TestRunner::setAllowUniversalAccessFromFileURLs): Deleted. (TestRunner::setAllowFileAccessFromFileURLs): Deleted. (TestRunner::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (TestRunner::setPopupBlockingEnabled): Deleted. (TestRunner::setPluginsEnabled): Deleted. (TestRunner::setJavaScriptCanAccessClipboard): Deleted. (TestRunner::setDeveloperExtrasEnabled): Deleted. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::overridePreference): Deleted. (WTR::TestRunner::setXSSAuditorEnabled): Deleted. (WTR::TestRunner::setMediaDevicesEnabled): Deleted. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Deleted. (WTR::TestRunner::setWebAPIStatisticsEnabled): Deleted. (WTR::TestRunner::setModernMediaControlsEnabled): Deleted. (WTR::TestRunner::setWebGL2Enabled): Deleted. (WTR::TestRunner::setWritableStreamAPIEnabled): Deleted. (WTR::TestRunner::setTransformStreamAPIEnabled): Deleted. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Deleted. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Deleted. (WTR::TestRunner::setPictureInPictureAPIEnabled): Deleted. (WTR::TestRunner::setGenericCueAPIEnabled): Deleted. (WTR::TestRunner::setAllowUniversalAccessFromFileURLs): Deleted. (WTR::TestRunner::setAllowFileAccessFromFileURLs): Deleted. (WTR::TestRunner::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (WTR::TestRunner::setPluginsEnabled): Deleted. (WTR::TestRunner::setJavaScriptCanAccessClipboard): Deleted. (WTR::TestRunner::setPopupBlockingEnabled): Deleted. (WTR::TestRunner::setAuthorAndUserStylesEnabled): Deleted. (WTR::TestRunner::setOffscreenCanvasEnabled): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): LayoutTests: Update tests to only rely on test header commands and internals.settings for changing preferences to simplify test writing. * editing/async-clipboard/clipboard-do-not-read-text-from-platform-if-text-changes.html: * editing/async-clipboard/clipboard-read-text-from-platform.html: * editing/async-clipboard/clipboard-read-text-same-origin.html: * editing/async-clipboard/clipboard-write-in-copy-event-handler-in-subframe.html: * editing/async-clipboard/clipboard-write-in-copy-event-handler.html: * editing/async-clipboard/clipboard-write-text-requires-user-gesture.html: * editing/execCommand/clipboard-access-with-user-gesture.html: * editing/execCommand/clipboard-access.html: * fast/css/disabled-author-styles.html: * fast/css/object-fit/object-fit-embed-expected.html: * fast/css/object-fit/object-fit-embed.html: * fast/css/object-position/object-position-embed.html: * fast/events/before-unload-navigate-different-window.html: * fast/events/before-unload-open-window.html: * fast/events/ios/submit-form-target-blank-using-return-key.html: * fast/events/open-window-from-another-frame.html: * fast/events/popup-allowed-from-gesture-initiated-event.html: * fast/events/popup-allowed-from-gesture-initiated-form-submit.html: * fast/events/popup-blocked-from-fake-button-click.html: * fast/events/popup-blocked-from-fake-focus.html: * fast/events/popup-blocked-from-fake-user-gesture.html: * fast/events/popup-blocked-from-history-reload.html: * fast/events/popup-blocked-from-iframe-script.html: * fast/events/popup-blocked-from-iframe-src.html: * fast/events/popup-blocked-from-mousemove.html: * fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html: * fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html: * fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html: * fast/events/popup-blocked-from-untrusted-mouse-click.html: * fast/events/popup-blocked-from-window-open.html: * fast/events/popup-blocked-to-post-blank.html: * fast/events/popup-blocking-click-in-iframe.html: * fast/events/popup-blocking-timers1.html: * fast/events/popup-blocking-timers2.html: * fast/events/popup-blocking-timers3.html: * fast/events/popup-blocking-timers5.html: * fast/events/popup-blocking-timers6.html: * fast/events/popup-when-select-change.html: * fast/files/file-reader-file-url.html: * fast/files/file-reader-sandbox-iframe.html: * fast/files/workers/inline-worker-via-blob-url.html: * fast/forms/formtarget-attribute-button-html.html: * fast/forms/formtarget-attribute-input-2.html: * fast/forms/formtarget-attribute-input-html.html: * fast/forms/xss-auditor-doesnt-crash-on-post-submit.html: * fast/frames/resources/no-file-access-frame-1.html: * fast/frames/xss-auditor-handles-file-urls.html: * fast/images/embed-image.html: * fast/images/move-image-to-new-document.html: * fast/loader/url-selected-user-gesture.html: * fast/replaced/border-radius-clip-content-edge.html: * fast/replaced/outline-replaced-elements.html: * fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html: * fast/xmlhttprequest/xmlhttprequest-no-file-access.html: * fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html: * fullscreen/full-screen-request-rejected.html: * fullscreen/full-screen-request-removed.html: * fullscreen/full-screen-restrictions.html: * http/tests/cookies/resources/cookie-utilities.js: * http/tests/dom/window-open-about-blank-and-access-document.html: * http/tests/dom/window-open-about-uppercase-blank-and-access-document.html: * http/tests/dom/window-open-about-webkit-org-and-access-document-async-delegates.html: * http/tests/dom/window-open-about-webkit-org-and-access-document.html: * http/tests/download/convert-cached-load-to-download.html: * http/tests/security/popup-blocked-from-fake-event.html: * http/tests/security/popup-blocked-from-window-open.html: * http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html: * http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location2.html: * http/tests/security/xssAuditor/base-href-control-char.html: * http/tests/security/xssAuditor/base-href-direct.html: * http/tests/security/xssAuditor/base-href-null-char.html: * http/tests/security/xssAuditor/base-href-safe.html: * http/tests/security/xssAuditor/base-href-safe2.html: * http/tests/security/xssAuditor/base-href-safe3.html: * http/tests/security/xssAuditor/base-href-scheme-relative.html: * http/tests/security/xssAuditor/base-href.html: * http/tests/security/xssAuditor/block-does-not-leak-location.html: * http/tests/security/xssAuditor/block-does-not-leak-referrer.html: * http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url.html: * http/tests/security/xssAuditor/cached-frame.html: * http/tests/security/xssAuditor/cookie-injection.html: * http/tests/security/xssAuditor/crash-while-loading-tag-with-pause.html: * http/tests/security/xssAuditor/data-urls-work.html: * http/tests/security/xssAuditor/dom-write-URL.html: * http/tests/security/xssAuditor/dom-write-innerHTML.html: * http/tests/security/xssAuditor/dom-write-location-dom-write-open-img-onerror.html: * http/tests/security/xssAuditor/dom-write-location-inline-event.html: * http/tests/security/xssAuditor/dom-write-location-javascript-URL.html: * http/tests/security/xssAuditor/dom-write-location-open-img-onerror.html: * http/tests/security/xssAuditor/dom-write-location.html: * http/tests/security/xssAuditor/embed-tag-code-attribute-2.html: * http/tests/security/xssAuditor/embed-tag-code-attribute.html: * http/tests/security/xssAuditor/embed-tag-control-char.html: * http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html: * http/tests/security/xssAuditor/embed-tag-javascript-url.html: * http/tests/security/xssAuditor/embed-tag-null-char.html: * http/tests/security/xssAuditor/embed-tag.html: * http/tests/security/xssAuditor/faux-script1.html: * http/tests/security/xssAuditor/faux-script2.html: * http/tests/security/xssAuditor/faux-script3.html: * http/tests/security/xssAuditor/form-action.html: * http/tests/security/xssAuditor/formaction-on-button.html: * http/tests/security/xssAuditor/formaction-on-input.html: * http/tests/security/xssAuditor/frameset-injection.html: * http/tests/security/xssAuditor/full-block-base-href.html: * http/tests/security/xssAuditor/full-block-get-from-iframe.html: * http/tests/security/xssAuditor/full-block-iframe-javascript-url.html: * http/tests/security/xssAuditor/full-block-iframe-no-inherit.php: * http/tests/security/xssAuditor/full-block-javascript-link.html: * http/tests/security/xssAuditor/full-block-link-onclick.html: * http/tests/security/xssAuditor/full-block-object-tag.html: * http/tests/security/xssAuditor/full-block-post-from-iframe.html: * http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html: * http/tests/security/xssAuditor/full-block-script-tag-with-source.html: * http/tests/security/xssAuditor/full-block-script-tag.html: * http/tests/security/xssAuditor/get-from-iframe.html: * http/tests/security/xssAuditor/iframe-injection-allowed-2.html: * http/tests/security/xssAuditor/iframe-injection-allowed-3.html: * http/tests/security/xssAuditor/iframe-injection-allowed.html: * http/tests/security/xssAuditor/iframe-injection.html: * http/tests/security/xssAuditor/iframe-javascript-url-more-encoding.html: * http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode.html: * http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2.html: * http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3.html: * http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html: * http/tests/security/xssAuditor/iframe-javascript-url.html: * http/tests/security/xssAuditor/iframe-onload-GBK-char.html: * http/tests/security/xssAuditor/iframe-onload-in-svg-tag.html: * http/tests/security/xssAuditor/iframe-srcdoc-property-blocked.html: * http/tests/security/xssAuditor/iframe-srcdoc.html: * http/tests/security/xssAuditor/img-onerror-GBK-char.html: * http/tests/security/xssAuditor/img-onerror-accented-char.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html: * http/tests/security/xssAuditor/img-onerror-tricky.html: * http/tests/security/xssAuditor/img-tag-with-comma.html: * http/tests/security/xssAuditor/inline-event-HTML-entities.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities.html: * http/tests/security/xssAuditor/javascript-link-ampersand.html: * http/tests/security/xssAuditor/javascript-link-control-char.html: * http/tests/security/xssAuditor/javascript-link-control-char2.html: * http/tests/security/xssAuditor/javascript-link-null-char.html: * http/tests/security/xssAuditor/javascript-link-one-plus-one.html: * http/tests/security/xssAuditor/javascript-link-safe.html: * http/tests/security/xssAuditor/javascript-link-url-encoded.html: * http/tests/security/xssAuditor/javascript-link.html: * http/tests/security/xssAuditor/link-onclick-ampersand.html: * http/tests/security/xssAuditor/link-onclick-control-char.html: * http/tests/security/xssAuditor/link-onclick-entities.html: * http/tests/security/xssAuditor/link-onclick-null-char.html: * http/tests/security/xssAuditor/link-onclick.html: * http/tests/security/xssAuditor/link-opens-new-window.html: * http/tests/security/xssAuditor/malformed-HTML.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-1.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-2.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-3.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-4.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-5.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-6.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-7.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-8.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-9.html: * http/tests/security/xssAuditor/meta-tag-http-refresh-javascript-url.html: * http/tests/security/xssAuditor/meta-tag-http-refresh-x-frame-options-ignored.html: * http/tests/security/xssAuditor/nested-dom-write-location-open-img-onerror.html: * http/tests/security/xssAuditor/no-protection-script-tag.html: * http/tests/security/xssAuditor/non-block-javascript-url-frame.html: * http/tests/security/xssAuditor/object-embed-tag-control-char.html: * http/tests/security/xssAuditor/object-embed-tag-null-char.html: * http/tests/security/xssAuditor/object-embed-tag.html: * http/tests/security/xssAuditor/object-src-inject.html: * http/tests/security/xssAuditor/object-tag-javascript-url.html: * http/tests/security/xssAuditor/object-tag.html: * http/tests/security/xssAuditor/open-attribute-body.html: * http/tests/security/xssAuditor/open-event-handler-iframe.html: * http/tests/security/xssAuditor/open-iframe-src-01.html: * http/tests/security/xssAuditor/open-iframe-src-02.html: * http/tests/security/xssAuditor/open-iframe-src-03.html: * http/tests/security/xssAuditor/open-script-src-01.html: * http/tests/security/xssAuditor/open-script-src-02.html: * http/tests/security/xssAuditor/open-script-src-03.html: * http/tests/security/xssAuditor/open-script-src-04.html: * http/tests/security/xssAuditor/post-from-iframe.html: * http/tests/security/xssAuditor/property-escape-comment-01.html: * http/tests/security/xssAuditor/property-escape-comment-02.html: * http/tests/security/xssAuditor/property-escape-comment-03.html: * http/tests/security/xssAuditor/property-escape-entity-01.html: * http/tests/security/xssAuditor/property-escape-entity-02.html: * http/tests/security/xssAuditor/property-escape-entity-03.html: * http/tests/security/xssAuditor/property-escape-long.html: * http/tests/security/xssAuditor/property-escape-noquotes-tab-slash-chars.html: * http/tests/security/xssAuditor/property-escape-noquotes.html: * http/tests/security/xssAuditor/property-escape-quote-01.html: * http/tests/security/xssAuditor/property-escape-quote-02.html: * http/tests/security/xssAuditor/property-escape-quote-03.html: * http/tests/security/xssAuditor/property-escape.html: * http/tests/security/xssAuditor/property-inject.html: * http/tests/security/xssAuditor/reflection-in-path.html: * http/tests/security/xssAuditor/regress-167121.html: * http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html: * http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report.html: * http/tests/security/xssAuditor/report-script-tag-full-block.html: * http/tests/security/xssAuditor/report-script-tag-replace-state.html: * http/tests/security/xssAuditor/report-script-tag.html: * http/tests/security/xssAuditor/resources/base-href/base-href-safe2.html: * http/tests/security/xssAuditor/resources/base-href/base-href-safe3.html: * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-16bit-unicode.html: * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode.html: * http/tests/security/xssAuditor/script-tag-Big5-char.html: * http/tests/security/xssAuditor/script-tag-Big5-char2.html: * http/tests/security/xssAuditor/script-tag-addslashes-backslash.html: * http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html: * http/tests/security/xssAuditor/script-tag-addslashes-null-char.html: * http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html: * http/tests/security/xssAuditor/script-tag-control-char.html: * http/tests/security/xssAuditor/script-tag-convoluted.html: * http/tests/security/xssAuditor/script-tag-entities.html: * http/tests/security/xssAuditor/script-tag-expression-follows.html: * http/tests/security/xssAuditor/script-tag-inside-svg-tag.html: * http/tests/security/xssAuditor/script-tag-inside-svg-tag2.html: * http/tests/security/xssAuditor/script-tag-inside-svg-tag3.html: * http/tests/security/xssAuditor/script-tag-near-start.html: * http/tests/security/xssAuditor/script-tag-null-char.html: * http/tests/security/xssAuditor/script-tag-open-redirect.html: * http/tests/security/xssAuditor/script-tag-post-control-char.html: * http/tests/security/xssAuditor/script-tag-post-null-char.html: * http/tests/security/xssAuditor/script-tag-post.html: * http/tests/security/xssAuditor/script-tag-redirect.html: * http/tests/security/xssAuditor/script-tag-safe.html: * http/tests/security/xssAuditor/script-tag-safe2.html: * http/tests/security/xssAuditor/script-tag-safe3.html: * http/tests/security/xssAuditor/script-tag-safe4.html: * http/tests/security/xssAuditor/script-tag-src-redirect-safe.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html: * http/tests/security/xssAuditor/script-tag-with-actual-comma.html: * http/tests/security/xssAuditor/script-tag-with-callbacks.html: * http/tests/security/xssAuditor/script-tag-with-comma-01.html: * http/tests/security/xssAuditor/script-tag-with-comma-02.html: * http/tests/security/xssAuditor/script-tag-with-fancy-unicode.html: * http/tests/security/xssAuditor/script-tag-with-injected-comment.html: * http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag.html: * http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding.html: * http/tests/security/xssAuditor/script-tag-with-source-control-char.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url2.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url3.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url4.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url5.html: * http/tests/security/xssAuditor/script-tag-with-source-double-quote.html: * http/tests/security/xssAuditor/script-tag-with-source-entities.html: * http/tests/security/xssAuditor/script-tag-with-source-no-quote.html: * http/tests/security/xssAuditor/script-tag-with-source-null-char.html: * http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html: * http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query.html: * http/tests/security/xssAuditor/script-tag-with-source-same-host.html: * http/tests/security/xssAuditor/script-tag-with-source-unterminated-01.html: * http/tests/security/xssAuditor/script-tag-with-source-unterminated-02.html: * http/tests/security/xssAuditor/script-tag-with-source-unterminated-03.html: * http/tests/security/xssAuditor/script-tag-with-source.html: * http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment2.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment3.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment4.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment5.html: * http/tests/security/xssAuditor/script-tag-with-trailing-script-and-urlencode.html: * http/tests/security/xssAuditor/script-tag.html: * http/tests/security/xssAuditor/svg-animate.html: * http/tests/security/xssAuditor/svg-script-tag.html: * http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html: * http/tests/security/xssAuditor/xss-filter-bypass-big5.html: * http/tests/security/xssAuditor/xss-filter-bypass-long-string.html: * http/tests/security/xssAuditor/xss-filter-bypass-sjis.html: * http/tests/security/xssAuditor/xss-protection-parsing-01.html: * http/tests/security/xssAuditor/xss-protection-parsing-02.html: * http/tests/security/xssAuditor/xss-protection-parsing-03.html: * http/tests/security/xssAuditor/xss-protection-parsing-04.html: * http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html: * http/tests/storageAccess/deny-without-prompt-preserves-gesture.html: * http/tests/storageAccess/grant-with-prompt-preserves-gesture.html: * http/tests/storageAccess/resources/request-storage-access-iframe-and-pop-window.html: * http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html: * http/tests/webAPIStatistics/font-load-data-collection.html: * http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html: * http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html: * imported/blink/fast/events/popup-forwarded-gesture.html: * imported/blink/fast/workers/worker-shared-asm-buffer.html: * platform/ios/ios/fast/text/data-detectors/phone-disabled.html: * platform/ios/ios/fast/text/data-detectors/phone.html: * platform/mac/plugins/disable-plugins.html: * plugins/js-from-destroy.html: * plugins/navigator-plugin-crash.html: * plugins/navigator-plugins-disabled.html: * plugins/plugin-initiate-popup-window.html: * security/cannot-read-self-from-file.html: * storage/domstorage/localstorage/blocked-file-access-permitted-by-quirk.html: * storage/domstorage/localstorage/blocked-file-access.html: * storage/domstorage/localstorage/file-can-access.html: * storage/domstorage/sessionstorage/blocked-file-access.html: * webrtc/datachannel/mdns-ice-candidates.html: * webrtc/peerconnection-new-candidate-page-cache.html: Canonical link: https://commits.webkit.org/231095@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-01 20:09:38 +00:00
// FIXME: Remove these once there is a viable mechanism for reseting WebPreferences between tests,
[Testing] Remove requirement of adding new SPI for each preference that needs testing https://bugs.webkit.org/show_bug.cgi?id=218267 Reviewed by Simon Fraser. Source/WebKitLegacy/mac: Expose a set of setters to for DumpRenderTree to use when setting preferences by string. * WebView/WebPreferences.mm: (-[WebPreferences _setBoolPreferenceForTestingWithValue:forKey:]): (-[WebPreferences _setUInt32PreferenceForTestingWithValue:forKey:]): (-[WebPreferences _setDoublePreferenceForTestingWithValue:forKey:]): (-[WebPreferences _setStringPreferenceForTestingWithValue:forKey:]): * WebView/WebPreferencesPrivate.h: Tools: Removes the requirement for WebKitLegacy (macOS), which has already been lifted for modern WebKit, that testing new preferences requires new WebPreferences SPI. Instead, new testing specific SPI ([WebPreferences _set*PreferenceForTestingWithValue:forKey:]) are used to allow string based setting. To make this work with the shared WebPreferences*.yaml names, a helper is generated to map from the shared name to the WebKitLegacy specific name. This still doesn't quite take us all the way to supporting any WebPreferences*.yaml name in test headers, as is supported in WebKitTestRunner, as we still need a viable mechanism to fully reset WebPreferences between tests. Right now, each preference must be set on each test run, requiring the complete set of preferences to be known up front. * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/DerivedSources-input.xcfilelist: * DumpRenderTree/DerivedSources-output.xcfilelist: * DumpRenderTree/DerivedSources.make: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb: Added. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::supportedBoolWebPreferenceFeatures): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::overridePreference): Canonical link: https://commits.webkit.org/230986@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-28 15:57:35 +00:00
// at which point, we will not need to manually reset every supported preference for each test.
static const std::vector<std::string>& supportedBoolWebPreferenceFeatures();
Remove remaining alternative preference setting mechanisms from LayoutTests https://bugs.webkit.org/show_bug.cgi?id=218417 Reviewed by Simon Fraser. Source/WebKit: Remove now unused bundle SPI that was only used by the WebKitTestRuner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleOverrideBoolPreferenceForTestRunner): Deleted. (WKBundleSetAllowUniversalAccessFromFileURLs): Deleted. (WKBundleSetAllowFileAccessFromFileURLs): Deleted. (WKBundleSetAllowStorageAccessFromFileURLS): Deleted. (WKBundleSetMinimumLogicalFontSize): Deleted. (WKBundleSetFrameFlatteningEnabled): Deleted. (WKBundleSetJavaScriptCanAccessClipboard): Deleted. (WKBundleSetPopupBlockingEnabled): Deleted. (WKBundleSetAuthorAndUserStylesEnabled): Deleted. * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::addOriginAccessAllowListEntry): (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Deleted. (WebKit::InjectedBundle::setAllowUniversalAccessFromFileURLs): Deleted. (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs): Deleted. (WebKit::InjectedBundle::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (WebKit::InjectedBundle::setMinimumLogicalFontSize): Deleted. (WebKit::InjectedBundle::setFrameFlatteningEnabled): Deleted. (WebKit::InjectedBundle::setAsyncFrameScrollingEnabled): Deleted. (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard): Deleted. (WebKit::InjectedBundle::setPopupBlockingEnabled): Deleted. (WebKit::InjectedBundle::setAuthorAndUserStylesEnabled): Deleted. * WebProcess/InjectedBundle/InjectedBundle.h: Source/WebKitLegacy/win: * WebPreferenceKeysPrivate.h: Update key to match cocoa WebKitLegacy for shared use by DumpRenderTree. Tools: Remove various one off solutions for setting preferences in WebKitTestRunner and DumpRenderTree keeping only test header commands (which can be set without JS and can be in place before the inital load) and internals.settings, which can be used when dynamic changing is required. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::supportedUInt32WebPreferenceFeatures): (WTR::TestOptions::defaults): * DumpRenderTree/TestOptions.h: * DumpRenderTree/TestRunner.cpp: (setPagePausedCallback): (TestRunner::staticFunctions): (setAuthorAndUserStylesEnabledCallback): Deleted. (setJavaScriptCanAccessClipboardCallback): Deleted. (setXSSAuditorEnabledCallback): Deleted. (setAllowUniversalAccessFromFileURLsCallback): Deleted. (setAllowFileAccessFromFileURLsCallback): Deleted. (setNeedsStorageAccessFromFileURLsQuirkCallback): Deleted. (setTelephoneNumberParsingEnabledCallback): Deleted. (setPopupBlockingEnabledCallback): Deleted. (setPluginsEnabledCallback): Deleted. * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (resetWebPreferencesToConsistentValues): (webPreferenceFeatureValue): (setWebPreferencesForTestOptions): (runTest): (boolWebPreferenceFeatureValue): Deleted. (shouldEnableDeveloperExtras): Deleted. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setAuthorAndUserStylesEnabled): Deleted. (TestRunner::setXSSAuditorEnabled): Deleted. (TestRunner::setAllowUniversalAccessFromFileURLs): Deleted. (TestRunner::setAllowFileAccessFromFileURLs): Deleted. (TestRunner::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (TestRunner::setPopupBlockingEnabled): Deleted. (TestRunner::setPluginsEnabled): Deleted. (TestRunner::setJavaScriptCanAccessClipboard): Deleted. (TestRunner::setTelephoneNumberParsingEnabled): Deleted. (TestRunner::setDeveloperExtrasEnabled): Deleted. * DumpRenderTree/win/DumpRenderTree.cpp: (resetWebPreferencesToConsistentValues): (webPreferenceFeatureValue): (setWebPreferencesForTestOptions): (runTest): (shouldEnableDeveloperExtras): Deleted. (boolWebPreferenceFeatureValue): Deleted. * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::setAuthorAndUserStylesEnabled): Deleted. (TestRunner::setXSSAuditorEnabled): Deleted. (TestRunner::setAllowUniversalAccessFromFileURLs): Deleted. (TestRunner::setAllowFileAccessFromFileURLs): Deleted. (TestRunner::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (TestRunner::setPopupBlockingEnabled): Deleted. (TestRunner::setPluginsEnabled): Deleted. (TestRunner::setJavaScriptCanAccessClipboard): Deleted. (TestRunner::setDeveloperExtrasEnabled): Deleted. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::overridePreference): Deleted. (WTR::TestRunner::setXSSAuditorEnabled): Deleted. (WTR::TestRunner::setMediaDevicesEnabled): Deleted. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Deleted. (WTR::TestRunner::setWebAPIStatisticsEnabled): Deleted. (WTR::TestRunner::setModernMediaControlsEnabled): Deleted. (WTR::TestRunner::setWebGL2Enabled): Deleted. (WTR::TestRunner::setWritableStreamAPIEnabled): Deleted. (WTR::TestRunner::setTransformStreamAPIEnabled): Deleted. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Deleted. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Deleted. (WTR::TestRunner::setPictureInPictureAPIEnabled): Deleted. (WTR::TestRunner::setGenericCueAPIEnabled): Deleted. (WTR::TestRunner::setAllowUniversalAccessFromFileURLs): Deleted. (WTR::TestRunner::setAllowFileAccessFromFileURLs): Deleted. (WTR::TestRunner::setNeedsStorageAccessFromFileURLsQuirk): Deleted. (WTR::TestRunner::setPluginsEnabled): Deleted. (WTR::TestRunner::setJavaScriptCanAccessClipboard): Deleted. (WTR::TestRunner::setPopupBlockingEnabled): Deleted. (WTR::TestRunner::setAuthorAndUserStylesEnabled): Deleted. (WTR::TestRunner::setOffscreenCanvasEnabled): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): LayoutTests: Update tests to only rely on test header commands and internals.settings for changing preferences to simplify test writing. * editing/async-clipboard/clipboard-do-not-read-text-from-platform-if-text-changes.html: * editing/async-clipboard/clipboard-read-text-from-platform.html: * editing/async-clipboard/clipboard-read-text-same-origin.html: * editing/async-clipboard/clipboard-write-in-copy-event-handler-in-subframe.html: * editing/async-clipboard/clipboard-write-in-copy-event-handler.html: * editing/async-clipboard/clipboard-write-text-requires-user-gesture.html: * editing/execCommand/clipboard-access-with-user-gesture.html: * editing/execCommand/clipboard-access.html: * fast/css/disabled-author-styles.html: * fast/css/object-fit/object-fit-embed-expected.html: * fast/css/object-fit/object-fit-embed.html: * fast/css/object-position/object-position-embed.html: * fast/events/before-unload-navigate-different-window.html: * fast/events/before-unload-open-window.html: * fast/events/ios/submit-form-target-blank-using-return-key.html: * fast/events/open-window-from-another-frame.html: * fast/events/popup-allowed-from-gesture-initiated-event.html: * fast/events/popup-allowed-from-gesture-initiated-form-submit.html: * fast/events/popup-blocked-from-fake-button-click.html: * fast/events/popup-blocked-from-fake-focus.html: * fast/events/popup-blocked-from-fake-user-gesture.html: * fast/events/popup-blocked-from-history-reload.html: * fast/events/popup-blocked-from-iframe-script.html: * fast/events/popup-blocked-from-iframe-src.html: * fast/events/popup-blocked-from-mousemove.html: * fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html: * fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html: * fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html: * fast/events/popup-blocked-from-untrusted-mouse-click.html: * fast/events/popup-blocked-from-window-open.html: * fast/events/popup-blocked-to-post-blank.html: * fast/events/popup-blocking-click-in-iframe.html: * fast/events/popup-blocking-timers1.html: * fast/events/popup-blocking-timers2.html: * fast/events/popup-blocking-timers3.html: * fast/events/popup-blocking-timers5.html: * fast/events/popup-blocking-timers6.html: * fast/events/popup-when-select-change.html: * fast/files/file-reader-file-url.html: * fast/files/file-reader-sandbox-iframe.html: * fast/files/workers/inline-worker-via-blob-url.html: * fast/forms/formtarget-attribute-button-html.html: * fast/forms/formtarget-attribute-input-2.html: * fast/forms/formtarget-attribute-input-html.html: * fast/forms/xss-auditor-doesnt-crash-on-post-submit.html: * fast/frames/resources/no-file-access-frame-1.html: * fast/frames/xss-auditor-handles-file-urls.html: * fast/images/embed-image.html: * fast/images/move-image-to-new-document.html: * fast/loader/url-selected-user-gesture.html: * fast/replaced/border-radius-clip-content-edge.html: * fast/replaced/outline-replaced-elements.html: * fast/replaced/pdf-as-embed-with-no-mime-type-is-not-blank.html: * fast/xmlhttprequest/xmlhttprequest-no-file-access.html: * fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html: * fullscreen/full-screen-request-rejected.html: * fullscreen/full-screen-request-removed.html: * fullscreen/full-screen-restrictions.html: * http/tests/cookies/resources/cookie-utilities.js: * http/tests/dom/window-open-about-blank-and-access-document.html: * http/tests/dom/window-open-about-uppercase-blank-and-access-document.html: * http/tests/dom/window-open-about-webkit-org-and-access-document-async-delegates.html: * http/tests/dom/window-open-about-webkit-org-and-access-document.html: * http/tests/download/convert-cached-load-to-download.html: * http/tests/security/popup-blocked-from-fake-event.html: * http/tests/security/popup-blocked-from-window-open.html: * http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html: * http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html: * http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location.html: * http/tests/security/xssAuditor/anchor-url-dom-write-location2.html: * http/tests/security/xssAuditor/base-href-control-char.html: * http/tests/security/xssAuditor/base-href-direct.html: * http/tests/security/xssAuditor/base-href-null-char.html: * http/tests/security/xssAuditor/base-href-safe.html: * http/tests/security/xssAuditor/base-href-safe2.html: * http/tests/security/xssAuditor/base-href-safe3.html: * http/tests/security/xssAuditor/base-href-scheme-relative.html: * http/tests/security/xssAuditor/base-href.html: * http/tests/security/xssAuditor/block-does-not-leak-location.html: * http/tests/security/xssAuditor/block-does-not-leak-referrer.html: * http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url.html: * http/tests/security/xssAuditor/cached-frame.html: * http/tests/security/xssAuditor/cookie-injection.html: * http/tests/security/xssAuditor/crash-while-loading-tag-with-pause.html: * http/tests/security/xssAuditor/data-urls-work.html: * http/tests/security/xssAuditor/dom-write-URL.html: * http/tests/security/xssAuditor/dom-write-innerHTML.html: * http/tests/security/xssAuditor/dom-write-location-dom-write-open-img-onerror.html: * http/tests/security/xssAuditor/dom-write-location-inline-event.html: * http/tests/security/xssAuditor/dom-write-location-javascript-URL.html: * http/tests/security/xssAuditor/dom-write-location-open-img-onerror.html: * http/tests/security/xssAuditor/dom-write-location.html: * http/tests/security/xssAuditor/embed-tag-code-attribute-2.html: * http/tests/security/xssAuditor/embed-tag-code-attribute.html: * http/tests/security/xssAuditor/embed-tag-control-char.html: * http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html: * http/tests/security/xssAuditor/embed-tag-javascript-url.html: * http/tests/security/xssAuditor/embed-tag-null-char.html: * http/tests/security/xssAuditor/embed-tag.html: * http/tests/security/xssAuditor/faux-script1.html: * http/tests/security/xssAuditor/faux-script2.html: * http/tests/security/xssAuditor/faux-script3.html: * http/tests/security/xssAuditor/form-action.html: * http/tests/security/xssAuditor/formaction-on-button.html: * http/tests/security/xssAuditor/formaction-on-input.html: * http/tests/security/xssAuditor/frameset-injection.html: * http/tests/security/xssAuditor/full-block-base-href.html: * http/tests/security/xssAuditor/full-block-get-from-iframe.html: * http/tests/security/xssAuditor/full-block-iframe-javascript-url.html: * http/tests/security/xssAuditor/full-block-iframe-no-inherit.php: * http/tests/security/xssAuditor/full-block-javascript-link.html: * http/tests/security/xssAuditor/full-block-link-onclick.html: * http/tests/security/xssAuditor/full-block-object-tag.html: * http/tests/security/xssAuditor/full-block-post-from-iframe.html: * http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html: * http/tests/security/xssAuditor/full-block-script-tag-with-source.html: * http/tests/security/xssAuditor/full-block-script-tag.html: * http/tests/security/xssAuditor/get-from-iframe.html: * http/tests/security/xssAuditor/iframe-injection-allowed-2.html: * http/tests/security/xssAuditor/iframe-injection-allowed-3.html: * http/tests/security/xssAuditor/iframe-injection-allowed.html: * http/tests/security/xssAuditor/iframe-injection.html: * http/tests/security/xssAuditor/iframe-javascript-url-more-encoding.html: * http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode.html: * http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2.html: * http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3.html: * http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html: * http/tests/security/xssAuditor/iframe-javascript-url.html: * http/tests/security/xssAuditor/iframe-onload-GBK-char.html: * http/tests/security/xssAuditor/iframe-onload-in-svg-tag.html: * http/tests/security/xssAuditor/iframe-srcdoc-property-blocked.html: * http/tests/security/xssAuditor/iframe-srcdoc.html: * http/tests/security/xssAuditor/img-onerror-GBK-char.html: * http/tests/security/xssAuditor/img-onerror-accented-char.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding.html: * http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html: * http/tests/security/xssAuditor/img-onerror-tricky.html: * http/tests/security/xssAuditor/img-tag-with-comma.html: * http/tests/security/xssAuditor/inline-event-HTML-entities.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html: * http/tests/security/xssAuditor/javascript-link-HTML-entities.html: * http/tests/security/xssAuditor/javascript-link-ampersand.html: * http/tests/security/xssAuditor/javascript-link-control-char.html: * http/tests/security/xssAuditor/javascript-link-control-char2.html: * http/tests/security/xssAuditor/javascript-link-null-char.html: * http/tests/security/xssAuditor/javascript-link-one-plus-one.html: * http/tests/security/xssAuditor/javascript-link-safe.html: * http/tests/security/xssAuditor/javascript-link-url-encoded.html: * http/tests/security/xssAuditor/javascript-link.html: * http/tests/security/xssAuditor/link-onclick-ampersand.html: * http/tests/security/xssAuditor/link-onclick-control-char.html: * http/tests/security/xssAuditor/link-onclick-entities.html: * http/tests/security/xssAuditor/link-onclick-null-char.html: * http/tests/security/xssAuditor/link-onclick.html: * http/tests/security/xssAuditor/link-opens-new-window.html: * http/tests/security/xssAuditor/malformed-HTML.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-1.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-2.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-3.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-4.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-5.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-6.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-7.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-8.html: * http/tests/security/xssAuditor/malformed-xss-protection-header-9.html: * http/tests/security/xssAuditor/meta-tag-http-refresh-javascript-url.html: * http/tests/security/xssAuditor/meta-tag-http-refresh-x-frame-options-ignored.html: * http/tests/security/xssAuditor/nested-dom-write-location-open-img-onerror.html: * http/tests/security/xssAuditor/no-protection-script-tag.html: * http/tests/security/xssAuditor/non-block-javascript-url-frame.html: * http/tests/security/xssAuditor/object-embed-tag-control-char.html: * http/tests/security/xssAuditor/object-embed-tag-null-char.html: * http/tests/security/xssAuditor/object-embed-tag.html: * http/tests/security/xssAuditor/object-src-inject.html: * http/tests/security/xssAuditor/object-tag-javascript-url.html: * http/tests/security/xssAuditor/object-tag.html: * http/tests/security/xssAuditor/open-attribute-body.html: * http/tests/security/xssAuditor/open-event-handler-iframe.html: * http/tests/security/xssAuditor/open-iframe-src-01.html: * http/tests/security/xssAuditor/open-iframe-src-02.html: * http/tests/security/xssAuditor/open-iframe-src-03.html: * http/tests/security/xssAuditor/open-script-src-01.html: * http/tests/security/xssAuditor/open-script-src-02.html: * http/tests/security/xssAuditor/open-script-src-03.html: * http/tests/security/xssAuditor/open-script-src-04.html: * http/tests/security/xssAuditor/post-from-iframe.html: * http/tests/security/xssAuditor/property-escape-comment-01.html: * http/tests/security/xssAuditor/property-escape-comment-02.html: * http/tests/security/xssAuditor/property-escape-comment-03.html: * http/tests/security/xssAuditor/property-escape-entity-01.html: * http/tests/security/xssAuditor/property-escape-entity-02.html: * http/tests/security/xssAuditor/property-escape-entity-03.html: * http/tests/security/xssAuditor/property-escape-long.html: * http/tests/security/xssAuditor/property-escape-noquotes-tab-slash-chars.html: * http/tests/security/xssAuditor/property-escape-noquotes.html: * http/tests/security/xssAuditor/property-escape-quote-01.html: * http/tests/security/xssAuditor/property-escape-quote-02.html: * http/tests/security/xssAuditor/property-escape-quote-03.html: * http/tests/security/xssAuditor/property-escape.html: * http/tests/security/xssAuditor/property-inject.html: * http/tests/security/xssAuditor/reflection-in-path.html: * http/tests/security/xssAuditor/regress-167121.html: * http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html: * http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report.html: * http/tests/security/xssAuditor/report-script-tag-full-block.html: * http/tests/security/xssAuditor/report-script-tag-replace-state.html: * http/tests/security/xssAuditor/report-script-tag.html: * http/tests/security/xssAuditor/resources/base-href/base-href-safe2.html: * http/tests/security/xssAuditor/resources/base-href/base-href-safe3.html: * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-16bit-unicode.html: * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode.html: * http/tests/security/xssAuditor/script-tag-Big5-char.html: * http/tests/security/xssAuditor/script-tag-Big5-char2.html: * http/tests/security/xssAuditor/script-tag-addslashes-backslash.html: * http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html: * http/tests/security/xssAuditor/script-tag-addslashes-null-char.html: * http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html: * http/tests/security/xssAuditor/script-tag-control-char.html: * http/tests/security/xssAuditor/script-tag-convoluted.html: * http/tests/security/xssAuditor/script-tag-entities.html: * http/tests/security/xssAuditor/script-tag-expression-follows.html: * http/tests/security/xssAuditor/script-tag-inside-svg-tag.html: * http/tests/security/xssAuditor/script-tag-inside-svg-tag2.html: * http/tests/security/xssAuditor/script-tag-inside-svg-tag3.html: * http/tests/security/xssAuditor/script-tag-near-start.html: * http/tests/security/xssAuditor/script-tag-null-char.html: * http/tests/security/xssAuditor/script-tag-open-redirect.html: * http/tests/security/xssAuditor/script-tag-post-control-char.html: * http/tests/security/xssAuditor/script-tag-post-null-char.html: * http/tests/security/xssAuditor/script-tag-post.html: * http/tests/security/xssAuditor/script-tag-redirect.html: * http/tests/security/xssAuditor/script-tag-safe.html: * http/tests/security/xssAuditor/script-tag-safe2.html: * http/tests/security/xssAuditor/script-tag-safe3.html: * http/tests/security/xssAuditor/script-tag-safe4.html: * http/tests/security/xssAuditor/script-tag-src-redirect-safe.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html: * http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html: * http/tests/security/xssAuditor/script-tag-with-actual-comma.html: * http/tests/security/xssAuditor/script-tag-with-callbacks.html: * http/tests/security/xssAuditor/script-tag-with-comma-01.html: * http/tests/security/xssAuditor/script-tag-with-comma-02.html: * http/tests/security/xssAuditor/script-tag-with-fancy-unicode.html: * http/tests/security/xssAuditor/script-tag-with-injected-comment.html: * http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag.html: * http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding.html: * http/tests/security/xssAuditor/script-tag-with-source-control-char.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url2.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url3.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url4.html: * http/tests/security/xssAuditor/script-tag-with-source-data-url5.html: * http/tests/security/xssAuditor/script-tag-with-source-double-quote.html: * http/tests/security/xssAuditor/script-tag-with-source-entities.html: * http/tests/security/xssAuditor/script-tag-with-source-no-quote.html: * http/tests/security/xssAuditor/script-tag-with-source-null-char.html: * http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html: * http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query.html: * http/tests/security/xssAuditor/script-tag-with-source-same-host.html: * http/tests/security/xssAuditor/script-tag-with-source-unterminated-01.html: * http/tests/security/xssAuditor/script-tag-with-source-unterminated-02.html: * http/tests/security/xssAuditor/script-tag-with-source-unterminated-03.html: * http/tests/security/xssAuditor/script-tag-with-source.html: * http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment2.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment3.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment4.html: * http/tests/security/xssAuditor/script-tag-with-trailing-comment5.html: * http/tests/security/xssAuditor/script-tag-with-trailing-script-and-urlencode.html: * http/tests/security/xssAuditor/script-tag.html: * http/tests/security/xssAuditor/svg-animate.html: * http/tests/security/xssAuditor/svg-script-tag.html: * http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html: * http/tests/security/xssAuditor/xss-filter-bypass-big5.html: * http/tests/security/xssAuditor/xss-filter-bypass-long-string.html: * http/tests/security/xssAuditor/xss-filter-bypass-sjis.html: * http/tests/security/xssAuditor/xss-protection-parsing-01.html: * http/tests/security/xssAuditor/xss-protection-parsing-02.html: * http/tests/security/xssAuditor/xss-protection-parsing-03.html: * http/tests/security/xssAuditor/xss-protection-parsing-04.html: * http/tests/storageAccess/deny-with-prompt-does-not-preserve-gesture.html: * http/tests/storageAccess/deny-without-prompt-preserves-gesture.html: * http/tests/storageAccess/grant-with-prompt-preserves-gesture.html: * http/tests/storageAccess/resources/request-storage-access-iframe-and-pop-window.html: * http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html: * http/tests/webAPIStatistics/font-load-data-collection.html: * http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html: * http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html: * imported/blink/fast/events/popup-forwarded-gesture.html: * imported/blink/fast/workers/worker-shared-asm-buffer.html: * platform/ios/ios/fast/text/data-detectors/phone-disabled.html: * platform/ios/ios/fast/text/data-detectors/phone.html: * platform/mac/plugins/disable-plugins.html: * plugins/js-from-destroy.html: * plugins/navigator-plugin-crash.html: * plugins/navigator-plugins-disabled.html: * plugins/plugin-initiate-popup-window.html: * security/cannot-read-self-from-file.html: * storage/domstorage/localstorage/blocked-file-access-permitted-by-quirk.html: * storage/domstorage/localstorage/blocked-file-access.html: * storage/domstorage/localstorage/file-can-access.html: * storage/domstorage/sessionstorage/blocked-file-access.html: * webrtc/datachannel/mdns-ice-candidates.html: * webrtc/peerconnection-new-candidate-page-cache.html: Canonical link: https://commits.webkit.org/231095@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-01 20:09:38 +00:00
static const std::vector<std::string>& supportedUInt32WebPreferenceFeatures();
[Testing] Remove requirement of adding new SPI for each preference that needs testing https://bugs.webkit.org/show_bug.cgi?id=218267 Reviewed by Simon Fraser. Source/WebKitLegacy/mac: Expose a set of setters to for DumpRenderTree to use when setting preferences by string. * WebView/WebPreferences.mm: (-[WebPreferences _setBoolPreferenceForTestingWithValue:forKey:]): (-[WebPreferences _setUInt32PreferenceForTestingWithValue:forKey:]): (-[WebPreferences _setDoublePreferenceForTestingWithValue:forKey:]): (-[WebPreferences _setStringPreferenceForTestingWithValue:forKey:]): * WebView/WebPreferencesPrivate.h: Tools: Removes the requirement for WebKitLegacy (macOS), which has already been lifted for modern WebKit, that testing new preferences requires new WebPreferences SPI. Instead, new testing specific SPI ([WebPreferences _set*PreferenceForTestingWithValue:forKey:]) are used to allow string based setting. To make this work with the shared WebPreferences*.yaml names, a helper is generated to map from the shared name to the WebKitLegacy specific name. This still doesn't quite take us all the way to supporting any WebPreferences*.yaml name in test headers, as is supported in WebKitTestRunner, as we still need a viable mechanism to fully reset WebPreferences between tests. Right now, each preference must be set on each test run, requiring the complete set of preferences to be known up front. * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/DerivedSources-input.xcfilelist: * DumpRenderTree/DerivedSources-output.xcfilelist: * DumpRenderTree/DerivedSources.make: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb: Added. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::supportedBoolWebPreferenceFeatures): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::overridePreference): Canonical link: https://commits.webkit.org/230986@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-28 15:57:35 +00:00
static std::string toWebKitLegacyPreferenceKey(const std::string&);
private:
bool boolTestRunnerFeatureValue(std::string key, bool defaultValue) const;
std::string stringTestRunnerFeatureValue(std::string key, std::string defaultValue) const;
TestFeatures m_features;
Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script https://bugs.webkit.org/show_bug.cgi?id=164965 Patch by Sam Weinig <sam@webkit.org> on 2016-11-26 Reviewed by Simon Fraser. Source/JavaScriptCore: * runtime/CommonIdentifiers.h: Add identifiers needed for RuntimeEnabledFeatures. Source/WebCore: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::reset): * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled): (WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled): Add intersection observer setting. * page/IntersectionObserver.idl: * page/IntersectionObserverEntry.idl: Convert to use EnabledAtRuntime extended attribute. * page/Settings.in: Remove the old intersection observer setting. Source/WebKit/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences intersectionObserverEnabled]): (-[WebPreferences setIntersectionObserverEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Add a preference, defaulting to off, for enabling IntersectionObserver. Source/WebKit2: * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetIntersectionObserverEnabled): (WKPreferencesGetIntersectionObserverEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Add a preference, defaulting to off, for enabling IntersectionObserver. Tools: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add new files. * DumpRenderTree/TestOptions.h: Added. * DumpRenderTree/TestOptions.mm: Added. (parseBooleanTestHeaderValue): (TestOptions::TestOptions): Port TestOption parsing from WKTR to DRT. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): (resetWebViewToConsistentStateBeforeTesting): (runTest): * WebKitTestRunner/TestController.cpp: Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting preferences conditionally. (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver. LayoutTests: * intersection-observer/intersection-observer-entry-interface.html: * intersection-observer/intersection-observer-interface.html: * resources/testharnessreport.js: Switch from enabling IntersectionObserver via internals.settings to using comment header switches. Canonical link: https://commits.webkit.org/182691@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-27 04:21:49 +00:00
};
Share TestFeatures and TestCommand infrastructure between DumpRenderTree and WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=217614 Reviewed by Dean Jackson. Move TestFeatures and TestCommand code from WebKitTestRunner to TestRunnerShared and adopt shared code in both WebKitTestRunner and DumpRenderTree. This allows us to remove duplicate argument and test header parsing code and avoid updating both when we want want change things. To support different sets of test header options, featureDefaultsFromTestHeaderForTest now has a parameter for a key type map, rather than the old hardcoded set. This allows WebKitTestRunner and DumpRenderTree, which currently have slightly different options to continue to behave in the same way. Eventually, it will probably make sense to have these mostly generated from the WebPreferences*.yaml configuration files. Matching precedent, shared files use the WTR namespace. * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * TestRunnerShared/CMakeLists.txt: * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Add new files. * DumpRenderTree/DumpRenderTree.h: Removes TestCommand and parseInputLine now that they come from shared TestCommand.h * DumpRenderTree/DumpRenderTreeCommon.cpp: Removed. Moved contents to shared TestCommand.cpp * DumpRenderTree/TestOptions.cpp: * DumpRenderTree/TestOptions.h: Adopt model from WebKitTestRunner and use initialization from TestFeatures. * DumpRenderTree/mac/DumpRenderTree.mm: Adopt shared TestFeatures and TestCommand infrastructure. Construct TestOptions in a similar manner to WebKitTestRunner by merging together hardcoded / path based features and test header based features. * DumpRenderTree/mac/UIDelegate.h: * DumpRenderTree/mac/UIDelegate.mm: Update for new namespace. * TestRunnerShared/TestCommand.cpp: Added. * TestRunnerShared/TestCommand.h: Added. * TestRunnerShared/TestFeatures.cpp: Added. * TestRunnerShared/TestFeatures.h: Added. * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestOptions.cpp: * WebKitTestRunner/TestOptions.h: Moved from WebKitTestRunner. Generalized to TestFeatures to take a key type map, rather than hard coding it. Replace use of WebKit types, like WKURLRef, with std::string and std::filesystem::path. Canonical link: https://commits.webkit.org/230379@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-12 21:54:50 +00:00
}