haikuwebkit/Tools/DumpRenderTree/CMakeLists.txt

74 lines
3.0 KiB
CMake
Raw Permalink Normal View History

set(DumpRenderTree_DIR "${TOOLS_DIR}/DumpRenderTree")
set(DumpRenderTree_BINDINGS_DIR "${TOOLS_DIR}/DumpRenderTree/Bindings")
set(WebKitTestRunner_SHARED_DIR "${TOOLS_DIR}/TestRunnerShared/")
set(WebKitTestRunner_UISCRIPTCONTEXT_DIR "${TOOLS_DIR}/TestRunnerShared/UIScriptContext")
Hook up UIScriptController in DumpRenderTree https://bugs.webkit.org/show_bug.cgi?id=161064 Reviewed by Sam Weinig. Tools: Add a skeleton implementation of UIScriptController to DumpRenderTree, building for both Mac and iOS. Currently this is sufficient to test doAsyncTask(), enabling two tests in fast/harness which test this. Add a DerivedSources target to DumpRenderTree to invoke DerivedSources.make. Move related code shared between WTR and DRT into Tools/TestRunnerShared, and cleanse it of WK2-isms. Fix the makefiles to refer to the new location. Hook up TestRunner::runUIScript() for DumpRenderTree, which requires keeping track of callbacks by ID and firing them once they are complete. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: Added (copied from WTR). * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/DerivedSources.make: Copied from Tools/WebKitTestRunner/DerivedSources.make. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/TestRunner.cpp: (runUIScriptCallback): (TestRunner::staticFunctions): (TestRunner::cacheTestRunnerCallback): (TestRunner::callTestRunnerCallback): (TestRunner::clearTestRunnerCallbacks): (nextUIScriptCallbackID): (TestRunner::runUIScript): (TestRunner::callUIScriptCallback): (TestRunner::uiScriptDidComplete): (TestRunner::cleanup): * DumpRenderTree/TestRunner.h: * DumpRenderTree/ios/UIScriptControllerIOS.mm: Added. * DumpRenderTree/mac/Configurations/Base.xcconfig: DerivedSources.make needs WEBCORE_PRIVATE_HEADERS_DIR to be defined. * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::mainFrameJSContext): * DumpRenderTree/mac/UIScriptControllerMac.mm: Copied from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h. (WTR::UIScriptController::doAsyncTask): * DumpRenderTree/win/DumpRenderTree.cpp: * TestRunnerShared/Bindings/JSWrappable.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h. (WTR::JSWrappable::~JSWrappable): (WTR::JSValueMakeStringOrNull): * TestRunnerShared/Bindings/JSWrapper.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp. (WTR::JSWrapper::wrap): (WTR::JSWrapper::unwrap): (WTR::unwrapObject): (WTR::JSWrapper::initialize): (WTR::JSWrapper::finalize): * TestRunnerShared/Bindings/JSWrapper.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h. (WTR::toJS): (WTR::setProperty): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: Renamed from Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp. * TestRunnerShared/UIScriptContext/UIScriptContext.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h. (WTR::UIScriptContext::currentParentCallbackIsPendingCompletion): * TestRunnerShared/UIScriptContext/UIScriptController.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp. * TestRunnerShared/UIScriptContext/UIScriptController.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/DerivedSources.make: * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: (WTR::JSWrappable::~JSWrappable): Deleted. (WTR::JSValueMakeStringOrNull): Deleted. * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: (WTR::JSWrapper::wrap): Deleted. (WTR::JSWrapper::unwrap): Deleted. (WTR::unwrapObject): Deleted. (WTR::JSWrapper::initialize): Deleted. (WTR::JSWrapper::finalize): Deleted. * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: (WTR::toJS): Deleted. (WTR::setProperty): Deleted. * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::runUISideScript): (WTR::TestInvocation::uiScriptDidComplete): * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/UIScriptContext/UIScriptContext.cpp: Moved * WebKitTestRunner/UIScriptContext/UIScriptContext.h: Moved * WebKitTestRunner/UIScriptContext/UIScriptController.cpp: Moved * WebKitTestRunner/UIScriptContext/UIScriptController.h: Moved * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/config.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::contentVisibleRect): LayoutTests: fast/harness/ui-side-scripts.html and fast/harness/concurrent-ui-side-scripts.html pass in DumpRenderTree now. * platform/ios-simulator-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/179267@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-24 02:03:43 +00:00
file(MAKE_DIRECTORY ${DumpRenderTree_DERIVED_SOURCES_DIR})
Hook up UIScriptController in DumpRenderTree https://bugs.webkit.org/show_bug.cgi?id=161064 Reviewed by Sam Weinig. Tools: Add a skeleton implementation of UIScriptController to DumpRenderTree, building for both Mac and iOS. Currently this is sufficient to test doAsyncTask(), enabling two tests in fast/harness which test this. Add a DerivedSources target to DumpRenderTree to invoke DerivedSources.make. Move related code shared between WTR and DRT into Tools/TestRunnerShared, and cleanse it of WK2-isms. Fix the makefiles to refer to the new location. Hook up TestRunner::runUIScript() for DumpRenderTree, which requires keeping track of callbacks by ID and firing them once they are complete. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: Added (copied from WTR). * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/DerivedSources.make: Copied from Tools/WebKitTestRunner/DerivedSources.make. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/TestRunner.cpp: (runUIScriptCallback): (TestRunner::staticFunctions): (TestRunner::cacheTestRunnerCallback): (TestRunner::callTestRunnerCallback): (TestRunner::clearTestRunnerCallbacks): (nextUIScriptCallbackID): (TestRunner::runUIScript): (TestRunner::callUIScriptCallback): (TestRunner::uiScriptDidComplete): (TestRunner::cleanup): * DumpRenderTree/TestRunner.h: * DumpRenderTree/ios/UIScriptControllerIOS.mm: Added. * DumpRenderTree/mac/Configurations/Base.xcconfig: DerivedSources.make needs WEBCORE_PRIVATE_HEADERS_DIR to be defined. * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::mainFrameJSContext): * DumpRenderTree/mac/UIScriptControllerMac.mm: Copied from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h. (WTR::UIScriptController::doAsyncTask): * DumpRenderTree/win/DumpRenderTree.cpp: * TestRunnerShared/Bindings/JSWrappable.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h. (WTR::JSWrappable::~JSWrappable): (WTR::JSValueMakeStringOrNull): * TestRunnerShared/Bindings/JSWrapper.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp. (WTR::JSWrapper::wrap): (WTR::JSWrapper::unwrap): (WTR::unwrapObject): (WTR::JSWrapper::initialize): (WTR::JSWrapper::finalize): * TestRunnerShared/Bindings/JSWrapper.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h. (WTR::toJS): (WTR::setProperty): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: Renamed from Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.cpp. * TestRunnerShared/UIScriptContext/UIScriptContext.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptContext.h. (WTR::UIScriptContext::currentParentCallbackIsPendingCompletion): * TestRunnerShared/UIScriptContext/UIScriptController.cpp: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp. * TestRunnerShared/UIScriptContext/UIScriptController.h: Renamed from Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/DerivedSources.make: * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: (WTR::JSWrappable::~JSWrappable): Deleted. (WTR::JSValueMakeStringOrNull): Deleted. * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: (WTR::JSWrapper::wrap): Deleted. (WTR::JSWrapper::unwrap): Deleted. (WTR::unwrapObject): Deleted. (WTR::JSWrapper::initialize): Deleted. (WTR::JSWrapper::finalize): Deleted. * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: (WTR::toJS): Deleted. (WTR::setProperty): Deleted. * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::runUISideScript): (WTR::TestInvocation::uiScriptDidComplete): * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/UIScriptContext/UIScriptContext.cpp: Moved * WebKitTestRunner/UIScriptContext/UIScriptContext.h: Moved * WebKitTestRunner/UIScriptContext/UIScriptController.cpp: Moved * WebKitTestRunner/UIScriptContext/UIScriptController.h: Moved * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/config.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::contentVisibleRect): LayoutTests: fast/harness/ui-side-scripts.html and fast/harness/concurrent-ui-side-scripts.html pass in DumpRenderTree now. * platform/ios-simulator-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/179267@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-24 02:03:43 +00:00
set(DumpRenderTree_SOURCES
AccessibilityController.cpp
AccessibilityTextMarker.cpp
AccessibilityUIElement.cpp
CyclicRedundancyCheck.cpp
GCController.cpp
JavaScriptThreading.cpp
PixelDumpSupport.cpp
TestOptions.cpp
TestRunner.cpp
WorkQueue.cpp
)
set(DumpRenderTree_LIBRARIES
TestRunnerShared
WebKit::WebCoreTestSupport
WebKit::JavaScriptCore
)
set(DumpRenderTree_PRIVATE_INCLUDE_DIRECTORIES
${CMAKE_BINARY_DIR}
${DumpRenderTree_DERIVED_SOURCES_DIR}
${DumpRenderTree_DIR}
Send TestRendered event after running a test but before dumping https://bugs.webkit.org/show_bug.cgi?id=216428 Reviewed by Sam Weinig. Tools: * DumpRenderTree/CMakeLists.txt: Added the new files and directories. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Ditto. * DumpRenderTree/PlatformWin.cmake: Temporarily disable precompiled headers on WinCairo since they were not working properly with JSBasics.cpp. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate readyToDumpState]): Added. Calls sendTestRenderedEvent. (-[FrameLoadDelegate processWork:]): Call readyToDumpState. (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]): Ditto. * DumpRenderTree/win/FrameLoadDelegate.cpp: (readyToDumpState): Added. Calls sendTestRenderedEvent. (FrameLoadDelegate::processWork): Call readyToDumpState. (FrameLoadDelegate::locationChangeDone): Ditto. * TestRunnerShared/Bindings/JSBasics.cpp: Added. (WTR::JSValueMakeBooleanOrNull): Moved from JSWrappable.h. (WTR::JSValueToNullableBoolean): Ditto. (WTR::JSValueMakeStringOrNull): Ditto. (WTR::createJSString): Ditto. (WTR::makeValue): Ditto. (WTR::objectProperty): Ditto. (WTR::setProperty): Added. Sets a named property value to a boolean. (WTR::call): Moved from JSWrappable.h. (WTR::callConstructor): Added. Gets a global constructor and calls it. * TestRunnerShared/Bindings/JSBasics.h: Added. Declares the above functions. * TestRunnerShared/Bindings/JSWrappable.h: (WTR::JSValueMakeBooleanOrNull): Deleted. (WTR::JSValueToNullableBoolean): Deleted. (WTR::JSValueMakeStringOrNull): Deleted. (WTR::createJSString): Deleted. (WTR::makeValue): Deleted. (WTR::objectProperty): Deleted. (WTR::call): Deleted. (WTR::hasRefTestWaitAttribute): Deleted. * TestRunnerShared/Bindings/JSWrapper.h: Updated includes. * TestRunnerShared/ReftestFunctions.cpp: Added. (WTR::sendTestRenderedEvent): Added. Creates and dispatches a TestRendered event. (WTR::hasReftestWaitAttribute): Moved from JSWrappable.h and renamed to use a lowercase T since that's how web-platform-tests names things. * TestRunnerShared/ReftestFunctions.h: Added. Declares the above functions. * WebKitTestRunner/CMakeLists.txt: Added the new files and directories. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::frameDidChangeLocation): Call sendTestRenderedEvent before calling dumpAfterWaitAttributeIsRemoved. * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm: Added a missing include of "config.h" to fix build failures I was seeing. An alternative, since this is a Cocoa-only source file, would be to put config.h into a precompiled prefix header. * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm: Ditto. * WebKitTestRunner/PlatformWin.cmake: Temporarily disable precompiled headers on WinCairo since they were not working properly with JSBasics.cpp. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added the new files and directories. LayoutTests: * platform/gtk/TestExpectations: * platform/mac/TestExpectations: Unskip two tests that no longer time out since we are sending this event. * platform/win/TestExpectations: Add a failure expectation for a test that has a couple non-green pixels. Canonical link: https://commits.webkit.org/229278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-13 06:21:39 +00:00
${WebKitTestRunner_SHARED_DIR}
${WebKitTestRunner_SHARED_DIR}/Bindings
${WebKitTestRunner_UISCRIPTCONTEXT_DIR}
)
list(APPEND DumpRenderTree_PRIVATE_INCLUDE_DIRECTORIES
${PAL_FRAMEWORK_HEADERS_DIR}
${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
)
set(DumpRenderTree_WEB_PREFERENCES_TEMPLATES
[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
${DumpRenderTree_DIR}/Scripts/PreferencesTemplates/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb
${DumpRenderTree_DIR}/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb
)
set(DumpRenderTree_WEB_PREFERENCES
${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml
${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml
${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml
${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml
)
set_source_files_properties(${DumpRenderTree_WEB_PREFERENCES} PROPERTIES GENERATED TRUE)
add_custom_command(
[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
OUTPUT ${DumpRenderTree_DERIVED_SOURCES_DIR}/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp ${DumpRenderTree_DERIVED_SOURCES_DIR}/TestOptionsGeneratedKeys.h
DEPENDS ${DumpRenderTree_WEB_PREFERENCES_TEMPLATES} ${DumpRenderTree_WEB_PREFERENCES} WTF_CopyPreferences
[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
COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/GeneratePreferences.rb --frontend WebKitLegacy --base ${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml --outputDir "${DumpRenderTree_DERIVED_SOURCES_DIR}" --template ${DumpRenderTree_DIR}/Scripts/PreferencesTemplates/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb --template ${DumpRenderTree_DIR}/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb
VERBATIM)
list(APPEND DumpRenderTree_SOURCES
[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
${DumpRenderTree_DERIVED_SOURCES_DIR}/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp
${DumpRenderTree_DERIVED_SOURCES_DIR}/TestOptionsGeneratedKeys.h
)
WEBKIT_EXECUTABLE_DECLARE(DumpRenderTree)
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
WEBKIT_EXECUTABLE(DumpRenderTree)
Build more testing binaries with CMake on Windows https://bugs.webkit.org/show_bug.cgi?id=147799 Reviewed by Brent Fulgham. Source/JavaScriptCore: * shell/PlatformWin.cmake: Added. Build jsc.dll and jsc.exe to find Apple Application Support or WinCairo dlls before using them. Source/WebCore: * CMakeLists.txt: MockCDM.cpp needs to be part of WebCoreTestSupport, not WebCore. * PlatformWin.cmake: Added files needed for AppleWin port. Source/WebKit/win: * WebKitDLL.cpp: (loadResourceIntoBuffer): AppleWin doesn't like exporting a function without a separate declaration. Tools: * DumpRenderTree/CMakeLists.txt: Build TestNetscapePlugin. * DumpRenderTree/PlatformWin.cmake: Build ImageDiff and add files necessary for TestNetscapePlugin on Windows. * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders: Added. * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit: Added. * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: Copied from DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npapi.h. * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: Copied from DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npfunctions.h. * DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: Copied from DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npruntime.h. * DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npapi.h: Removed. * DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npfunctions.h: Removed. * DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npruntime.h: Removed. Canonical link: https://commits.webkit.org/165913@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-07 23:42:07 +00:00
if (ENABLE_NETSCAPE_PLUGIN_API)
add_subdirectory(TestNetscapePlugIn)
endif ()