2021-06-29 Alan Coon Cherry-pick r279361. rdar://problem/79923766 REGRESSION (r279310): Occasional crash when focusing login fields on iPad with a software keyboard https://bugs.webkit.org/show_bug.cgi?id=227472 rdar://79876040 Reviewed by Tim Horton. Source/WebKit: I added a mechanism in r279310 to defer calling `-[WKContentView _setSuppressSoftwareKeyboard:NO]` until we've gotten a response from the web process containing an up-to-date autocorrection context. However, in the case where the WKWebView client sets `_suppressSoftwareKeyboard` to `YES` and then immediately to `NO` underneath the scope of a call to `-_webView:willStartInputSession:`, we'll end up calling into `-_setSuppressSoftwareKeyboard:` inside the scope of `-requestAutocorrectionContextWithCompletionHandler:`, when we've received an autocorrection context while sync-waiting. This is problematic because it breaks UIKeyboardTaskQueue's state, since the call to `-_setSuppressSoftwareKeyboard:` will attempt to enqueue a new task after the previous task's context has already returned execution to the parent. To fix this, we instead invoke `self._suppressSoftwareKeyboard = NO;` *before* calling the completion block in `-_handleAutocorrectionContext:`. This allows the request for an autocorrection context underneath `-_setSuppressSoftwareKeyboard:` to be handled (and completed) as a child task of the previous task, which keeps UIKeyboardTaskQueue in a valid state. Test: fast/forms/ios/suppress-software-keyboard-while-focusing-input.html * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _handleAutocorrectionContext:]): Tools: Make it possible to induce the crash (prior to the fix) by introducing two new testing primitives on iOS: - `UIScriptController.suppressSoftwareKeyboard`, a readwrite attribute that can be used to suppress the appearance of the software keyboard on iOS by calling `-[WKWebView _setSuppressSoftwareKeyboard:]`. - `UIScriptController.willStartInputSessionCallback`, a callback that is invoked when we're about to start a UI-process-side input session. On iOS, this corresponds to `-[_WKInputDelegate _webView:willStartInputSession:`]. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptContext.h: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::suppressSoftwareKeyboard const): (WTR::UIScriptController::setSuppressSoftwareKeyboard): * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::UIScriptController::setWillStartInputSessionCallback): (WTR::UIScriptController::willStartInputSessionCallback const): * WebKitTestRunner/cocoa/TestRunnerWKWebView.h: * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView initWithFrame:configuration:]): (-[TestRunnerWKWebView resetInteractionCallbacks]): (-[TestRunnerWKWebView _webView:willStartInputSession:]): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): Make sure that we revert `_suppressSoftwareKeyboard` to `NO`, in case a layout test ends while leaving this on, to prevent subsequent layout tests from behaving in unexpected ways. * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::setWillStartInputSessionCallback): (WTR::UIScriptControllerIOS::suppressSoftwareKeyboard const): (WTR::UIScriptControllerIOS::setSuppressSoftwareKeyboard): LayoutTests: Add a new layout test to exercise the crash. See Tools and Source/WebKit ChangeLogs for more information. This new test suppresses and then immediately un-suppresses the software keyboard inside the `-_webView:willStartInputSession:` input delegate hook while focusing a regular text field. * fast/forms/ios/suppress-software-keyboard-while-focusing-input-expected.txt: Added. * fast/forms/ios/suppress-software-keyboard-while-focusing-input.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279361 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2021-06-28 Wenson Hsieh REGRESSION (r279310): Occasional crash when focusing login fields on iPad with a software keyboard https://bugs.webkit.org/show_bug.cgi?id=227472 rdar://79876040 Reviewed by Tim Horton. Make it possible to induce the crash (prior to the fix) by introducing two new testing primitives on iOS: - `UIScriptController.suppressSoftwareKeyboard`, a readwrite attribute that can be used to suppress the appearance of the software keyboard on iOS by calling `-[WKWebView _setSuppressSoftwareKeyboard:]`. - `UIScriptController.willStartInputSessionCallback`, a callback that is invoked when we're about to start a UI-process-side input session. On iOS, this corresponds to `-[_WKInputDelegate _webView:willStartInputSession:`]. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptContext.h: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::suppressSoftwareKeyboard const): (WTR::UIScriptController::setSuppressSoftwareKeyboard): * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::UIScriptController::setWillStartInputSessionCallback): (WTR::UIScriptController::willStartInputSessionCallback const): * WebKitTestRunner/cocoa/TestRunnerWKWebView.h: * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView initWithFrame:configuration:]): (-[TestRunnerWKWebView resetInteractionCallbacks]): (-[TestRunnerWKWebView _webView:willStartInputSession:]): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): Make sure that we revert `_suppressSoftwareKeyboard` to `NO`, in case a layout test ends while leaving this on, to prevent subsequent layout tests from behaving in unexpected ways. * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::setWillStartInputSessionCallback): (WTR::UIScriptControllerIOS::suppressSoftwareKeyboard const): (WTR::UIScriptControllerIOS::setSuppressSoftwareKeyboard): 2021-06-28 Daniel Kolesa [GTK][WPE] Add libvpx to jhbuild https://bugs.webkit.org/show_bug.cgi?id=227437 Reviewed by Philippe Normand. * jhbuild/jhbuild-minimal.modules: 2021-06-25 Myles C. Maxfield [macOS] -[NSString _web_widthWithFont:] returns 0 https://bugs.webkit.org/show_bug.cgi?id=227385 Reviewed by Simon Fraser. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/StringWidth.mm: Added. (TEST): 2021-06-25 Ziran Sun Add myself to contributor list https://bugs.webkit.org/show_bug.cgi?id=227400 Reviewed by Sergio Villar Senin. * Scripts/webkitpy/common/config/contributors.json: 2021-06-24 Kate Cheney WKWebView loadSimulatedRequest does not set attribution value for url requests within html content https://bugs.webkit.org/show_bug.cgi?id=227266 Reviewed by Brent Fulgham. API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: 2021-06-24 Sihui Liu IndexedDB prints error log about blob files when there is no error https://bugs.webkit.org/show_bug.cgi?id=227092 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/StoreBlobToBeDeleted.html: 2021-06-24 Philippe Normand [WPE] Uninstalled Cog now requires a COG_MODULEDIR environment variable https://bugs.webkit.org/show_bug.cgi?id=227351 Reviewed by Adrian Perez de Castro. Renamed the cog_path() method to cog_path_to() which requires a file_or_directory argument. This is useful when setting the COG_MODULEDIR environment variable. * Scripts/webkitpy/port/wpe.py: (WPEPort.cog_path_to): (WPEPort.browser_name): (WPEPort.browser_env): (WPEPort.run_minibrowser): (WPEPort.cog_path): Deleted. 2021-06-24 Martin Robinson [css-scroll-snap] Remove ENABLE_SCROLL_SNAP compile-time option https://bugs.webkit.org/show_bug.cgi?id=227067 Reviewed by Simon Fraser. Remove compile-time ENABLE_SCROLL_SNAP configuration option. * Scripts/webkitperl/FeatureList.pm: Remove the option from the list of features. 2021-06-24 Enrique Ocaña González [GTK] media/muted-video-is-playing-audio.html is timing out https://bugs.webkit.org/show_bug.cgi?id=208321 Reviewed by Xabier Rodriguez-Calvar. Set the WebKitTestRunnerWPE application name on user-agent to ease the detection of the WPE port from the layout tests using the isWPE() function in platform-helper.js. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformConfigureViewForTest): Set WebKitTestRunnerWPE application name on user-agent. 2021-06-23 Zan Dobersek [WPE] WebKitGLibAPITestsCore should more explicitly link against library dependencies https://bugs.webkit.org/show_bug.cgi?id=227288 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/glib/CMakeLists.txt: Set up the WebKitGLibAPITestsCore_LIBRARIES variable, use that for the target_link_libraries() call for the WebKitGLibAPITestsCore target. * TestWebKitAPI/glib/PlatformWPE.cmake: Extent the new variable to also explicitly include Cairo and WPEToolingBackends libraries. 2021-06-23 Kate Cheney Migrate App Privacy Report code from WebKitAdditions https://bugs.webkit.org/show_bug.cgi?id=227045 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: 2021-06-23 Andres Gonzalez Accessibility support for image text recognition. https://bugs.webkit.org/show_bug.cgi?id=224280 rdar://76348740 Reviewed by Chris Fleizach. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::children const): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::children const): (WTR::AccessibilityUIElement::imageOverlayElements const): * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::children const): (WTR::AccessibilityUIElement::imageOverlayElements const): 2021-06-23 Chris Dumez Update WPT tools from upstream https://bugs.webkit.org/show_bug.cgi?id=227255 Reviewed by Jonathan Bedard. * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py: (WebPlatformTestServer.__init__): The WPT server requires Python v3 to run so fallback to python3 executable if the python executable is v2. 2021-06-22 Jonathan Bedard [results.webkit.org] XSS vulnerability in configuration https://bugs.webkit.org/show_bug.cgi?id=227267 Reviewed by Dewei Zhu. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version. * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js: Escape configuration specification. * Scripts/libraries/resultsdbpy/setup.py: Bump version. 2021-06-22 Saam Barati jitCompileAndSetHeuristics shouldn't return true when we fail to compile https://bugs.webkit.org/show_bug.cgi?id=227155 Reviewed by Tadeu Zagallo. * Scripts/run-jsc-stress-tests: 2021-06-22 Truitt Savell Unreviewed, reverting r279083. Broke Mac Builds Reverted changeset: "Migrate App Privacy Report code from WebKitAdditions" https://bugs.webkit.org/show_bug.cgi?id=227045 https://commits.webkit.org/r279083 2021-06-22 Kimmo Kinnunen Functions dispatched to WorkQueue are sometimes destroyed in the calling thread due to block refcounting https://bugs.webkit.org/show_bug.cgi?id=227160 Reviewed by Antti Koivisto. Test that the Function passed to WorkQueue::dispatch is always destroyed in the WorkQueue. Test by using the knowledge that WorkQueues use threads. Start up many WorkQueues to create more thread contention to ensure that the dispatched-from thread is sometimes not run while the thread of the queue finishes processing the dispatch. * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: (TestWebKitAPI::TEST): 2021-06-22 Kimmo Kinnunen Test runner parses the names of value parametrised GTEST tests wrong https://bugs.webkit.org/show_bug.cgi?id=227207 Reviewed by Jonathan Bedard. Fix the parsing of test names. * Scripts/webkitpy/api_tests/manager_unittest.py: Add a test for the parsing. * Scripts/webkitpy/api_tests/manager.py: (Manager._test_list_from_output): Fix the test name parsing. The name is printed as: ValueParametrizedTestsSupported/DogGreen # GetParam() = (Dog, Green) * TestWebKitAPI/Test.h: (TestWebKitAPI::TestParametersToStringFormatter::operator() const): Add a general-purpose formatter for all value-parametrized tests to use. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/Misc/TestRunnerTests.cpp: Added. (TestWebKitAPI::TEST_P): Add a value-parametrized test testing the test runner. 2021-06-21 Chris Dumez [WK2] Don't process-swap on navigations within the same non-HTTP(s) protocol https://bugs.webkit.org/show_bug.cgi?id=227220 Unreviewed follow-up to fix GTK test that started failing after the behavior change in r279079. * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp: (testWebExtensionPageID): 2021-06-21 Jonathan Bedard [results.webkit.org] XSS vulnerability in test name https://bugs.webkit.org/show_bug.cgi?id=227235 Reviewed by Alexey Proskuryakov. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version. * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/archiveRouter.js: (_ArchiveRouter.prototype.labelFor): Escape any HTML in a potential label. * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js: (escapeHTML): If an object is undefined, don't attempt to escape it. * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js: (Configuration.prototype.toString): Escape configuration parameters. * Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/investigate.html: * Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/search.html: * Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/suite_results.html: * Scripts/libraries/resultsdbpy/setup.py: 2021-06-21 Kate Cheney Migrate App Privacy Report code from WebKitAdditions https://bugs.webkit.org/show_bug.cgi?id=227045 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: 2021-06-21 Chris Dumez [WK2] Don't process-swap on navigations within the same non-HTTP(s) protocol https://bugs.webkit.org/show_bug.cgi?id=227220 Reviewed by Tim Horton. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-06-21 Alex Christensen Break ref cycle between API::HTTPCookieStore and WebKit::WebsiteDataStore https://bugs.webkit.org/show_bug.cgi?id=226992 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: (TestWebKitAPI::TEST): 2021-06-21 Kimmo Kinnunen makeUnique cannot be used to instantiate function-local classes https://bugs.webkit.org/show_bug.cgi?id=227163 Reviewed by Antti Koivisto. Test that WTF_MAKE_FAST_ALLOCATED and similar macros work in function local classes. * TestWebKitAPI/Tests/WTF/StdLibExtras.cpp: (TestWebKitAPI::TEST): 2021-06-21 Alex Christensen REGRESSION (r275496): WebSocket Message too long when message is larger than 1mb https://bugs.webkit.org/show_bug.cgi?id=227030 Reviewed by Youenn Fablet. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm: Added. (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::Connection::receiveBytes const): 2021-06-21 Jonathan Bedard [resultsdbpy] Adopt autoinstaller (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=227096 Rubber-stamped by Aakash Jain. * Scripts/libraries/resultsdbpy/container: Fix libraries path. * Scripts/libraries/resultsdbpy/run: Ditto. * Scripts/libraries/resultsdbpy/run-tests: Ditto. 2021-06-19 Commit Queue Unreviewed, reverting r278699. https://bugs.webkit.org/show_bug.cgi?id=227174 Regressed JetStream2/WSL Reverted changeset: "[JSC] Remove useDataICInOptimizingJIT option" https://bugs.webkit.org/show_bug.cgi?id=226862 https://trac.webkit.org/changeset/278699 2021-06-18 Philippe Normand [MSE][GStreamer] Soundcloud serves MP4 audio with empty tfdt boxes https://bugs.webkit.org/show_bug.cgi?id=191419 Reviewed by Michael Catanzaro. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): Add a test for the soundcloud quirk. 2021-06-17 Mark Lam Define MacroAssemblerARM64E::numberOfPACBits based on OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH). https://bugs.webkit.org/show_bug.cgi?id=227147 rdar://78785309 Reviewed by Saam Barati. * TestWebKitAPI/Tests/WTF/Packed.cpp: 2021-06-17 Fujii Hironori [Win] WTF.ParseInteger and WTF.ParseIntegerAllowingTrailingJunk are failing https://bugs.webkit.org/show_bug.cgi?id=227090 Reviewed by Yusuke Suzuki. * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp: (TestWebKitAPI::AllowMixedSignednessTest::run): 2021-06-17 Jonathan Bedard [resultsdbpy] Adopt autoinstaller https://bugs.webkit.org/show_bug.cgi?id=227096 Rubber-stamped by Aakash Jain. * Scripts/libraries/resultsdbpy/container: Moved from insdie library. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Register required libraries. * Scripts/libraries/resultsdbpy/resultsdbpy/container: Moved to containing folder. * Scripts/libraries/resultsdbpy/resultsdbpy/example/main.py: * Scripts/libraries/resultsdbpy/resultsdbpy/run: Moved to containing folder. * Scripts/libraries/resultsdbpy/resultsdbpy/view/view_routes_unittest.py: Use specific imports * Scripts/libraries/resultsdbpy/run: Moved from insdie library. * Scripts/libraries/resultsdbpy/run-tests: Use autoinstalled libraries. * Scripts/libraries/resultsdbpy/setup.py: Bump version. 2021-06-17 Jonathan Bedard [webkitcorepy] Retry downloads in Autoinstall https://bugs.webkit.org/show_bug.cgi?id=227134 Reviewed by Aakash Jain. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py: (Package.Archive.download): Retry failed downloads (AutoInstall): Allow for a single retry by default 2021-06-17 Chris Dumez Trying to take empty snapshots of the view should not cause crashes https://bugs.webkit.org/show_bug.cgi?id=227133 Reviewed by Tim Horton. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm: (TEST): 2021-06-17 W.D. Xiong [iOS 15] Add iOS 15 simulator/device to bot watchers' dashboard https://bugs.webkit.org/show_bug.cgi?id=226779 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS15.png: Added. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS15Simulator.png: Added. * CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js: Added references to iOS 15 device + simulator, shifted ordering down * CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css: Added references to iOS 15 device + simulator (table.queue-grid tr.platform.ios-simulator-15 img.logo): (table.queue-grid tr.platform.ios-15 img.logo): 2021-06-17 W.D. Xiong [watchOS 8] Add watchOS 8 simulator/device to bot watchers' dashboard https://bugs.webkit.org/show_bug.cgi?id=226781 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS8.png: Added. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator8.png: Added. * CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js: Added references for watchOS 8 device + simulator; shifted order down for Windows platforms to make room * CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css: Added references for watchOS 8 device + simulator (table.queue-grid tr.platform.watchos-simulator-8 img.logo): (table.queue-grid tr.platform.watchos-8 img.logo): 2021-06-17 W.D. Xiong [tvOS 15] Add tvOS 15 simulator/device to bot watchers' dashboard https://bugs.webkit.org/show_bug.cgi?id=226782 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS15.png: Added. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS15Simulator.png: Added. * CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js: Added references to tvOS 15 device + simulator * CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css: Added references to tvOS 15 device + simulator (table.queue-grid tr.platform.tvos-simulator-15 img.logo): (table.queue-grid tr.platform.tvos-15 img.logo): 2021-06-17 W.D. Xiong [Monterey] Add Seed 1 to bot watchers' dashboard https://bugs.webkit.org/show_bug.cgi?id=226747 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/public_html/dashboard/Images/Monterey.png: Added. * CISupport/build-webkit-org/public_html/dashboard/Scripts/Dashboard.js: Added Monterey * CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css: Added Monterey (table.queue-grid tr.platform.macos-monterey img.logo): 2021-06-17 Per Arne Vollan [Win] Exception running layout tests https://bugs.webkit.org/show_bug.cgi?id=227114 Reviewed by Jonathan Bedard. Catch exception and print warning message. * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (TaskPool.__exit__): 2021-06-17 Alex Christensen Remove empty header WebTypesInternal.h https://bugs.webkit.org/show_bug.cgi?id=227094 Reviewed by Fujii Hironori. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: * DumpRenderTree/mac/DumpRenderTreePasteboard.h: * DumpRenderTree/mac/DumpRenderTreePasteboard.mm: * DumpRenderTree/mac/TextInputControllerMac.m: 2021-06-17 Alex Christensen WKScriptMessageHandlerWithReply should raise an exception if replyHandler is called twice https://bugs.webkit.org/show_bug.cgi?id=226863 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (-[AsyncScriptMessageHandler userContentController:didReceiveScriptMessage:replyHandler:]): 2021-06-17 Eric Carlson [Mac EWS] TestWebKitAPI.WebKit.AudioBufferSize is flaky timing out on EWS https://bugs.webkit.org/show_bug.cgi?id=227046 Unreviewed, fix broken test. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add audio-buffer-size.html to the Copy Resources step so tests can use it. 2021-06-17 Aakash Jain [ews] Improve build summary about finding flaky test in ReRunWebKitTests https://bugs.webkit.org/show_bug.cgi?id=227123 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (ReRunWebKitTests.evaluateCommand): * CISupport/ews-build/steps_unittest.py: 2021-06-17 David Kilzer REGRESSION (r278536): Wrong comment character used in coverage.xcconfig * coverage/coverage.xcconfig: - Change '#' to '//' to fix the comment. 2021-06-17 Oriol Brufau [css-logical] Implement logical property groups https://bugs.webkit.org/show_bug.cgi?id=226878 Reviewed by Antti Koivisto. Add validator for new codegen property "logical-property-group", replacing the old "direction-aware-property". * Scripts/webkitpy/style/checkers/jsonchecker.py: (JSONCSSPropertiesChecker.validate_logical_property_group): (JSONCSSPropertiesChecker.check_codegen_properties): 2021-06-17 Carlos Garcia Campos [GLIB] Pass a GTlsCertificate to soup_server_new() https://bugs.webkit.org/show_bug.cgi?id=227023 Reviewed by Michael Catanzaro. Instead of using soup_server_set_ssl_cert_file() that will be removed from libsoup soon. * TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp: (WebKitTestServer::WebKitTestServer): 2021-06-17 Fujii Hironori [Win] TestWTF.WTF_WeakPtr.WeakHashMapIterators is crashing https://bugs.webkit.org/show_bug.cgi?id=227102 Reviewed by Ryosuke Niwa. A heap corruption was detected while a Derived class object was destroyed as a Base class object. * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::Base::~Base): Made Base class dtor virtual. (TestWebKitAPI::Derived::~Derived): 2021-06-16 Jonathan Bedard Clean up how platform images are handled in the bot watchers' dashboard https://bugs.webkit.org/show_bug.cgi?id=226989 Patch by W.D. Xiong. Renamed the _@2x.png files to _.png and removed old platforms that don't have queues anymore. Also renamed WatchOSSimulator7 to WatchOS7Simulator * CISupport/build-webkit-org/public_html/dashboard/Images/BigSur.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/BigSur@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/BigSur@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Catalina.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/Catalina@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/Catalina@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/ElCapitan.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/ElCapitan@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/GTK.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/GTK@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/GTK@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/HighSierra.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/HighSierra@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS10.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS10@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS10Simulator.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS10Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS11.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS11@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS11Simulator.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS11Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS12.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS12@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS12Simulator.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS12Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS13.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS13@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS13Simulator.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS13Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS14.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOS14@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS14@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS14Simulator.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOS14Simulator@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS14Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS9.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS9@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS9Simulator.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOS9Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOSDevice.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOSDevice@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/IOSDevice@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/IOSSimulator.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOSSimulator@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/IOSSimulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Mavericks.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Mavericks@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Mojave.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/Mojave@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/Mojave@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/MountainLion.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/MountainLion@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/MountainLion@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/PlatformRing.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/PlatformRing@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/PlatformRing@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Sierra.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Sierra@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/SquirrelFish.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/SquirrelFish@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/SquirrelFish@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13Simulator.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14Simulator.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14Simulator@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14Simulator@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WPE.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WPE@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/WPE@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS6.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS6@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7Simulator.png: Copied from Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator7@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator6.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator6@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator6@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator7.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator7@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Windows10.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/Windows10@2x.png. * CISupport/build-webkit-org/public_html/dashboard/Images/Windows10@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Windows7.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Windows7@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Windows8.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Windows8@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WindowsXP.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/WindowsXP@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Yosemite.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Images/Yosemite@2x.png: Removed. * CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css: Applied above changes (table.queue-grid td.logo img.ring): (table.queue-grid tr.platform.ios-simulator-14 img.logo): (table.queue-grid tr.platform.ios-14 img.logo): (table.queue-grid tr.platform.tvos-simulator-14 img.logo): (table.queue-grid tr.platform.tvos-14 img.logo): (table.queue-grid tr.platform.watchos-simulator-7 img.logo): (table.queue-grid tr.platform.watchos-7 img.logo): (table.queue-grid tr.platform.macos-catalina img.logo): (table.queue-grid tr.platform.macos-bigsur img.logo): (table.queue-grid tr.platform.wincairo-windows-10 img.logo): (table.queue-grid tr.platform.windows-10 img.logo): (table.queue-grid tr.platform.windows-7 img.logo): (table.queue-grid tr.platform.linux-gtk img.logo): (table.queue-grid tr.platform.linux-wpe img.logo): (table.queue-grid tr.platform.linux-jsconly img.logo): 2021-06-16 Jonathan Bedard [webkitscmpy] Support branch queries in mock git log https://bugs.webkit.org/show_bug.cgi?id=225889 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add support for branches in `git log` commands. * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: (TestGit.test_log): (TestGit.test_branch_log): 2021-06-16 Jonathan Bedard [webkitscmpy] Cache more Git commands https://bugs.webkit.org/show_bug.cgi?id=227082 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.__init__): Reset branch cache. (Git.default_branch): Memoize default_branch call. (Git.branch): Prefer branch cache. (Git.checkout): Reset branch cache. 2021-06-16 Alicia Boya García [WTF] DataMutex: Assert on double locking on the same thread https://bugs.webkit.org/show_bug.cgi?id=227069 Reviewed by Xabier Rodriguez-Calvar. Update expectations to include the fixed test. * TestWebKitAPI/glib/TestExpectations.json: 2021-06-15 Alex Christensen Allow legacy SecurityOrigin behavior for x-apple-ql-id2 scheme https://bugs.webkit.org/show_bug.cgi?id=226993 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp: (TestWebKitAPI::TEST_F): 2021-06-15 Jonathan Bedard [git-webkit] Handle auth failures https://bugs.webkit.org/show_bug.cgi?id=226999 Reviewed by Dewei Zhu. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py: (credentials): We should attempt to retrieve credentials, even if they are not requested because retrieving credentials does not prompt the user. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.request): In the event we get a 400 error from the GitHub API, attempt forcing authentication before reporting an error. 2021-06-15 Alex Christensen Check for "xn--" in any subdomain when parsing URL hosts https://bugs.webkit.org/show_bug.cgi?id=226912 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/URLParser.cpp: (TestWebKitAPI::TEST_F): These tests used to hit UIDNA_ERROR_LABEL_TOO_LONG which is allowed now. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): This test, from r262171, needs to verify that non-ASCII characters are not truncated to ASCII values when converting to NSURL. It used to use an invalid URL that had a host that ended in U+FE63 (SMALL HYPHEN-MINUS) which would fail because of UIDNA_ERROR_TRAILING_HYPHEN. Now that trailing hyphens are allowed, we end in U+0661 and U+06F1 which fail because of UIDNA_ERROR_BIDI which makes this test still verify the non-truncated values of an invalid host converted to an NSURL. 2021-06-15 Jonathan Bedard [iOS 15] Support building WebKit https://bugs.webkit.org/show_bug.cgi?id=227002 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Remove unneeded import. 2021-06-15 Diego Pino Garcia [GTK] Unreviewed test gardening. Gardened three API GTK test failures. These tests were constant failures in EWS and were slowing down the bot. The tests are the following: - /WebKit2Gtk/TestContextMenu:/webkit/WebKitWebPage/context-menu. - /WebKit2Gtk/TestContextMenu:/webkit/WebKitWebPage/context-menu-node. - /TestWTF:WTF_DataMutex.DoubleLockDeathTest. * TestWebKitAPI/glib/TestExpectations.json: 2021-06-14 Keith Miller run-javascriptcore-tests should print output when a test binary fails by default https://bugs.webkit.org/show_bug.cgi?id=226985 Reviewed by Mark Lam. * Scripts/run-javascriptcore-tests: (runTest): 2021-06-14 Ryan Haddad Bring up an Apple-BigSur-AppleSilicon-Release-Test262-Tests queue https://bugs.webkit.org/show_bug.cgi?id=226602 Reviewed by Aakash Jain. * CISupport/build-webkit-org/config.json: * CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js: (WebKitBuildbot): 2021-06-14 Kimmo Kinnunen AcceleratedImageBuffer not instantiated but objects are punned to the type https://bugs.webkit.org/show_bug.cgi?id=226917 Reviewed by Said Abou-Hallawa. Add new test TestWebKitAPI.ImageBufferTests.ImageBufferSubTypeCreateCreatesSubtypes to test that the code compiles. Before, it would fail with: `error: cannot initialize a member subobject of type 'typename PtrTraits::StorageType' (aka 'WebCore::AcceleratedImageBuffer *') with an rvalue of type 'WebCore::ConcreteImageBuffer *'` * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp: Added. (TestWebKitAPI::TEST): 2021-06-11 Fujii Hironori [Win][DumpRenderTree] --no-timeout switch doesn't work https://bugs.webkit.org/show_bug.cgi?id=226913 Reviewed by Don Olmstead. r177542 added a variable 'useTimeoutWatchdog', but used nowhere. * DumpRenderTree/win/DumpRenderTree.cpp: * DumpRenderTree/win/DumpRenderTreeWin.h: * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::setWaitToDump): Check useTimeoutWatchdog to start the timer. 2021-06-11 Ryosuke Niwa Add WeakHashMap https://bugs.webkit.org/show_bug.cgi?id=226872 Reviewed by Geoffrey Garen. Added unit tests for WeakHashMap. * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::computeSizeOfWeakHashSet): Deleted the unused variant. (WTF_WeakPtr.WeakHashSetExpansion): Deleted the superflous for loop. (TestWebKitAPI::computeSizeOfWeakHashMap): Added. (TestWebKitAPI::ValueObject): Added. (TestWebKitAPI::ValueObject::create): (TestWebKitAPI::ValueObject::~ValueObject): (TestWebKitAPI::ValueObject::ValueObject): (WTF_WeakPtr.WeakHashMapBasic): Added. (WTF_WeakPtr.WeakHashMapConstObjects): Added. (WTF_WeakPtr.WeakHashMapExpansion): Added. (WTF_WeakPtr.WeakHashMapRemoveNullReferences): Added. (TestWebKitAPI::collectKeyValuePairsUsingIterators): Added. (WTF_WeakPtr.WeakHashMapIterators): Added. (WTF_WeakPtr.WeakHashMapAmortizedCleanup): Added. 2021-06-11 Chris Dumez Unreviewed small API test failure fix after r278786. * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (TEST): 2021-06-11 Alex Christensen Partition CrossOriginPreflightResultCache by SessionID https://bugs.webkit.org/show_bug.cgi?id=226910 Reviewed by Youenn Fablet. * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (TEST): 2021-06-11 Peng Liu Fix the references to audio-buffer-size.html in project.pbxproj https://bugs.webkit.org/show_bug.cgi?id=226932 Reviewed by Eric Carlson. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2021-06-11 Jonathan Bedard [Monterey] Support building WebKit https://bugs.webkit.org/show_bug.cgi?id=226846 Reviewed by Tim Horton. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add CoreCryptoSPI.h. * TestWebKitAPI/Tests/WebCore/cocoa/CoreCryptoSPI.h: Added. * TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm: Import CoreCryptoSPI.h. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Ditto. 2021-06-11 Devin Rousso Add an option to Copy WebKit Permalink that automatically opens the URL in the default browser for Sublime Text https://bugs.webkit.org/show_bug.cgi?id=226933 Reviewed by Tim Horton. Usually the step right after copying the permalink is to open a browser and enter it. Having a setting that causes the plugin to do that automatically would save some time and effort. * CopyPermalink/Sublime Text/CopyWebKitPermalink/CopyWebKitPermalink.py: (Settings.automatically_open_in_browser): Added. (CopyWebKitPermalinkCommand.run): * CopyPermalink/Sublime Text/CopyWebKitPermalink/CopyWebKitPermalink.sublime-settings: 2021-06-11 Jonathan Bedard [check-webkit-style] failing in JS checker due to python byte string https://bugs.webkit.org/show_bug.cgi?id=226925 Reviewed by Aakash Jain. * Scripts/webkitpy/style/checkers/jstest.py: (map_functions_to_dict): Use byte regexes. (strip_trailing_blank_lines_and_comments): Ditto. * Scripts/webkitpy/style/checkers/jstest_unittest.py: (JSTestCheckerTestCase.test_map_functions_to_dict): Test content should be bytes. 2021-06-11 Truitt Savell Remove ews129 instead of ews179 https://bugs.webkit.org/show_bug.cgi?id=226855 Reviewed by Jonathan Bedard. * CISupport/ews-build/config.json: 2021-06-11 Megan Gardner Rename AppHighlight group to QuickNote to correctly reflect feature. https://bugs.webkit.org/show_bug.cgi?id=226888 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: (TEST): 2021-06-11 Jonathan Bedard REGRESSION (r278454): [run-webkit-tests] worker is printed twice for each test in debug logging https://bugs.webkit.org/show_bug.cgi?id=226895 Reviewed by Dewei Zhu. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (Worker.run_tests): Strip process names from debug logs. (Worker.stop): Ditto. (Worker._kill_driver): Ditto. (Worker._clean_up_after_test): Ditto. 2021-06-10 Alex Christensen Origin is null in http requests when baseURL has custom scheme on iOS 15.0 https://bugs.webkit.org/show_bug.cgi?id=226760 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm: (TEST): 2021-06-10 Chris Fleizach AX: TestWebKitAPI.WebKit.AccessibilityReduceMotion failing on iOS https://bugs.webkit.org/show_bug.cgi?id=226758 Reviewed by Alex Christensen. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/AccessibilityIncreaseContrast.mm: Added. (-[WKPreferenceObserverForTestingIncreaseContrast preferenceDidChange:key:encodedValue:]): (TEST): 2021-06-10 Jonathan Bedard [webkitcorepy] 6x performance improvement in Memoized https://bugs.webkit.org/show_bug.cgi?id=226891 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py: (Memoize.__call__.decorator): inspect.getargspec retrieves many bits of information about the function we don't care about. Retrieve arguments manually (and only do it once) to increase performance of Memoized function calls. 2021-06-10 Philippe Normand [WPE] Enable Cog for developer builds https://bugs.webkit.org/show_bug.cgi?id=224360 Reviewed by Adrian Perez de Castro. * PlatformWPE.cmake: Enable X11 support in Cog. Re-enable headless support in Cog. Map libsoup configuration in Cog with the one used by the WebKit build. 2021-06-10 Truitt Savell Remove Ews179 and bot279 from configs https://bugs.webkit.org/show_bug.cgi?id=226855 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/config.json: * CISupport/ews-build/config.json: 2021-06-10 Yusuke Suzuki [JSC] Remove useDataICInOptimizingJIT option https://bugs.webkit.org/show_bug.cgi?id=226862 Reviewed by Mark Lam. * Scripts/run-jsc-stress-tests: 2021-06-09 Sergio Villar Senin Add email address for Igalia's WebKit layout team to contributors.json https://bugs.webkit.org/show_bug.cgi?id=226829 Reviewed by Simon Fraser. * Scripts/webkitpy/common/config/contributors.json: 2021-06-09 Chris Gambrell Add personal email to Tools/Scripts/webkitpy/common/config/contributors.json https://bugs.webkit.org/show_bug.cgi?id=226845 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/config/contributors.json: 2021-06-09 Dewei Zhu HTTP server should run with the same python executable as run-benchmark script. https://bugs.webkit.org/show_bug.cgi?id=226834 Reviewed by Jonathan Bedard. 'SimpleHTTPServerDriver._ensure_http_server_dependencies' will not work if the python version used by run-benchmark is not the same as the one invokes http server. Remove python modules no longer needed by http server. * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.serve): (SimpleHTTPServerDriver._ensure_http_server_dependencies): 2021-06-09 Fujii Hironori CISupport/test-result-archive script reports "SyntaxError: invalid syntax" with Python 3 https://bugs.webkit.org/show_bug.cgi?id=226797 Reviewed by Jonathan Bedard. * CISupport/test-result-archive: (archive_test_results): Replaced the old syntax with 'as' for 'except' clauses. 2021-06-08 Yusuke Suzuki [JSC] Use DataIC for AccessCase https://bugs.webkit.org/show_bug.cgi?id=226072 Reviewed by Saam Barati and Filip Pizlo. * Scripts/run-jsc-stress-tests: 2021-06-08 Dewei Zhu Increase http server launch timeout on run-benchmark script. https://bugs.webkit.org/show_bug.cgi?id=226801 Reviewed by Ryosuke Niwa. Installing twisted module in http server may take longer than 7.5 seconds. Increase the timeout to be 31.5 seconds and add an early terminate if http server process is not running. * Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Removed unused import. * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.serve): 2021-06-08 Fujii Hironori run-webkit-tests: TaskPool reports PicklingError for Windows Python https://bugs.webkit.org/show_bug.cgi?id=226710 Reviewed by Jonathan Bedard. Since r278454 changed run-webkit-tests to use TaskPool, run-webkit-tests reported PicklingError for Windows Python. It couldn't pickle Port object. This issue happened on multi-core PC, but on single CPU tester bot machines. WrappedPopen couldn't be pickled because it was defined as an inner class. It should be defined at the top-level. The instance variables _web_platform_test_server, _websocket_server_temporary_directory, and _websocket_secure_server of Port object aren't pickleable. Make them class variables. * Scripts/webkitpy/common/system/executive.py: (WrappedPopen): (Executive.WrappedPopen): * Scripts/webkitpy/port/base.py: (Port): (Port.__init__): (Port.ports_to_forward): (Port.is_websocket_server_running): (Port.is_wpt_server_running): (Port.start_websocket_server): (Port.start_web_platform_test_server): (Port.stop_websocket_server): (Port.stop_web_platform_test_server): 2021-06-08 Antti Koivisto Factor MarkedText collection out of LegacyInlineTextBox https://bugs.webkit.org/show_bug.cgi?id=226731 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WebCore/MarkedText.cpp: (TestWebKitAPI::TEST): 2021-06-09 Ryan Haddad [test-webkit-lldb] 3 dump_class_layout_unittest.TestDumpClassLayout tests failing with Xcode 12.5 https://bugs.webkit.org/show_bug.cgi?id=226540 Unreviewed test gardening. * lldb/dump_class_layout_unittest.py: Rebaseline tests. 2021-06-08 Sam Weinig Add copy of std::span so that we can use it pre-moving to c++20 https://bugs.webkit.org/show_bug.cgi?id=226351 Reviewed by Alex Christensen. Add basic WTF::Span test to make sure things compile and work. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/Span.cpp: Added. 2021-06-08 Sam Weinig Move some hand rolled CSSProperty predicates to be generated based on new CSSProperties.json properties https://bugs.webkit.org/show_bug.cgi?id=226768 Reviewed by Antti Koivisto. * Scripts/webkitpy/style/checkers/jsonchecker.py: (JSONCSSPropertiesChecker.check_codegen_properties): Add new codegen properties to the checker. 2021-06-08 Philippe Normand [Flatpak SDK] Enable network access in the WPE build sandbox https://bugs.webkit.org/show_bug.cgi?id=225914 Reviewed by Michael Catanzaro. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): Allow network access for WPE build jobs, so that CMake is able to git checkout Cog from github. 2021-06-08 Jean-Yves Avenard Update jya's email address https://bugs.webkit.org/show_bug.cgi?id=226752 Reviewed by Tim Horton. * Scripts/webkitpy/common/config/contributors.json: 2021-06-08 Philippe Normand [Flatpak SDK] Allow custom build directories https://bugs.webkit.org/show_bug.cgi?id=226142 Reviewed by Adrian Perez de Castro. By default the build directory remains WebKitBuild/{GTK,WPE}/{Release,Debug}. Builds done with the Flatpak SDK now support the standard WEBKIT_OUTPUTDIR environment variable, eg. setting $WEBKIT_OUTPUTDIR to "/path/to/somewhere", the built files will end up in /path/to/somewhere/{GTK,WPE}/Release. * flatpak/flatpakutils.py: (WebkitFlatpak.clean_args): 2021-06-07 Jean-Yves Avenard Update jya's email address https://bugs.webkit.org/show_bug.cgi?id=226752 Reviewed by Tim Horton. * Scripts/webkitpy/common/config/contributors.json: 2021-06-07 Alex Christensen Adopt SecTrustGetCertificateAtIndex replacement where available https://bugs.webkit.org/show_bug.cgi?id=225893 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (verifyCertificateAndPublicKey): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2021-06-07 Wenson Hsieh Upstream WebKit support for Live Text https://bugs.webkit.org/show_bug.cgi?id=226706 Reviewed by Tim Horton. Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS. * TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: * TestWebKitAPI/Tests/mac/ImmediateActionTests.mm: 2021-06-07 Fujii Hironori Windows Python 2.7 fails to install tblib-1.7.0 due to "TypeError: environment can only contain strings" https://bugs.webkit.org/show_bug.cgi?id=226707 Reviewed by Jonathan Bedard. WinCairo port is still using Python 2.7 that has ascii strings and unicode strings. WinPort.setup_crash_log_saving modifies _NT_SYMBOL_PATH env var to have a unicode string. So, after setup_crash_log_saving, AutoInstall failed due to the unicode string in os.environ. * Scripts/webkitpy/port/win.py: (WinPort.setup_crash_log_saving): Convert self._build_path() to a ascii string with str(). 2021-06-07 Fujii Hironori run-webkit-test should use python2 for wpt serve until the latest will be imported https://bugs.webkit.org/show_bug.cgi?id=226703 Reviewed by Jonathan Bedard. The current imported wpt.py doesn't support Python 3 yet. Use Python 2 temporarily. * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py: (WebPlatformTestServer.__init__): 2021-06-07 Wenson Hsieh [Cocoa] Find-in-page should match text inside image overlays https://bugs.webkit.org/show_bug.cgi?id=226704 Reviewed by Tim Horton. Add an API test to verify that text inside image overlays is visible to find-in-page. * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: 2021-06-07 Carlos Garcia Campos [GTK][WPE] Signal "window-object-cleared" not emitted unless frame js context is get before https://bugs.webkit.org/show_bug.cgi?id=221771 Reviewed by Michael Catanzaro. Update window-object-cleared test to check that the signal is emitted for the WebKitScriptWorld objects created by the extension. * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp: (UserMessageTest::sendMessage): (UserMessageTest::viewUserMessageReceived): (UserMessageTest::waitUntilViewMessagesReceived): (UserMessageTest::waitUntilViewMessageReceived): (testWebExtensionWindowObjectCleared): (beforeAll): * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp: (windowObjectCleared): (isolatedWorldWindowObjectCleared): (webkit_web_extension_initialize_with_user_data): 2021-06-06 Darin Adler Handle custom identifiers and strings separately, so we can quote strings correctly consistently https://bugs.webkit.org/show_bug.cgi?id=226694 Reviewed by Sam Weinig. * TestRunnerShared/TestFeatures.cpp: (WTR::parseTestHeader): Fixed a missing quote that made a log message read strangely. 2021-06-06 David Kilzer Unexport llvm coverage symbols to fix build Reviewed by Darin Adler. * Scripts/check-for-weak-vtables-and-externals: - Revert change from r278444. That fixes errors when this script is run, but the Generate TAPI build phase for some projects still fails due to the new weak external symbols. * coverage/coverage.xcconfig: (UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Add. - Linker flags to unexport llvm symbols added by the compiler for coverage. (OTHER_LDFLAGS): - Add $(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE) to list of switches to unexport the symbols during linking. 2021-06-04 Chris Dumez FileSystem::readFromFile() should return data as `void*` https://bugs.webkit.org/show_bug.cgi?id=226671 Reviewed by Darin Adler. FileSystem::readFromFile() should return data as `void*` instead of `char*`. This is more flexible and consistent with FileSystem::writeToFile(). * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::readContentsOfFile): 2021-06-04 Chris Dumez Use Vector instead of Vector to store bytes in SharedBuffer https://bugs.webkit.org/show_bug.cgi?id=226623 Reviewed by Darin Adler. Use Vector instead of Vector to store bytes in SharedBuffer. Also have SharedBuffer::data() return a `const uint8_t*` instead of `const char*`. This is our preferred type to store bytes. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkBuffer): 2021-06-04 Alex Christensen Make attributedBundleIdendifier a property for WKWebViewConfiguration instead of _WKWebsiteDataStoreConfiguration https://bugs.webkit.org/show_bug.cgi?id=226548 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: (TestWebKitAPI::TEST): 2021-06-04 Martin Robinson The CMake cache is removed when specifying a build target https://bugs.webkit.org/show_bug.cgi?id=226642 Reviewed by Jonathan Bedard. * Scripts/webkitdirs.pm: (shouldRemoveCMakeCache): Only remove the CMake cache when arguments that start with a dash change. 2021-06-04 Michael Catanzaro [GTK][WPE] Expose setCORSDisablingPatterns https://bugs.webkit.org/show_bug.cgi?id=219995 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewCORSAllowlist): (beforeAll): 2021-06-04 Aakash Jain [ews] Speed up ews status bubble loading speed https://bugs.webkit.org/show_bug.cgi?id=214821 Reviewed by Jonathan Bedard. This change does a trade-off between accuracy of queue position vs status-bubble loading time. This would reduce the calculations needed for queue position computation, but the position might not be accurate if the queue has a backlog of more than 12 hours (which shouldn't be the case normally). If the backlog is less than 12 hours, then the queue position will be accurate. Also, this patch separates the logic of when to hide the status-bubble. Status-bubble will now be hidden after 7 days of no build. However, if patch is waiting for more than 12 hours, but less than 7 days, instead of computing the exact queue position, we do not display queue position. * CISupport/ews-app/ews/views/statusbubble.py: (StatusBubble): (StatusBubble._build_bubble): (StatusBubble._queue_position): 2021-06-04 Jonathan Bedard [run-webkit-tests] Use webkitcorepy's TaskPool https://bugs.webkit.org/show_bug.cgi?id=226234 Reviewed by Dewei Zhu. * Scripts/run-webkit-tests: Stop using multiprocessing_bootstrap. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (setup_shard): Run setup in Worker process. (handle_started_test): Notify parent process that a test has started. (run_shard): Run test shard in Worker process. (handle_finished_test): Notify parent process that a test has finished. (teardown_shard): Teardown worker process metadata. (LayoutTestRunner.__init__): Make printer public. (LayoutTestRunner.run_tests): Use TaskPool to spawn multiple workers. (LayoutTestRunner.update_summary_with_result): Renamed from _update_summary_with_result, strip unused arguments. (LayoutTestRunner._annotate_results_with_additional_failures): Strip unused arguments. (LayoutTestRunner.start_servers): Make printer public. (LayoutTestRunner.stop_servers): Ditto. (Worker.setup): Instantiate singleton worker. (Worker.teardown): Teardown singleton worker. (Worker.__init__): Pass port object, remove unused variable. (Worker.run_tests): Use TaskPool process name. (Worker.stop): Ditto. (Worker._kill_driver): Use port options, use TaskPool process name. (Worker._run_test_with_or_without_timeout): Ditto. (Worker._clean_up_after_test): Use TaskPool process name. (Worker._run_test_in_another_thread): Ditto. (Worker._run_test_in_this_thread): Ditto. (Worker._run_single_test): Use port options. (LayoutTestRunner._worker_factory): Deleted. (LayoutTestRunner._handle_did_spawn_worker): Deleted. (LayoutTestRunner._update_summary_with_result): Deleted. (LayoutTestRunner.handle): Deleted. (LayoutTestRunner._handle_started_test): Deleted. (LayoutTestRunner._handle_finished_test): Deleted. (LayoutTestRunner._handle_finished_test_group): Deleted. (Worker.__del__): Deleted. (Worker.start): Deleted. (Worker.handle): Deleted. (Worker._run_test): Deleted. (Worker._finished_test_group): Deleted. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py: (LayoutTestRunnerTests.test_update_summary_with_result): The runner keeps track of it's state. * Scripts/webkitpy/layout_tests/run_webkit_tests.py: Remove call to main. * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.serial_test_basic): Run all tests in the same process. (RunTest.test_hung_thread): Deleted. * Scripts/webkitpy/port/base.py: (Port.worker_startup_delay_secs): Deleted. * Scripts/webkitpy/port/test.py: (Port.worker_startup_delay_secs): Deleted. 2021-06-04 Carlos Garcia Campos [GTK] MiniBrowser: add support for saving multiple tabs in session state https://bugs.webkit.org/show_bug.cgi?id=225763 Reviewed by Michael Catanzaro. * MiniBrowser/gtk/BrowserWindow.c: (browserWindowSaveSession): (browserWindowTryClose): (browserWindowFinalize): (browserWindowDispose): (browser_window_load_session): 2021-06-03 Said Abou-Hallawa [MotionMark] Controller.filterOutOutliers() sorts the frameLengths array incorrectly https://bugs.webkit.org/show_bug.cgi?id=226605 Reviewed by Simon Fraser. Update MotionMark 1.1 to use the version r278436. * Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan: 2021-06-03 David Kilzer Weak external symbols found when building with Release+Coverage configuration Reviewed by Jonathan Bedard. * Scripts/check-for-weak-vtables-and-externals: - Ignore weak symbols from llvm when building with coverage enabled. This fixes the build. * Scripts/webkitdirs.pm: (XcodeOptions): - Switch to using XcodeCoverageSupportOptions() so `make` and `build-webkit` both use the same configuration. (XcodeCoverageSupportOptions): - Remove old Xcode variables from 2008 in favor of passing `-xcconfig Tools/coverage/coverage.xcconfig`. * coverage/coverage.xcconfig: (OTHER_CPLUSPLUSFLAGS): - Remove OTHER_CPLUSPLUSFLAGS since this just caused duplicate command-line switches to be used when compiling C++ sources. 2021-06-03 Commit Queue Unreviewed, reverting r278356. https://bugs.webkit.org/show_bug.cgi?id=226606 "Breaks jsc tests". Reverted changeset: "Convert small JIT pool tests into executable fuzzing" https://bugs.webkit.org/show_bug.cgi?id=226279 https://trac.webkit.org/changeset/278356 2021-06-03 Jean-Yves Avenard Add MediaSessionCoordinator test to ensure that disconnection on the private side is properly handled. https://bugs.webkit.org/show_bug.cgi?id=226568 rdar://problem/78801408 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: (-[_WKMockMediaSessionCoordinator sessionStateChanged:]): Add method to signal change in coordinator state. (TestWebKitAPI::TEST_F): Add test. 2021-06-02 Rob Buis Split FillInlinePath/StrokeInlinePath https://bugs.webkit.org/show_bug.cgi?id=225687 Reviewed by Wenson Hsieh. Adjust to API new display list items. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: (TestWebKitAPI::TEST): 2021-06-02 Jonathan Bedard [webkitcorepy] TaskPool shouldn't fork when 1 process is needed https://bugs.webkit.org/show_bug.cgi?id=226506 Reviewed by Dewei Zhu. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (TaskPool.__init__): Allow user to force fork, even with a single process. (TaskPool.__enter__): If only a single worker is needed and the caller is not forcing a fork, run the setup function in the parent process. (TaskPool.do): If no queue has been constructed, we're running in the parent process. (TaskPool.wait): Nothing to wait for if we're running in the parent process. (TaskPool.__exit__): If no queue has been constructed, we're running in the parent process, so run the teardown in this process and reset the process name. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py: (TaskPoolUnittest.test_single): Force fork. (TaskPoolUnittest.test_single_no_fork): (TaskPoolUnittest.test_exception): Force fork. (TaskPoolUnittest.test_exception_no_fork): (TaskPoolUnittest.test_invalid_shutdown): Force fork. 2021-06-02 W.D. Xiong [resultsdbpy] "legend" is misspelled as "lengend" https://bugs.webkit.org/show_bug.cgi?id=226436 Reviewed by Darin Adler. Corrected said misspelling in resultsdbpy * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js: * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/docs.yaml: * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/index.html: * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/webkit.css: (.legend, .timeline>.content .legend): (.legend.horizontal, .timeline>.header .legend): (.legend>.item): (.legend>.item .dot): (.legend>.item .dot img, .legend>.item .dot .text): (.legend>.item .dot>img, .legend>.item .dot>.text): (.timeline.legend>.item .dot::before): (.timeline.legend>.item .dot::after): (.legend>.item .label): (.lengend, .timeline>.content .lengend): Deleted. (.lengend.horizontal, .timeline>.header .lengend): Deleted. (.lengend>.item): Deleted. (.lengend>.item .dot): Deleted. (.lengend>.item .dot img, .lengend>.item .dot .text): Deleted. (.lengend>.item .dot>img, .lengend>.item .dot>.text): Deleted. (.timeline.lengend>.item .dot::before): Deleted. (.timeline.lengend>.item .dot::after): Deleted. (.lengend>.item .label): Deleted. 2021-06-02 Chris Dumez Drop Checked::safeGet() https://bugs.webkit.org/show_bug.cgi?id=226537 Reviewed by Geoffrey Garen. Drop Checked::safeGet() and replace with uses of Checked::operator T() or Checked::value(). safeGet() is a bit akward, having both a return value and an out-parameter. * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp: (TestWebKitAPI::CheckedArithmeticTester::run): 2021-06-02 Jean-Yves Avenard MediaSessionCoordinator API test is failing, https://bugs.webkit.org/show_bug.cgi?id=226460 rdar://78680005 Reviewed by Eric Carlson. When leaving a MediaSessionCoordinator from the JS side; there's no callback occurring from the MediaSessionCoordinatorPrivate to the MediaSessionCoordinator (which is what this test was about). A state change callback should only occur when it's the MediaSessionCoordinatorPrivate that leaves. * TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: (TestWebKitAPI::TEST_F): 2021-06-02 Garrett Davidson [Cocoa] _WKAuthenticatorAssertionResponse should specify the attachment type used https://bugs.webkit.org/show_bug.cgi?id=225519 Reviewed by Brent Fulgham. Update the CTAP tests to specify the new attachment parameter. All of these tests assume a cross platform authenticator. * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::TEST): 2021-06-02 Keith Miller Convert small JIT pool tests into executable fuzzing https://bugs.webkit.org/show_bug.cgi?id=226279 Reviewed by Michael Saboff. Right now, we try to test our engine on a small JIT pool. This isn't a known configuration for any actual ports and causes issues if we run out of JIT memory when we need to compile an OSR exit. Instead of testing such a small pool we should just fuzz each executable allocation that says it can fail. The current fuzzing doesn't do a good job tracking the number of DFG/FTL compiles when allocations fail, so when enabled those tests will just exit early. Also, right now we use a random seed picked by the engine for these tests, which makes it hard to reproduce crashes on the bots. If we see flakiness on the bots we can have the harness pass in a number so it gets logged in the repro command. * Scripts/jsc-stress-test-helpers/js-executable-allocation-fuzz: * Scripts/run-jsc-stress-tests: 2021-06-02 Jonathan Bedard [GitHub] Delete unused scripts https://bugs.webkit.org/show_bug.cgi?id=226519 Reviewed by Aakash Jain. * Scripts/configure-github-as-upstream: Removed. * Scripts/sync-master-with-upstream: Removed. 2021-05-23 Ryosuke Niwa Add CheckedPtr https://bugs.webkit.org/show_bug.cgi?id=226158 Reviewed by Antti Koivisto. Added basic tests. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/CheckedPtr.cpp: Added. (TestWebKitAPI::CheckedObject): Added. (TestWebKitAPI::DerivedCheckedObject): Added. (WTF_CheckedPtr.Basic): (WTF_CheckedPtr.DerivedClass): (WTF_CheckedPtr.HashSet): 2021-06-01 Darin Adler Remove https://bugs.webkit.org/show_bug.cgi?id=226437 Reviewed by Chris Dumez. * : Removed include of . 2021-06-01 Chris Dumez Rename Checked::unsafeGet() to Checked::value() https://bugs.webkit.org/show_bug.cgi?id=226514 Reviewed by Darin Adler. Rename Checked::unsafeGet() to Checked::value(). The "unsafeGet" naming is confusing as this function isn't really unsafe since it will crash if the value has overflowed. Also add an `operator T()` to implicitly convert a Checked to its underlying type without needing to call value(). * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp: (TestWebKitAPI::CheckedArithmeticTester::run): (TestWebKitAPI::AllowMixedSignednessTest::run): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/IntRectTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/IntSizeTests.cpp: (TestWebKitAPI::TEST): 2021-06-01 Jean-Yves Avenard MediaSession.coordinator should not be optional, relying on coordinator readyState change instead https://bugs.webkit.org/show_bug.cgi?id=226328 rdar://77461335 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: (TestWebKitAPI::MediaSessionCoordinatorTest::createCoordinator): Change test to match new API, using coordinatorstatechange event instead. * TestWebKitAPI/Tests/WebKitCocoa/media-remote.html: 2021-06-01 Chris Fleizach REGRESSION: (r277971) TestWebKitAPI.WebKit.AccessibilityReduceMotion is timing out https://bugs.webkit.org/show_bug.cgi?id=226505 Reviewed by Darin Adler. The distributed notification for RM is no longer re-posted within WebKit, so we don't need to listen for it. * TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm: (TEST): (notificationCallback): Deleted. 2021-06-01 Jonathan Bedard [run-webkit-tests] Move helper out of Port instance https://bugs.webkit.org/show_bug.cgi?id=226344 Reviewed by Dewei Zhu. The "helper" is a popen object, which are not pickleable, and cannot belong to an instantiated port object. * Scripts/webkitpy/port/base.py: (Port): Make helper class variable. (Port.__init__): (Port.stop_helper): All classes should share the same code to stop the helper process. * Scripts/webkitpy/port/mac.py: (MacPort.start_helper): Use class variable. (MacPort.stop_helper): Moved to base class.. 2021-06-01 Fujii Hironori Sync Tools/win/DLLLauncher/DLLLauncherMain.cpp with Source/JavaScriptCore/shell/DLLLauncherMain.cpp https://bugs.webkit.org/show_bug.cgi?id=226451 Reviewed by Don Olmstead. Tools/win/DLLLauncher/DLLLauncherMain.cpp and Source/JavaScriptCore/shell/DLLLauncherMain.cpp should be same. But, r231403 changed only JavaScriptCore's one. r178530 changed only Tools's one. r178530 added flags for Debug CRT Heap. However, WebKit isn't using Debug CRT Heap nowadays. And, using _CRTDBG_CHECK_ALWAYS_DF flag makes WebKit unbearably slow. Just copied JavaScriptCore's one to overwrite Tools's one. * win/DLLLauncher/DLLLauncherMain.cpp: (copyEnvironmentVariable): (getStringValue): (applePathFromRegistry): (appleApplicationSupportDirectory): (iTunesDirectory): (prependPath): (fatalError): (directoryExists): (modifyPath): (getLastErrorString): (wWinMain): 2021-06-01 Chris Dumez REGRESSION (iOS 14.5): Can't go back and render previous page properly after "location.href" https://bugs.webkit.org/show_bug.cgi?id=226323 Reviewed by Alex Christensen. New API test written by Alex Christensen to cover this case. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-06-01 Aakash Jain Print bot configuration in build.webkit.org builds https://bugs.webkit.org/show_bug.cgi?id=226353 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/factories.py: (Factory.__init__): Added PrintConfiguration step. * CISupport/build-webkit-org/steps.py: (PrintConfiguration): Copied from ews code, step to print configuration. (PrintConfiguration.__init__): (PrintConfiguration.run): (PrintConfiguration.convert_build_to_os_name): (PrintConfiguration.getResultSummary): * CISupport/build-webkit-org/steps_unittest.py: Added unit-tests. 2021-05-30 Wenson Hsieh [iOS] UI process crashes when deallocating WKWebView in a script message handler during an active touch event https://bugs.webkit.org/show_bug.cgi?id=226426 rdar://75425319 Reviewed by Darin Adler. Add a new API test that exercises the crash. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/TouchEventTests.mm: Added. (-[TouchEventScriptMessageHandler userContentController:didReceiveScriptMessage:]): (-[WKWebView touchEventGestureRecognizer]): (TestWebKitAPI::updateSimulatedTouchEvent): (TestWebKitAPI::simulatedTouchEvent): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/ios/active-touch-events.html: Added. * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView textInputContentView]): (-[TestWKWebView textInputContentView]): Deleted. * TestWebKitAPI/ios/UIKitSPI.h: 2021-05-30 Darin Adler Remove WTF::Optional synonym for std::optional, using that class template directly instead https://bugs.webkit.org/show_bug.cgi?id=226433 Reviewed by Chris Dumez. * : Let the do-webcore-rename script rename Optional<> to std::optional<>. 2021-05-30 Jean-Yves Avenard REGRESSION (r274460): [macOS] TestWebKitAPI.Fullscreen.WKViewDelegate is timing out https://bugs.webkit.org/show_bug.cgi?id=223282 rdar://75495585 Reviewed by Darin Adler. Remove WKViewDelegate test. This test specifically tests the old, C-API delegate callback that’s not exposed as API and no one uses. This feature is explicitly deprecated and no-one uses it. * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: Delete test 2021-05-29 Ryan Haddad [webkitpy] Add a delay between successive iOS simulator boots https://bugs.webkit.org/show_bug.cgi?id=226376 Reviewed by Darin Adler. In certain configurations, rapidly attempting to boot multiple iOS simulators can cause them to fail to boot. Add a 10 second delay to ensure that each one has a chance to initialize before moving to the next one. * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager._boot_device): 2021-05-29 Chris Dumez Adopt clang thread safety annotations in WTF::DataMutex https://bugs.webkit.org/show_bug.cgi?id=226431 Reviewed by Darin Adler. Update API test due to DataMutex API changes. * TestWebKitAPI/Tests/WTF/DataMutex.cpp: (TestWebKitAPI::TEST): 2021-05-29 Sam Weinig Split calc() related files into 1-class per file structure https://bugs.webkit.org/show_bug.cgi?id=226421 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: Update test to include additonal header now needed. 2021-05-28 Darin Adler Clients of optional should use has_value instead of relying on hasValue macro https://bugs.webkit.org/show_bug.cgi?id=226395 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp: Use has_value. * TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp: Ditto. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp: Ditto. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (AudioRenderingWebViewTest::handleStart): Ditto. * WebKitTestRunner/GeolocationProviderMock.cpp: (WTR::GeolocationProviderMock::setPosition): Ditto. * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView canPerformAction:withSender:]): Ditto. 2021-05-28 Alex Christensen Punycode encode U+0BE6 when not in context of other Tamil characters https://bugs.webkit.org/show_bug.cgi?id=226409 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): 2021-05-28 Zhifei Fang [JSC] Escape $ only when run with SSH https://bugs.webkit.org/show_bug.cgi?id=226385 Reviewed by Alexey Proskuryakov. * Scripts/run-jsc-stress-tests: 2021-05-28 Matt Gilligan Prevent resetting scroll position in unnecessary cases during page load https://bugs.webkit.org/show_bug.cgi?id=226338 rdar://75334651 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: (TestWebKitAPI::TEST): 2021-05-28 Zhifei Fang [JSC] Fix run-jsc-stress-tests missing escape $ https://bugs.webkit.org/show_bug.cgi?id=226385 Reviewed by Alexey Proskuryakov. * Scripts/run-jsc-stress-tests: 2021-05-27 Devin Rousso Sampled Page Top Color: allow snapshotting of elements with CSS animations/transitions if they're paused https://bugs.webkit.org/show_bug.cgi?id=226313 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (waitForSampledPageTopColorToChange): Added. (waitForSampledPageTopColorToChangeForHTML): (TEST.SampledPageTopColor.HitTestBeforeCSSTransition): Added. (TEST.SampledPageTopColor.HitTestDuringCSSTransition): Added. (TEST.SampledPageTopColor.HitTestAfterCSSTransition): Added. (TEST.SampledPageTopColor.HitTestBeforeCSSAnimation): Added. (TEST.SampledPageTopColor.HitTestDuringCSSAnimation): Added. (TEST.SampledPageTopColor.HitTestAfterCSSAnimation): Added. (TEST.SampledPageTopColor.HitTestCSSAnimation): Deleted. 2021-05-27 Jonathan Bedard [webkitcorey] Gracefully handle CNTRL-C in TaskPool https://bugs.webkit.org/show_bug.cgi?id=226238 Reviewed by Dewei Zhu. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (_BiDirectionalQueue.close): Tear-down queue objects while suppressing any logging. (_Process.handler): Both SIGTERM and SIGINT signals should stop worker processes. (_Process.main): Add SIGINT handler, explicitly close queue. (TaskPool.__init__): Defer worker and queue construction to context manager so that we do not have an instantiated but invalid queue if pipes are broken by children processes. (TaskPool.__enter__): Construct worker processes. (TaskPool.do): Only catch Queue.Empty exception. (TaskPool.__exit__): Explicitly close queue, reset workers and queue. 2021-05-27 Darin Adler Next step toward using std::optional directly instead of through WTF::Optional typedef https://bugs.webkit.org/show_bug.cgi?id=226280 Reviewed by Chris Dumez. * Scripts/do-webcore-rename: Use script to rename valueOr, WTF::nullopt, WTF::nullopt_t, WTF::Optional, WTF::makeOptional, and makeOptional. Other renamings can't necessarily be done by the script and so will be done in later passes. * : Accept the renaming done by do-webcore-rename. 2021-05-27 Jonathan Bedard [webkitpy] Use existing signal handler when printing stacktrace https://bugs.webkit.org/show_bug.cgi?id=226236 Reviewed by Dewei Zhu. * Scripts/webkitpy/common/interrupt_debugging.py: (log_stack_trace_on_signal): Use the same implementation for SIGTERM and SIGINT signals, call existing handler after logging stack trace. (log_stack_trace_on_term): Deleted. (log_stack_trace_on_ctrl_c): Deleted. * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (main): Use the new log_stack_trace_on_signal function. 2021-05-27 Fujii Hironori [run-webkit-tests][Win] Strip PHP support from webserver https://bugs.webkit.org/show_bug.cgi?id=226287 Reviewed by Jonathan Bedard. We don't have any PHP tests now. * Scripts/webkitpy/port/base.py: (Port._apache_version): (Port._apache_config_file_name_for_platform): (Port._win_php_version): Deleted. * Scripts/webkitpy/port/port_testcase.py: 2021-05-27 Tim Horton Introduce BifurcatedGraphicsContext https://bugs.webkit.org/show_bug.cgi?id=226318 Reviewed by Sam Weinig. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: Added. (TestWebKitAPI::TEST): 2021-05-27 Peng Liu Calling -[WKWebView _closeAllMediaPresentations] crashes https://bugs.webkit.org/show_bug.cgi?id=226305 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm: (TEST): 2021-05-27 Angelos Oikonomopoulos [JSC] Implement high-level retry loop for run-jsc-stress-tests https://bugs.webkit.org/show_bug.cgi?id=225803 Reviewed by Adrian Perez de Castro. Now that we have information on which tests produced a result and which tests were never heard of, introduce retry logic for the incomplete tests. This should only modify the behavior when using --gnu-parallel-runner. The issue here is that the MIPS boards currently in use for JSC testing routinely crash and, often enough, end up with filesystem corruption and need to have their R/W storage reinitialized. Work around this by re-executing the tests that we weren't able to get a result for. When some tests failed to complete, go through the process of remote initilization (copying over and unpacking the bundle) from scratch, so that remotes that had their remoteDirectory wiped will get back into play. To make this more efficient, introduce in-band signaling to let run-jsc-stress-tests know that a remote lost its state. In response, we kill the GNU parallel process and re-initialize all boards. This helps for buildbot workers that only have a few remote boards assigned and apparently also works around a bug in GNU parallel 20161222 (currently the most widely deployed version) which causes it to run out of open files and get stuck in a busy loop. While here, make run-jsc-stress-tests more robust against corrupted status files, i.e. ignore empty ones (observed in practice) and use a regex to verify the contents of non-empty state files. For consistency, use the same logic for parsing status files when doing local runs. In testing with two remotes, run-jsc-stress-tests was able to recover from either one or both of its remotes rebooting and wiping their local storage in the middle of a test run. * Scripts/run-jsc-stress-tests: 2021-05-26 Jean-Yves Avenard Make MediaSession readystate enums all lowercase https://bugs.webkit.org/show_bug.cgi?id=226213 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: (TestWebKitAPI::TEST_F): 2021-05-26 Stephan Szabo Cleanup temporary directory after TestWTF's FileSystemTests https://bugs.webkit.org/show_bug.cgi?id=226300 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: move to deleteNonEmptyDirectory during test cleanup 2021-05-26 Don Olmstead [CMake] Support USE_ANGLE_EGL on additional platforms https://bugs.webkit.org/show_bug.cgi?id=224888 Reviewed by Ken Russell. Generate source listings for Metal and OpenGL ANGLE backends. * Scripts/update-angle: 2021-05-26 Jonathan Bedard [webkitpy] Refactor SimulatorDevice (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=225158 Unreviewed follow-up fix. * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDevice.is_usable): When no UI Manager service is defined, we should early exit. 2021-05-26 Aakash Jain Do not skip SetCommitQueueMinusFlagOnPatch step on EWS test instances https://bugs.webkit.org/show_bug.cgi?id=226289 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (SetCommitQueueMinusFlagOnPatch.start): (SetCommitQueueMinusFlagOnPatch.doStepIf): Deleted. 2021-05-26 Jonathan Bedard [run-webkit-tests] Strip php support from webserver (Apache) https://bugs.webkit.org/show_bug.cgi?id=226032 Reviewed by Adrian Perez de Castro. * Scripts/webkitpy/port/base.py: (Port._apache_config_file_name_for_platform): Use explicit Darwin httpd.conf. (Port._is_darwin_php_version_7): Deleted. (Port._darwin_php_version): Deleted. 2021-05-26 Jonathan Bedard [test-lldb-webkit] Update for Xcode 12.5 https://bugs.webkit.org/show_bug.cgi?id=226115 Reviewed by Darin Adler. * lldb/lldb_webkit_unittest.py: (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string): Use unicode directly. (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string): Ditto. (TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string): Ditto. (TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): Ditto. 2021-05-26 Sam Sneddon Fix remaining test-webkitpy{,-python2} --all --integration-tests failures https://bugs.webkit.org/show_bug.cgi?id=226242 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: (GitTest.test_remote_branch_ref): Allow main (GitTest.test_native_branch): Allow main (SVNTest.clean_bogus_dir): Deleted. (SVNTest.test_diff_for_file_with_existing_bogus_dir): Deleted. (SVNTest.test_diff_for_file_with_missing_bogus_dir): Deleted. * Scripts/webkitpy/common/checkout/scm/svn.py: (SVN._setup_bogus_dir): Use tempfile (SVN._teardown_bogus_dir): Make no-op when no bogus dir exists (SVN._bogus_dir_name): Deleted. 2021-05-25 Chris Fleizach AX: Improve string conversion in AccessibilityController::injectAccessibilityPreference https://bugs.webkit.org/show_bug.cgi?id=226239 Reviewed by Darin Adler. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::injectAccessibilityPreference): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/cocoa/StringFunctionsCocoa.h: Added. (WTR::toWK): 2021-05-25 Tim Horton Virtualize GraphicsContext https://bugs.webkit.org/show_bug.cgi?id=226170 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): 2021-05-25 Mark Lam Raise jitMemoryReservationSize for ftl-no-cjit-small-pool* tests. https://bugs.webkit.org/show_bug.cgi?id=226205 Rubber-stamped by Saam Barati. The bump to 75K didn't relieve the jsc EWS bot. Trying a bump to 100K this time. * Scripts/run-jsc-stress-tests: 2021-05-25 Keith Miller Wasm low memory tests should have a larger executable pool https://bugs.webkit.org/show_bug.cgi?id=226233 Reviewed by Saam Barati. With some other recent JSC changes we can sometimes go over the allocation pool we set aside. Let's bump the number. * Scripts/run-jsc-stress-tests: 2021-05-25 Sam Sneddon Run webkitpy integration tests under pytest by default https://bugs.webkit.org/show_bug.cgi?id=226017 Reviewed by Jonathan Bedard. This involves adding a variety of new xfail annotations and moving some tests to be serial to avoid flakiness. * Scripts/webkitpy/common/config/committers_unittest.py: (CommittersTest): * Scripts/webkitpy/conftest.py: (pytest_addoption): Remove --run-integration (pytest_collection_modifyitems): Remove --run-integration * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.serial_test_basic): (RunTest.serial_test_batch_size): (RunTest.serial_test_dryrun): (RunTest.serial_test_full_results_html): (RunTest.serial_test_no_order_with_directory_entries_in_natural_order): (RunTest.serial_test_gc_between_tests): (RunTest.serial_test_check_for_world_leaks): (RunTest.serial_test_complex_text): (RunTest.serial_test_threaded): (RunTest.serial_test_run_force): (RunTest.serial_test_run_singly): (RunTest.serial_test_skip_failing_tests): (RunTest.serial_test_run_singly_actually_runs_tests): (RunTest.serial_test_stderr_is_saved): (RunTest.serial_test_results_directory_absolute): (RunTest.serial_test_results_directory_default): (RunTest.serial_test_results_directory_relative): (RunTest.serial_test_run_order__inline): (RunTest.serial_test_additional_platform_directory): (RunTest.serial_test_no_http_and_force): (RunTest.serial_test_no_http_tests): (RunTest.serial_test_platform_tests_are_found): * Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py: (BaseTest): (HTTPServerTest): (HTTPServerTest.integration_test_server__normal): (HTTPServerTest.integration_test_server__fails): (HTTPServerTest.integration_test_port_and_root): (WebsocketserverTest): (WebsocketserverTest.integration_test_server__normal): (WebsocketserverTest.integration_test_server__fails): (WebsocketserverTest.integration_test_port_and_root): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase): * Scripts/webkitpy/test/main_unittest.py: (TesterTest): * Scripts/webkitpy/test/markers.py: (skip): Add skip * Scripts/webkitpy/tool/steps/haslanded_unittest.py: (HasLandedTest): Always skip this, as it seems to fail always 2021-05-24 Darin Adler Switch from WTF::Optional to std::optional https://bugs.webkit.org/show_bug.cgi?id=211674 Reviewed by Chris Dumez. * Scripts/webkitpy/style/checker.py: Removed exceptions from the WTF::Optional style rule for WebRTC. * Scripts/webkitpy/style/checkers/cpp.py: Removed check_wtf_optional. * Scripts/webkitpy/style/checkers/cpp_unittest.py: Removed test_wtf_optional. * TestWebKitAPI/CMakeLists.txt: Removed Optional.cpp. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto. * TestWebKitAPI/Tests/WTF/Optional.cpp: Removed. * TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp: Updated test to not rely on non-standard aspects of moving from an optional. Instead check the retain count to make sure we have moved successfully. * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: Ditto. 2021-05-25 Lauro Moura [WebDriver][WPE] Support running w3c webdriver tests with Cog https://bugs.webkit.org/show_bug.cgi?id=226203 Reviewed by Adrian Perez de Castro. Using the same infrastructure as the MiniBrowser, through ENABLE_COG. Selenium not yet supported, as the browserName capability is hardcoded as MiniBrowser in selenium's test codebase. * Scripts/webkitpy/port/wpe.py: (WPEPort.browser_env): Factored out of run_minibrowser to be used in the WebDriver driver module. (WPEPort.run_minibrowser): * Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: (WebDriverWPE.browser_args): (WebDriverWPE.browser_env): 2021-05-24 Chris Dumez Stop using UncheckedLock in Condition API tests https://bugs.webkit.org/show_bug.cgi?id=226198 Reviewed by Sam Weinig. Stop using UncheckedLock in Condition API tests. This is a step towards phasing out UncheckedLock in favor the Lock so that we can benefit from Clang Thread Safety Analysis. * TestWebKitAPI/Tests/WTF/Condition.cpp: 2021-05-24 Mark Lam Raise jitMemoryReservationSize for ftl-no-cjit-small-pool* tests. https://bugs.webkit.org/show_bug.cgi?id=226205 Reviewed by Saam Barati. Raise jitMemoryReservationSize for ftl-no-cjit-small-pool* tests from 50000 to 75000. The 50000 number was picked years ago to be a size that is small, but is still large enough for JSC tests to pass. 50000 appears to not be sufficient anymore. This has caused some JSC tests to fail intermittently on the EWS bots. Raising the size to 75000 to give the tests a little more room to work in. * Scripts/run-jsc-stress-tests: 2021-05-24 Chris Fleizach AX: Fix build failure for WK API WTF::String usage https://bugs.webkit.org/show_bug.cgi?id=226204 Reviewed by Tim Horton. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::injectAccessibilityPreference): 2021-05-24 Sam Weinig Convert DestinationColorSpace from an enum to class wrapping a platform color space (CGColorSpaceRef for CG ports, etc.) https://bugs.webkit.org/show_bug.cgi?id=226143 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Upate test to use new DestinationColorSpace type. 2021-05-24 Stephan Szabo [PlayStation] Update scripts for JSC test changes https://bugs.webkit.org/show_bug.cgi?id=226181 Reviewed by Ross Kirsling. Update the scripts to pass the status file location and unique test id into the runner for handling some crash cases, and update the status command because the status is written as a number in our case rather than being the return type from executing the program directly. * Scripts/webkitruby/jsc-stress-test-writer-playstation.rb: 2021-05-24 Chris Fleizach AX: Settings: Increase contrast isn't detected in browser until an additional setting is applied https://bugs.webkit.org/show_bug.cgi?id=225909 Reviewed by Per Arne Vollan. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::injectAccessibilityPreference): * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl: * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::injectAccessibilityPreference): 2021-05-24 Darin Adler Remove StringBuilder::appendLiteral https://bugs.webkit.org/show_bug.cgi?id=226137 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WTF/StringBuilder.cpp: Use append instead of appendLiteral. * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::createCommand): Use makeString instead of StringBuilder. * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Made lots of fixes to code inside #if TEST_OUTPUT, which hasn't compiled in a long time. Still not 100% there, but closer. * TestWebKitAPI/Tests/WebCore/TextCodec.cpp: (TestWebKitAPI::testDecode): Use append instead of appendLiteral. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::helpText const): Ditto. 2021-05-24 Commit Queue Unreviewed, reverting r277940. https://bugs.webkit.org/show_bug.cgi?id=226182 Caused Safari crash under IPC::typeFromCFTypeRef Reverted changeset: "Convert DestinationColorSpace from an enum to class wrapping a platform color space (CGColorSpaceRef for CG ports, etc.)" https://bugs.webkit.org/show_bug.cgi?id=226143 https://trac.webkit.org/changeset/277940 2021-05-24 Chris Dumez Drop CheckedLock / CheckedCondition aliases https://bugs.webkit.org/show_bug.cgi?id=226176 Reviewed by Kate Cheney. Drop CheckedLock / CheckedCondition aliases now that they are the default. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/CheckedConditionTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/CheckedLockTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/Condition.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Lock.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AXThread::createThreadIfNeeded): 2021-05-24 Angelos Oikonomopoulos Be resilient against remote failure when determining the native architecture https://bugs.webkit.org/show_bug.cgi?id=226009 Reviewed by Jonathan Bedard. Change determineNativeArchitecture to not return an empty string if the first remote host happens to be down. Instead, check every remote host in turn until one responds. Returning an empty string ended up passing an empty parameter to --arch when invoking run-jsc-stress-tests, which resulted in an inappropriate set of tests being selected, leading to occasional partial but massive test failures. * Scripts/run-javascriptcore-tests: (runTest): (runJSCStressTests): * Scripts/webkitdirs.pm: (determineNativeArchitecture): (determineArchitecture): (nativeArchitecture): 2021-05-23 Chris Dumez Make CheckedLock the default Lock https://bugs.webkit.org/show_bug.cgi?id=226157 Reviewed by Darin Adler. Make CheckedLock the default Lock so that we get more benefits from Clang Thread Safety Analysis. Note that CheckedLock 100% relies on the existing Lock implementation and merely adds the clang anotations for thread safety. That this patch does is: 1. Rename the Lock class to UncheckedLock 2. Rename the CheckedLock class to Lock 3. Rename the Condition class to UncheckedCondition 4. Rename the CheckedCondition class to Condition 5. Update the types of certain variables from Lock / Condition to UncheckedLock / UncheckedCondition if I got a build failure. Build failures are usually caused by the following facts: - Locker doesn't subclass AbstractLocker which a lot of JSC code passes as argument - Locker has no move constructor - Locker cannot be constructed from a lock pointer, only a reference For now, CheckedLock and CheckedCondition remain as aliases to Lock and Condition, in their respective CheckedLock.h / CheckedCondition.h headers. I will drop them in a follow-up to reduce patch size. I will also follow-up to try and get rid of as much usage of UncheckedLock and UncheckedCondition as possible. I did not try very hard in this patch to reduce patch size. * TestWebKitAPI/Tests/WTF/CheckedConditionTest.cpp: * TestWebKitAPI/Tests/WTF/Condition.cpp: * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AXThread::createThreadIfNeeded): 2021-05-23 Sam Weinig Convert DestinationColorSpace from an enum to class wrapping a platform color space (CGColorSpaceRef for CG ports, etc.) https://bugs.webkit.org/show_bug.cgi?id=226143 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Upate test to use new DestinationColorSpace type. 2021-05-22 Chris Dumez Replace LockHolder with Locker in local variables https://bugs.webkit.org/show_bug.cgi?id=226133 Reviewed by Darin Adler. Replace LockHolder with Locker in local variables. It is shorter and it allows switching the lock type more easily since the compiler with deduce the lock type T for Locker. * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: (TestWebKitAPI::DeterministicScheduler::ThreadContext::waitMyTurn): (TestWebKitAPI::DeterministicScheduler::ThreadContext::yieldToThread): 2021-05-22 Adrian Perez de Castro [Tools][run-webkit-tests] Remove more leftover tests webserver PHP remains https://bugs.webkit.org/show_bug.cgi?id=226089 Reviewed by Alexey Proskuryakov. Remove leftover PHP module configurations used on Linux now that PHP is not used anymore. * Scripts/webkitpy/port/base.py: (Port._debian_php_version): Removed. (Port._fedora_php_version): Removed. (Port._is_fedora_php_version_7): Removed. (Port._apache_config_file_name_for_platform): Modofied to not use the removed helper methods. * gtk/install-dependencies: Remove PHP packages. * wpe/install-dependencies: Ditto. 2021-05-22 Commit Queue Unreviewed, reverting r277913. https://bugs.webkit.org/show_bug.cgi?id=226140 Caused multiple layout-test crash on mac debug queues Reverted changeset: "Replace LockHolder with Locker in local variables" https://bugs.webkit.org/show_bug.cgi?id=226133 https://trac.webkit.org/changeset/277913 2021-05-22 Julian Gonzalez [ Debug ] TestWebKitAPI.IPCTestingAPI.CanDetectNilReplyBlocks (API-tests) is a constant crash https://bugs.webkit.org/show_bug.cgi?id=226125 Reviewed by Ryosuke Niwa. Turn this test off for Debug. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: 2021-05-21 Chris Dumez Replace LockHolder with Locker in local variables https://bugs.webkit.org/show_bug.cgi?id=226133 Reviewed by Darin Adler. Replace LockHolder with Locker in local variables. It is shorter and it allows switching the lock type more easily since the compiler with deduce the lock type T for Locker. * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/glib/WorkQueueGLib.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: (TestWebKitAPI::DeterministicScheduler::ThreadContext::waitMyTurn): (TestWebKitAPI::DeterministicScheduler::ThreadContext::yieldToThread): 2021-05-21 Chris Dumez Stop using holdLock() in WebKit/WebKitLegacy/Tools as it is not compatible with Clang thread safety analysis https://bugs.webkit.org/show_bug.cgi?id=226127 Reviewed by Alex Christensen. * DumpRenderTree/JavaScriptThreading.cpp: (runJavaScriptThread): (startJavaScriptThreads): (stopJavaScriptThreads): * Scripts/webkitpy/style/checkers/cpp.py: (check_lock_guard): * Scripts/webkitpy/style/checkers/cpp_unittest.py: (WebKitStyleTest.test_lock_guard): * TestWebKitAPI/Tests/WTF/Condition.cpp: * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp: (TestWebKitAPI::testThreadGroup): (TestWebKitAPI::TEST): * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AXThread::dispatch): (WTR::AXThread::dispatchFunctionsFromAXThread): * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AXThread::initializeRunLoop): 2021-05-21 Aakash Jain Run layout tests in stress mode for 10 iterations on regular EWS layout-test queues https://bugs.webkit.org/show_bug.cgi?id=226097 Reviewed by Jonathan Bedard. * CISupport/ews-build/factories.py: * CISupport/ews-build/factories_unittest.py: * CISupport/ews-build/steps.py: (AnalyzePatch.getResultSummary): (FindModifiedLayoutTests.__init__): (FindModifiedLayoutTests.start): (RunWebKitTestsInStressMode): (RunWebKitTestsInStressMode.__init__): (RunWebKitTestsInStressMode.setLayoutTestCommand): (RunWebKitTestsInStressMode.doStepIf): * CISupport/ews-build/steps_unittest.py: 2021-05-21 Eric Carlson [Cocoa] Update AudioSession buffer size handling https://bugs.webkit.org/show_bug.cgi?id=225927 rdar://76920375 Reviewed by Jer Noble. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/audio-buffer-size.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/AudioBufferSize.mm: Added. (TestWebKitAPI::waitForBufferSizeChange): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: (TEST_F): 2021-05-21 Sam Sneddon Fix Python 3.6+ DeprecationWarnings about unknown escapes https://bugs.webkit.org/show_bug.cgi?id=226018 Reviewed by Jonathan Bedard. Fix Python 3.6+ DeprecationWarnings about unknown escapes * CISupport/build-webkit-org/loadConfig.py: (getTagsForBuilder): * CISupport/build-webkit-org/steps.py: (RunGLibAPITests.commandComplete): (RunWebDriverTests.commandComplete): * CISupport/ews-app/ews/common/bugzilla.py: (BugzillaBeautifulSoup._parse_attachment_ids_request_query): * CISupport/ews-app/ews/common/buildbot.py: (Buildbot._get_display_name_from_builder_name): * CISupport/ews-build/loadConfig.py: (getTagsForBuilder): * CISupport/ews-build/steps.py: (CleanUpGitIndexLock.start): (FindModifiedLayoutTests): (BuildLogLineObserver.__init__): (PushCommitToWebKitRepo): * CISupport/ews-build/steps_unittest.py: * Scripts/ic-stats.py: * Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py: (Svn): * Scripts/webkitpy/common/checkout/changelog.py: (parse_bug_id_from_changelog): (ChangeLogEntry): (update_with_unreviewed_message): (set_reviewer): * Scripts/webkitpy/common/checkout/diff_parser.py: (git_diff_to_svn_diff): * Scripts/webkitpy/common/checkout/diff_test_data.py: * Scripts/webkitpy/common/checkout/scm/commitmessage.py: (_first_non_empty_line_after_index): (CommitMessage.description): * Scripts/webkitpy/common/checkout/scm/git.py: (Git.commit_success_regexp): (Git.timestamp_of_revision): (Git.git_commit_from_svn_revision): * Scripts/webkitpy/common/checkout/scm/scm.py: (SCM.strip_r_from_svn_revision): * Scripts/webkitpy/common/checkout/scm/svn.py: (SVN.commit_success_regexp): (SVN.revisions_changing_file): * Scripts/webkitpy/common/checksvnconfigfile.py: (check): * Scripts/webkitpy/common/config/contributionareas.py: (ContributionAreas._split_camelcase): * Scripts/webkitpy/common/config/urls.py: * Scripts/webkitpy/common/find_files_unittest.py: (TestWinNormalize.assert_filesystem_normalizes): * Scripts/webkitpy/common/net/bugzilla/bug.py: (Bug.commit_revision): * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: (BugzillaQueries._parse_attachment_ids_request_query): (Bugzilla._parse_bug_id_from_attachment_page): (Bugzilla._parse_attachment_id_from_add_patch_to_bug_response): (Bugzilla._check_create_bug_response): * Scripts/webkitpy/common/net/buildbot/buildbot.py: (BuildBot._parse_current_build_cell): * Scripts/webkitpy/common/net/credentials.py: (Credentials._parse_security_tool_output): * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py: (ParsedJSONResultsTest): * Scripts/webkitpy/common/system/crashlogs.py: (CrashLogs.get_timestamp_from_log): * Scripts/webkitpy/common/system/crashlogs_unittest.py: * Scripts/webkitpy/common/system/platforminfo.py: (PlatformInfo.available_sdks): * Scripts/webkitpy/common/system/user.py: (User._wait_on_list_response): * Scripts/webkitpy/common/watchlist/watchlistparser.py: (WatchListParser._rule_definitions_as_set): * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser): (TestExpectationParser._parse_modifiers): (TestExpectationParser._tokenize_line): * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): * Scripts/webkitpy/port/base.py: (Port._natural_sort_key): * Scripts/webkitpy/port/driver.py: (DriverOutput): (Driver._check_for_driver_timeout): (Driver._check_for_driver_crash_or_unresponsiveness): * Scripts/webkitpy/port/image_diff.py: (ImageDiffer._read): * Scripts/webkitpy/port/win.py: (WinPort.write_registry_value): * Scripts/webkitpy/pytest.ini: * Scripts/webkitpy/style/checker.py: (CheckerDispatcher._should_skip_file_path): * Scripts/webkitpy/style/checkers/changelog.py: (ChangeLogChecker.check_entry): * Scripts/webkitpy/style/checkers/cmake.py: (CMakeChecker._process_line): (CMakeChecker._check_no_space_cmds): (CMakeChecker._check_one_space_cmds): (CMakeChecker._check_non_lowercase_cmd): (CMakeChecker._check_list_order): * Scripts/webkitpy/style/checkers/cpp.py: (FileInfo.repository_name): (check_for_non_standard_constructs): (check_spacing): (check_language): * Scripts/webkitpy/style/checkers/cpp_unittest.py: * Scripts/webkitpy/style/checkers/jstest.py: (map_functions_to_dict): (strip_trailing_blank_lines_and_comments): * Scripts/webkitpy/style/checkers/messagesin.py: (MessagesInChecker.check_WTF_prefix): * Scripts/webkitpy/style/patchreader.py: (PatchReader.check): * Scripts/webkitpy/test/runner.py: * Scripts/webkitpy/test/runner_unittest.py: (FakeLoader.__init__): * Scripts/webkitpy/tool/commands/analyzechangelog.py: (AnalyzeChangeLog._enumerate_changelogs): * Scripts/webkitpy/tool/commands/queries.py: (PrintBaselines.__init__): (FindResolvedBugs.execute): * Scripts/webkitpy/tool/commands/upload.py: (MarkBugFixed._determine_bug_id_and_svn_revision): * Scripts/webkitpy/tool/steps/promptforbugortitle.py: (PromptForBugOrTitle.run): * Scripts/webkitpy/w3c/test_converter.py: (_W3CTestConverter.__init__): (_W3CTestConverter.read_webkit_prefixed_css_property_list): (_W3CTestConverter.legacy_read_webkit_prefixed_css_property_list): * Scripts/webkitpy/w3c/test_parser.py: (TestParser.support_files): * lldb/lldb_dump_class_layout.py: (LLDBDebuggerInstance._get_first_file_architecture): 2021-05-20 Julian Gonzalez WKRemoteObjectRegistry _invokeMethod needs to check for nil completionHandlers https://bugs.webkit.org/show_bug.cgi?id=225941 Reviewed by Ryosuke Niwa. Add an IPC test with a nil (really malformed) completion handler that makes sure the invocation is not performed. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: (-[IPCTestingAPIDelegate sayHello:completionHandler:]): (-[IPCTestingAPIDelegate sayHelloWasCalled]): (TEST): 2021-05-20 Alex Christensen Unreviewed, reverting r277606. rdar://78283324 Need to wait for more projects to migrate Reverted changeset: "[Cocoa] Remove prototype loadSimulatedRequest methods" https://bugs.webkit.org/show_bug.cgi?id=223658 https://commits.webkit.org/r277606 2021-05-20 Kate Cheney Mark ServiceWorkerThreadProxy with a default app-bound value https://bugs.webkit.org/show_bug.cgi?id=223201 Reviewed by Youenn Fablet. Test coverage. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (-[SWAppBoundRequestMessageHandler userContentController:didReceiveScriptMessage:]): 2021-05-20 Aakash Jain Use Python 3 for running various scripts on EWS https://bugs.webkit.org/show_bug.cgi?id=226041 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: Use Python 3. (CleanBuild): (TriggerCrashLogSubmission): (WaitForCrashCollection): (ArchiveBuiltProduct): (ExtractBuiltProduct): * CISupport/ews-build/steps_unittest.py: Updated unit-tests. 2021-05-20 Robin Morisset The test of SmallSet.cpp should pass the right HashTrait to the HashSet it uses as a reference https://bugs.webkit.org/show_bug.cgi?id=226027 Reviewed by Mark Lam. SmallSet allows all values except for the max value. So we test it on small values, including 0. HashSet by default forbids 0, so it made the test crash. We can trivially fix it by passing UnsignedWithZeroKeyHashTraits, which allows everything which is not max() or max()-1 * TestWebKitAPI/Tests/WTF/SmallSet.cpp: (TestWebKitAPI::testSmallSetOfUnsigned): 2021-05-20 Sam Sneddon Add tox file for webkitpy https://bugs.webkit.org/show_bug.cgi?id=226016 Reviewed by Jonathan Bedard. * Scripts/webkitpy/tox.ini: Added. 2021-05-20 Kate Cheney Unreviewed contributor name update. * Scripts/webkitpy/common/config/contributors.json: 2021-05-20 Jonathan Bedard [webkitpy] Forward booted simulators to children processes https://bugs.webkit.org/show_bug.cgi?id=225933 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/api_tests/runner.py: (setup_shard): Set DeviceManager global variable from parent process. (Runner.command_for_port): Use Port's device manager instead of simulated device manager. (Runner.run): Pass DeviceManager details to children processes. 2021-05-20 Sam Sneddon Store whether a test is slow on TestInput https://bugs.webkit.org/show_bug.cgi?id=224563 Reviewed by Jonathan Bedard. Additionally, notably, this makes a TestResult store a TestInput rather than a test_name string. With that there, we then don't need to punch through multiple layers to find out whether a test is slow or not. Note that replacing the test_name with a Test or TestInput as part of removing the 1:1 relationship between files and tests. With this done, we don't have to pass around a test_is_slow_fn, as we can directly look at the result to determine whether or not it is slow. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner.__init__): Remove test_is_slow_fn argument (LayoutTestRunner._mark_interrupted_tests_as_skipped): Remove test_is_slow argument (LayoutTestRunner._update_summary_with_result): Remove test_is_slow argument (Worker._run_test_in_another_thread): Remove test_is_slow argument * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py: (LayoutTestRunnerTests._runner): Remove test_is_slow_fn argument (LayoutTestRunnerTests.test_update_summary_with_result): TestResult arg rename * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager): Improve docstring (Manager.__init__): Tidy up reading tests-options.json (Manager._test_input_for_file): Set is_slow (Manager.run): Remove test_is_slow_fn argument (Manager._look_for_new_crash_logs): Remove test_is_slow_fn/test_is_slow argument * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner.__init__): Store TestInput object (SingleTestRunner._test_name): Replacement getter (SingleTestRunner._should_run_pixel_test): Replacement getter (SingleTestRunner._should_dump_jsconsolelog_in_stderr): Replacement getter (SingleTestRunner._reference_files): Replacement getter (SingleTestRunner._timeout): Replacement getter (SingleTestRunner._compare_output): Pass TestInput to TestResult (SingleTestRunner._run_reftest): Pass TestInput to TestResult (SingleTestRunner._compare_output_with_reference): Pass TestInput to TestResult * Scripts/webkitpy/layout_tests/models/test_input.py: (TestInput): Add is_slow boolean * Scripts/webkitpy/layout_tests/models/test_results.py: (TestResult.__init__): Rename test_name -> test_input, construct TestInput if we must (TestResult.test_name): Replacement getter * Scripts/webkitpy/layout_tests/models/test_results_unittest.py: (TestResultsTest.test_pickle_roundtrip): TestResult arg rename * Scripts/webkitpy/layout_tests/models/test_run_results.py: (TestRunResults.add): Remove test_is_slow argument, look at TestResult * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py: (summarized_results): Remove test_is_slow argument * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_tests_options): Add a test that test-options.json works 2021-05-19 Devin Rousso Add a way to create `"wheel"` events from gesture/touch events https://bugs.webkit.org/show_bug.cgi?id=225788 Reviewed by Simon Fraser. * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.h: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::scaleGestureStart): Added. (WTR::EventSendingController::scaleGestureChange): Added. (WTR::EventSendingController::scaleGestureEnd): Added. * WebKitTestRunner/TestController.cpp: (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/mac/EventSenderProxy.mm: (EventSenderCGGesturePhaseFromNSEventPhase): (-[EventSenderSyntheticEvent initPressureEventAtLocation:globalLocation:stage:pressure:stageTransition:phase:time:eventNumber:window:]): (-[EventSenderSyntheticEvent initMagnifyEventAtLocation:globalLocation:magnification:phase:time:eventNumber:window:]): Added. (-[EventSenderSyntheticEvent magnification]): Added. (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::sendMouseDownToStartPressureEvents): (WTR::EventSenderProxy::beginPressureEvent): (WTR::EventSenderProxy::pressureChangeEvent): (WTR::EventSenderProxy::mouseForceClick): (WTR::EventSenderProxy::startAndCancelMouseForceClick): (WTR::EventSenderProxy::mouseMoveTo): (WTR::EventSenderProxy::scaleGestureStart): Added. (WTR::EventSenderProxy::scaleGestureChange): Added. (WTR::EventSenderProxy::scaleGestureEnd): Added. Allow tests to synthesize scale (a.k.a. magnify) gesture events. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Drive-by: Rename `eventNumber` to `m_eventNumber` since it's a member variable. * DumpRenderTree/Scripts/generate-derived-sources.sh: * DumpRenderTree/DerivedSources.make: * WebKitTestRunner/Scripts/generate-derived-sources.sh: * WebKitTestRunner/DerivedSources.make: Make sure to pass all feature flags when generating JS files from IDL files. 2021-05-19 Wenson Hsieh Unreviewed, try to fix the internal build after r277740 It seems `keyData` was intended to be a `String` rather than a `Vector`. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): 2021-05-19 Chris Dumez Drop "get" prefix from SQLiteStatement member functions as well as out-parameters https://bugs.webkit.org/show_bug.cgi?id=225971 Reviewed by Darin Adler. Add API test coverage for new Vector constructor. * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): 2021-05-18 Darin Adler Move CFStringRef and NSString support from StringBuilder into StringConcatenateCF https://bugs.webkit.org/show_bug.cgi?id=225839 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp: Updated tests for changes to SaturatedArithmetic.h. * TestWebKitAPI/Tests/WTF/StringBuilder.cpp: Updated tests for changes to StringBuilder. * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (TestWebKitAPI::wkMediaCaptureStateString): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Added include of StringConcatenateCF.h. Added StringTypeAdapter for WKStringRef. (WTR::styleDecToStr): Use ASCIILiteral instead of StringBuilder. (WTR::string): Removed unneeded toWTFString since the WKStringRef StringTypeAdapter takes care of it. (WTR::string): Renamed from frameToStr. Use makeString. (WTR::dumpResourceURL): Use append instead of appendLiteral. (WTR::dumpFrameDescriptionSuitableForTestResult): Deleted. (WTR::dumpLoadEvent): Use makeString. (WTR::string): Renamed from a longer name. Return a String instead of building in a StringBuilder. Use makeString. (WTR::string): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Removed unneeded toWTFString. (WTR::dumpFrameScrollPosition): Ditto. (WTR::dumpDescendantFramesText): Ditto. (WTR::InjectedBundlePage::dumpDOMAsWebArchive): Removed an unneeded local variable. (WTR::InjectedBundlePage::dump): Removed unneeded toWTFString. (WTR::InjectedBundlePage::didReceiveTitleForFrame): Ditto. (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): Updated for functon name change. (WTR::InjectedBundlePage::willSendRequestForFrame): Ditto. Also use variadic append. Also use makeString. (WTR::InjectedBundlePage::didReceiveResponseForResource): Ditto. (WTR::InjectedBundlePage::didFinishLoadForResource): Ditto. (WTR::InjectedBundlePage::didFailLoadForResource): Ditto. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Ditto. (WTR::InjectedBundlePage::decidePolicyForResponse): Ditto. (WTR::InjectedBundlePage::willAddMessageToConsole): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::willRunJavaScriptPrompt): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldInsertNode): Ditto. (WTR::InjectedBundlePage::shouldInsertText): Ditto. (WTR::InjectedBundlePage::shouldDeleteRange): Ditto. (WTR::InjectedBundlePage::shouldChangeSelectedRange): Ditto. (WTR::InjectedBundlePage::shouldApplyStyle): Ditto. (WTR::InjectedBundlePage::didBeginEditing): Ditto. (WTR::InjectedBundlePage::didEndEditing): Ditto. (WTR::InjectedBundlePage::didChange): Ditto. (WTR::InjectedBundlePage::didChangeSelection): Ditto. (WTR::InjectedBundlePage::dumpHistory): Ditto. 2021-05-19 Aakash Jain Use Python 3 for running various scripts on build.webkit.org https://bugs.webkit.org/show_bug.cgi?id=225929 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/steps.py: Use Python 3. Also removed ./ from invocation to match with ews code. (TriggerCrashLogSubmission): (WaitForCrashCollection): (CleanBuildIfScheduled): (DeleteStaleBuildFiles): (ArchiveBuiltProduct): (ArchiveMinifiedBuiltProduct): (ExtractBuiltProduct): * CISupport/build-webkit-org/steps_unittest.py: Updated unit-tests. (TestCleanBuildIfScheduled.test_success): (TestCleanBuildIfScheduled.test_failure): * CISupport/built-product-archive: Updated shebang to Python 3. * CISupport/clean-build: * CISupport/delete-stale-build-files: * CISupport/trigger-crash-log-submission: * CISupport/wait-for-crash-collection: 2021-05-19 Sam Weinig Update Base64 encoding/decoding to match more modern WebKit conventions https://bugs.webkit.org/show_bug.cgi?id=225920 Reviewed by Chris Dumez. Update to use updated base64 and defaultWebCryptoMasterKey() related functions. * TestWebKitAPI/TCPServer.cpp: (TestWebKitAPI::TCPServer::startSecureConnection): (TestWebKitAPI::TCPServer::testCertificate): (TestWebKitAPI::TCPServer::testPrivateKey): * TestWebKitAPI/Tests/WebCore/ISOBox.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cocoa/SerializedCryptoKeyWrap.mm: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (testIdentity2): * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm: (TestWebKitAPI::TEST_F): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::Connection::webSocketHandshake): 2021-05-19 Jonathan Bedard [webkitpy] Deprecate webkitpy/tool/grammar.py https://bugs.webkit.org/show_bug.cgi?id=225943 Reviewed by Stephanie Lewis. * Scripts/bisect-builds: * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner.run_tests): * Scripts/webkitpy/layout_tests/controllers/manager.py: * Scripts/webkitpy/layout_tests/views/printing.py: (Printer.print_found): (Printer.print_workers_and_shards): (Printer._print_one_line_summary): * Scripts/webkitpy/test/printer.py: * Scripts/webkitpy/tool/bot/flakytestreporter.py: (FlakyTestReporter._lookup_bug_for_flaky_test): (FlakyTestReporter._create_bug_for_flaky_test): * Scripts/webkitpy/tool/commands/download.py: (AbstractPatchProcessingCommand.execute): (ProcessBugsMixin._fetch_list_of_patches_to_process): (ProcessURLsMixin._fetch_list_of_patches_to_process): * Scripts/webkitpy/tool/commands/download_unittest.py: * Scripts/webkitpy/tool/commands/queries.py: * Scripts/webkitpy/tool/commands/suggestnominations.py: (SuggestNominations._print_nominations): (SuggestNominations._print_counts): * Scripts/webkitpy/tool/commands/upload.py: (CleanPendingCommit._flags_to_clear_on_patch): (PostCommits.execute): * Scripts/webkitpy/tool/grammar.py: Removed. * Scripts/webkitpy/tool/grammar_unittest.py: Removed. * Scripts/webkitpy/tool/multicommandtool.py: * Scripts/webkitpy/tool/steps/obsoletepatches.py: (ObsoletePatches.run): * Scripts/webkitpy/tool/steps/preparechangelogforrevert.py: (PrepareChangeLogForRevert._message_for_revert): * Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py: * Scripts/webkitpy/tool/steps/reopenbugafterrevert.py: (ReopenBugAfterRevert.run): 2021-05-19 Jonathan Bedard [webkitscmpy] Apply logging options to every command https://bugs.webkit.org/show_bug.cgi?id=225939 Reviewed by Aakash Jain. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: (main): Specify help for the LoggingGroup, apply logging group to all subparsers. * Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/__init__.py: (Canonicalize.parser): Remove LoggingGroup. * Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py: * Scripts/libraries/webkitscmpy/webkitscmpy/program/find.py: (Info.parser): Remove LoggingGroup. 2021-05-19 Commit Queue Unreviewed, reverting r277444. https://bugs.webkit.org/show_bug.cgi?id=225967 Broke api tests on iOS Reverted changeset: "[run-api-tests] Use Python 3 (Part 1)" https://bugs.webkit.org/show_bug.cgi?id=225427 https://trac.webkit.org/changeset/277444 2021-05-18 Robin Morisset Make AirAllocateRegistersByGraphColoring use less memory https://bugs.webkit.org/show_bug.cgi?id=225848 Reviewed by Filip Pizlo. Simply added some tests for SmallSet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/SmallSet.cpp: Added. (TestWebKitAPI::testSmallSetOfUnsigned): (TestWebKitAPI::testSmallSetOfPointers): (TestWebKitAPI::testVectorsOfSmallSetsOfUnsigned): (TestWebKitAPI::TEST): 2021-05-18 Commit Queue Unreviewed, reverting r277675. https://bugs.webkit.org/show_bug.cgi?id=225954 Broke Mac API tests trying to fix iOS Reverted changeset: "[webkitpy] Forward booted simulators to children processes" https://bugs.webkit.org/show_bug.cgi?id=225933 https://trac.webkit.org/changeset/277675 2021-05-18 Aditya Keerthi [macOS] Titlebar separator doesn't show when WKWebView is scrolled https://bugs.webkit.org/show_bug.cgi?id=220633 Reviewed by Darin Adler. Added API tests to verify that the delegate implementation returns the correct value for `hasScrolledContentsUnderTitlebar` depending on the view's scroll position, visibility, and frame. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h: * TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm: Added. (-[TitlebarSeparatorTestWKWebView initWithFrame:configuration:]): (-[TitlebarSeparatorTestWKWebView separatorTrackingAdapter]): (BackForwardCache): (ChangeTitlebarAdjacency): (ChangeViewVisibility): (NavigationResetsTitlebarAppearance): (ParentWhileScrolled): (ScrollWithTitlebarAdjacency): (ScrollWithoutTitlebarAdjacency): 2021-05-18 Jonathan Bedard [webkitpy] Forward booted simulators to children processes https://bugs.webkit.org/show_bug.cgi?id=225933 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/api_tests/runner.py: (setup_shard): Set DeviceManager global variable from parent process. (Runner.command_for_port): Use Port's device manager instead of simulated device manager. (Runner.run): Pass DeviceManager details to children processes. 2021-05-18 Aakash Jain [ews] Style fixes in steps_unittest.py https://bugs.webkit.org/show_bug.cgi?id=225932 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps_unittest.py: 2021-05-18 Jonathan Bedard [lint-test-expectations] Change shebang to Python 3 https://bugs.webkit.org/show_bug.cgi?id=225898 Reviewed by Aakash Jain. * Scripts/lint-test-expectations: Change shebang, remove version check. 2021-05-18 Yoshiaki Jitsukawa [PlayStation] Fix PlayStation port https://bugs.webkit.org/show_bug.cgi?id=225913 Reviewed by Don Olmstead. Fix PlayStation port * MiniBrowser/playstation/CMakeLists.txt: Rename PLAYSTATION_COPY_SHARED_LIBRARIES to PLAYSTATION_COPY_REQUIREMENTS. * MiniBrowser/playstation/WebViewWindow.cpp: (WebViewWindow::updateTitle): Add nullptr check. (WebViewWindow::updateURL): Add nullptr check. 2021-05-17 Wenson Hsieh [GPU Process] Object identifiers with the deleted value should cause MESSAGE_CHECKs https://bugs.webkit.org/show_bug.cgi?id=225886 rdar://78114708 Reviewed by Chris Dumez. Adjust an existing API test to verify that the deleted object identifier value triggers an inline item decoding failure. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): 2021-05-17 Kate Cheney WebFrameLoaderClient::dispatchWillSendRequest sometimes resets app-bound value https://bugs.webkit.org/show_bug.cgi?id=225829 Reviewed by Alex Christensen. API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm: Added. (-[InAppBrowserPrivacyPlugIn webProcessPlugIn:didCreateBrowserContextController:]): (-[InAppBrowserPrivacyPlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]): 2021-05-17 Alex Christensen Unreviewed, reverting r277605. Broke iOS tests Reverted changeset: "Remove _WKUserContentFilter and _WKUserContentExtensionStore" https://bugs.webkit.org/show_bug.cgi?id=224391 https://commits.webkit.org/r277605 2021-05-17 Jonathan Bedard [webkitscmpy] Support testing on machines without svn installed https://bugs.webkit.org/show_bug.cgi?id=225891 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py: (Scm.executable): Ensure whichcraft import support mock. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (Git.__enter__): Mock git executable location. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py: (Svn.__enter__): Mock svn executable location. 2021-05-17 Alex Christensen Remove API::Object::Type::BundlePageGroup https://bugs.webkit.org/show_bug.cgi?id=225611 Reviewed by Brady Eidson. Some tests were trying to encode a page group, but it was unused so I just removed them. * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp: (TestWebKitAPI::TEST): 2021-05-17 Aakash Jain Style checker should check for non-inclusive terminology https://bugs.webkit.org/show_bug.cgi?id=213088 Reviewed by Jonathan Bedard. Style checker should check for non-inclusive terminology so that we can avoid unintentional addition of non-inclusive terminology in our codebase. * Scripts/webkitpy/style/checkers/inclusive_language.py: Added inclusive language checker. (InclusiveLanguageChecker): (InclusiveLanguageChecker.check): * Scripts/webkitpy/style/checkers/changelog.py: Check for inclusive language. * Scripts/webkitpy/style/checkers/cpp.py: Ditto. * Scripts/webkitpy/style/checkers/js.py: Ditto. * Scripts/webkitpy/style/checkers/python.py: Ditto. * Scripts/webkitpy/style/checkers/text.py: Ditto. * Scripts/report-non-inclusive-language: Ignore the newly added inclusive_language.py file. 2021-05-17 Alex Christensen Fix clean build after r277606 https://bugs.webkit.org/show_bug.cgi?id=223658 * TestWebKitAPI/Tests/WebKitCocoa/ContentSecurityPolicy.mm: (TEST): Use API instead of removed API. Why EWS didn't find this, we may never know. 2021-05-17 Alex Christensen [Cocoa] Remove prototype loadSimulatedRequest methods https://bugs.webkit.org/show_bug.cgi?id=223658 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm: (TEST): 2021-05-17 Alex Christensen Remove _WKUserContentFilter and _WKUserContentExtensionStore https://bugs.webkit.org/show_bug.cgi?id=224391 Reviewed by Darin Adler. * MiniBrowser/mac/ExtensionManagerWindowController.m: (-[ExtensionManagerWindowController init]): (-[ExtensionManagerWindowController add:]): (-[ExtensionManagerWindowController remove:]): * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/_WKUserContentExtensionStore.mm: Removed. These tests had already been copied to a version that uses WKContentRuleList. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::resetContentExtensions): * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::configureContentExtensionForTest): 2021-05-15 Jer Noble MediaSessionCoordinator survives page reload/navigation https://bugs.webkit.org/show_bug.cgi?id=225822 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: (-[_WKMockMediaSessionCoordinator trackIdentifierChanged:]): 2021-05-16 Chris Dumez Modernize / Optimize SQLiteStatement creation and preparation https://bugs.webkit.org/show_bug.cgi?id=225791 Reviewed by Sam Weinig. Update code base now that the SQLiteDatabase & SQLiteStatement API has changed. Also use more ASCIILiterals. * TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: (TestWebKitAPI::addToDatabasesTable): 2021-05-15 Ryosuke Niwa Delete WebSQL code from WebKit2 https://bugs.webkit.org/show_bug.cgi?id=225739 Reviewed by Sihui Liu. * MiniBrowser/playstation/WebContext.cpp: (WebContext::WebContext): * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (runWebsiteDataStoreCustomPaths): * WebKitTestRunner/TestController.cpp: (WTR::TestController::configureWebsiteDataStoreTemporaryDirectories): 2021-05-15 Sam Weinig Allow conditionally enabling OffscreenCanvas only for non-worker contexts https://bugs.webkit.org/show_bug.cgi?id=225845 Reviewed by Darin Adler. * Scripts/webkitperl/FeatureList.pm: * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): Match current behavior of ENABLE_OFFSCREEN_CANVAS and OffscreenCanvasEnabled for ENABLE_OFFSCREEN_CANVAS_IN_WORKERS and OffscreenCanvasInWorkersEnabled. 2021-05-15 Alex Christensen Remove _WKWebsitePolicies https://bugs.webkit.org/show_bug.cgi?id=224293 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:preferences:userInfo:decisionHandler:]): (-[CustomJavaScriptUserAgentDelegate webView:decidePolicyForNavigationAction:preferences:decisionHandler:]): (-[CustomNavigatorPlatformDelegate webView:decidePolicyForNavigationAction:preferences:decisionHandler:]): (-[PopUpPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]): (-[PopUpPoliciesDelegate webView:decidePolicyForNavigationAction:preferences:decisionHandler:]): (-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): Deleted. (-[CustomJavaScriptUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): Deleted. (-[CustomNavigatorPlatformDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): Deleted. (-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. 2021-05-15 Aakash Jain report-non-inclusive-language should skip node_modules directory https://bugs.webkit.org/show_bug.cgi?id=225827 Reviewed by Darin Adler. * Scripts/report-non-inclusive-language: Skip node_modules directory as it contains external code. 2021-05-14 Chris Dumez Drop FileSystem::fileMetadata() / fileMetadataFollowingSymlinks() https://bugs.webkit.org/show_bug.cgi?id=225820 Reviewed by Darin Adler. Update the FileSystem API tests accordingly. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-14 Jonathan Bedard [WebKitTestRunner] Forward WebContent termination reason https://bugs.webkit.org/show_bug.cgi?id=225818 Reviewed by Chris Dumez. * WebKitTestRunner/TestController.cpp: (WTR::TestController::createOtherPage): Use didTerminate callback instead of didCrash callback. (WTR::TestController::createWebViewWithOptions): Ditto. (WTR::TestController::webProcessDidTerminate): (WTR::TestController::processDidCrash): Renamed webProcessDidTerminate. * WebKitTestRunner/TestController.h: Replace processDidCrash with webProcessDidTerminate. * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::platformRunUntil): 2021-05-14 Jonathan Bedard [run-webkit-tests] Handle missing simulator state plist https://bugs.webkit.org/show_bug.cgi?id=225833 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDevice.state): If no device plist is found, assume the device is shut down. * Scripts/webkitpy/xcode/simulated_device_unittest.py: 2021-05-14 Jonathan Bedard Fix iOS 14.5 embedded build https://bugs.webkit.org/show_bug.cgi?id=225835 Reviewed by Dewei Zhu. * Scripts/configure-xcode-for-embedded-development: Add mach.h, mach_error.h and task.h. 2021-05-14 Devin Rousso Sampled Page Top Color: move logic out of `Document` https://bugs.webkit.org/show_bug.cgi?id=225480 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.MainDocumentChange): Added. 2021-05-14 Chris Dumez Port WTF::FileSystem::realPath() to std::filesystem https://bugs.webkit.org/show_bug.cgi?id=225828 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-14 Chris Dumez Drop "get" prefix from WTF::FileSystem's getFileModificationTime() / getFileCreationTime() https://bugs.webkit.org/show_bug.cgi?id=225812 Reviewed by Darin Adler. Update code base due to WTF API change. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::runGetFileModificationTimeTest): (TestWebKitAPI::TEST_F): 2021-05-14 Chris Dumez Rename FileSystem::getVolumeFreeSpace() to FileSystem::volumeFreeSpace() https://bugs.webkit.org/show_bug.cgi?id=225811 Reviewed by Darin Adler. Update code base due to API change. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-14 Jean-Yves Avenard TestWebKitAPI.Fullscreen.WKViewDelegate is timing out https://bugs.webkit.org/show_bug.cgi?id=223282 rdar://75495585 Reviewed by Jer Noble. * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: (TestWebKitAPI::TEST): Use WkView/NSWindow directly instead of using a PlatformWebView. A PlatformWebView uses an OffscreenWindow which is a NSWindow placed with a -10000 offset. This configuration appears to fail to go into full screen in automation. 2021-05-14 Sam Weinig REGRESSION(r277313): [ Debug ] 2 TestWebKitAPI.IPCTestingAPI (API-Tests) are constant timeouts https://bugs.webkit.org/show_bug.cgi?id=225816 Reviewed by Ryosuke Niwa. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: Update test for rename from ImageData to PixelBuffer. 2021-05-14 Devin Rousso Promote `-[WKWebView _pageExtendedBackgroundColor]` SPI to `-[WKWebView underPageBackgroundColor]` API https://bugs.webkit.org/show_bug.cgi?id=225615 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm: Renamed from PageExtendedBackgroundColor.mm. (defaultBackgroundColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.OnLoad): (TEST.WKWebViewUnderPageBackgroundColor.SingleSolidColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.SingleBlendedColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleSolidColors): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleBlendedColors): Added. (-[WKWebViewUnderPageBackgroundColorObserver initWithWebView:]): Added. (-[WKWebViewUnderPageBackgroundColorObserver observeValueForKeyPath:ofObject:change:context:]): Added. (TEST.WKWebViewUnderPageBackgroundColor.KVO): (TEST.WKWebViewUnderPageBackgroundColor.MatchesScrollView): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleStyles): Deleted. (-[WKWebViewPageExtendedBackgroundColorObserver initWithWebView:]): Deleted. (-[WKWebViewPageExtendedBackgroundColorObserver observeValueForKeyPath:ofObject:change:context:]): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (createWebViewWithSampledPageTopColorMaxDifference): (TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: (createWebView): Deleted. (TEST.WKWebView.ExperimentalUseThemeColorForScrollAreaBackgroundColor): Deleted. Remove the experimental settings `UseSampledPageTopColorForScrollAreaBackgroundColor` and `UseThemeColorForScrollAreaBackgroundColor` now that clients can override the default overscroll area background color using `-[WKWebView setUnderPageBackgroundColor:]`. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2021-05-14 Devin Rousso [iOS] contextmenu hints can be clipped by the WKWebView https://bugs.webkit.org/show_bug.cgi?id=224204 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm: (-[TestContextMenuHintPreviewContainerUIDelegate webView:contextMenuWillPresentForElement:]): Added. (-[TestContextMenuHintPreviewContainerUIDelegate _contextMenuHintPreviewContainerViewForWebView:]): Added. (TEST.ContextMenu.HintPreviewContainer): Added. 2021-05-14 Chris Dumez Introduce FileSystem::updateFileModificationTime() https://bugs.webkit.org/show_bug.cgi?id=225810 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-14 Jonathan Bedard [run-api-tests] Use Python 3 (Part 2) https://bugs.webkit.org/show_bug.cgi?id=225427 Reviewed by Aakash Jain. * Scripts/run-api-tests: Change she-bang to Python 3. 2021-05-14 Chris Dumez Rename FileSystem::getFileSize() to FileSystem::fileSize() https://bugs.webkit.org/show_bug.cgi?id=225798 Reviewed by Alex Christensen. Update code path to due to the API change. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: (TestWebKitAPI::TEST): 2021-05-14 Chris Dumez Rename FileSystem::pathGetFileName() to FileSystem::pathFileName() https://bugs.webkit.org/show_bug.cgi?id=225806 Reviewed by Alex Christensen. Rename FileSystem::pathGetFileName() to FileSystem::pathFileName(), as we avoid "get" prefixes in WebKit. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-14 Jonathan Bedard [webkitpy] Remove unused imports https://bugs.webkit.org/show_bug.cgi?id=225776 Reviewed by Dewei Zhu. * Scripts/webkitpy/benchmark_runner/benchmark_json_merge.py: * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: * Scripts/webkitpy/browserperfdash/browserperfdash_runner.py: * Scripts/webkitpy/common/config/ports.py: * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: * Scripts/webkitpy/common/net/layouttestresults_unittest.py: * Scripts/webkitpy/common/net/networktransaction_unittest.py: * Scripts/webkitpy/common/system/zipfileset_unittest.py: * Scripts/webkitpy/common/test_expectations_unittest.py: * Scripts/webkitpy/inspector/main.py: * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py: * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: * Scripts/webkitpy/layout_tests/controllers/manager.py: * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py: * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py: * Scripts/webkitpy/layout_tests/models/test_expectations.py: * Scripts/webkitpy/layout_tests/models/test_run_results.py: * Scripts/webkitpy/layout_tests/servers/websocket_server.py: * Scripts/webkitpy/layout_tests/views/printing.py: * Scripts/webkitpy/minibrowser/run_webkit_app.py: * Scripts/webkitpy/performance_tests/perftest.py: * Scripts/webkitpy/port/base.py: * Scripts/webkitpy/port/builders.py: * Scripts/webkitpy/port/config_unittest.py: * Scripts/webkitpy/results/upload_unittest.py: * Scripts/webkitpy/style/checkers/test_expectations.py: * Scripts/webkitpy/style/checkers/test_expectations_unittest.py: * Scripts/webkitpy/style/checkers/text_unittest.py: * Scripts/webkitpy/style/filereader_unittest.py: * Scripts/webkitpy/style/optparser.py: * Scripts/webkitpy/test/printer.py: * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py: * Scripts/webkitpy/tool/bot/retrylogic_unittest.py: * Scripts/webkitpy/tool/commands/queuestest.py: * Scripts/webkitpy/tool/commands/rebaselineserver.py: * Scripts/webkitpy/tool/commands/setupgitclone.py: * Scripts/webkitpy/tool/commands/suggestnominations.py: * Scripts/webkitpy/tool/commands/upload.py: * Scripts/webkitpy/tool/main.py: * Scripts/webkitpy/tool/mocktool.py: * Scripts/webkitpy/tool/multicommandtool_unittest.py: * Scripts/webkitpy/tool/servers/gardeningserver.py: * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: * Scripts/webkitpy/tool/servers/reflectionhandler.py: * Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py: * Scripts/webkitpy/tool/steps/wptchangeexport.py: * Scripts/webkitpy/w3c/wpt_runner.py: * Scripts/webkitpy/webdriver_tests/pytest_runner.py: * Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py: * Scripts/webkitpy/webdriver_tests/webdriver_test_result.py: * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py: 2021-05-14 Jonathan Bedard test-lldb-webkit failing with import of lldb https://bugs.webkit.org/show_bug.cgi?id=225792 Reviewed by Dewei Zhu. * CISupport/build-webkit-org/steps.py: (RunLLDBWebKitTests): Invoke test-lldb-webkit with Python 3. * CISupport/build-webkit-org/steps_unittest.py: * Scripts/test-lldb-webkit: Change shebang to Python 3. 2021-05-14 Carlos Garcia Campos Unreviewed. [GTK] Fix make distcheck Update library version now that we build with soup3 by default. * Scripts/make-dist: (Distcheck.check_symbols): (ensure_version_if_possible): 2021-05-13 Aakash Jain report-non-inclusive-language should skip symlinks https://bugs.webkit.org/show_bug.cgi?id=225789 Reviewed by Darin Adler. * Scripts/report-non-inclusive-language: Skip symlinks since most likely the linked file would be checked directly by the script while iterating the directory structure and would result in it being counted twice. Also the script fails with an error if there is a symlink pointing to a non-existing file. 2021-05-13 Aakash Jain [ews] Style fixes in steps.py https://bugs.webkit.org/show_bug.cgi?id=225784 Reviewed by Dewei Zhu. * CISupport/ews-build/steps.py: (CheckOutSource.__init__): (ShowIdentifier.hideStepIf): (BugzillaMixin.get_bugzilla_api_key): (RunJavaScriptCoreTests.commandComplete): (AnalyzeJSCTestsResults.send_email_for_pre_existing_failure): (AnalyzeLayoutTestsResults._report_flaky_tests): (DownloadBuiltProduct): (AnalyzeAPITestsResults.analyzeResults.getAPITestFailures): (AnalyzeAPITestsResults.send_email_for_pre_existing_failure): 2021-05-13 Chris Dumez Tweak ServiceWorkers.SuspendServiceWorkerProcessBasedOnClientProcesses to find out source of timeout https://bugs.webkit.org/show_bug.cgi?id=225770 Reviewed by Alexey Proskuryakov. Wait for conditions with our own timeout so that the test fails with useful errors instead of just a generic timeout. This just help us find out where in the test things go wrong. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2021-05-13 Alex Christensen Add unit test using WKHTTPCookieStoreObserver and cookies received from HTTP https://bugs.webkit.org/show_bug.cgi?id=225773 Reviewed by Chris Dumez. We only had tests that added cookies through the API, not through the network. I thought it was broken but it isn't. Still worth adding the test. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (deleteAllCookies): (TEST): 2021-05-13 Chris Dumez Rename FileSystem::directoryName() to FileSystem::parentPath() https://bugs.webkit.org/show_bug.cgi?id=225768 Reviewed by Darin Adler. Rename FileSystem::directoryName() to FileSystem::parentPath() for clarity and consistency with std::filesystem::parent_path() which is used internally. * DumpRenderTree/win/DumpRenderTree.cpp: (findFontFallback): * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/win/PlatformUtilitiesWin.cpp: (TestWebKitAPI::Util::moduleDirectory): 2021-05-13 Chris Dumez Rename FileSystem::fileIsDirectory(path, followSymlinks) to isDirectory(path) / isDirectoryFollowingSymlinks(path) https://bugs.webkit.org/show_bug.cgi?id=225772 Reviewed by Darin Adler. Update code base due to API naming change. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-13 Chris Dumez Introduce FileSystem::hardLinkCount() https://bugs.webkit.org/show_bug.cgi?id=225767 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-13 Jonathan Bedard [run-api-tests] Use Python 3 (Part 1) https://bugs.webkit.org/show_bug.cgi?id=225427 Reviewed by Aakash Jain. * CISupport/build-webkit-org/steps.py: (RunAPITests): Use Python3 to invoke run-api-tests. * CISupport/ews-build/steps.py: (RunAPITests): Use Python3 to invoke run-api-tests. * CISupport/ews-build/steps_unittest.py: 2021-05-13 Jonathan Bedard Few webkitpy unit-tests fails in non-PST timezones https://bugs.webkit.org/show_bug.cgi?id=225741 Reviewed by Aakash Jain. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py: Ditto. (Svn.request): Serve SVN content from California time (like our SVN server) 2021-05-13 Darin Adler Remove StringBuilder::appendNumber https://bugs.webkit.org/show_bug.cgi?id=225732 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WTF/StringBuilder.cpp: Test append with a number instead of appendNumber. * TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp: Use append instead of appendNumber. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::dumpResponseDescriptionSuitableForTestResult): Use append instead of appendNumber. (WTR::dumpFrameScrollPosition): Ditto. (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): Use makeString instead of StringBuilder. (WTR::InjectedBundlePage::shouldCacheResponse): Ditto. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::attributesOfElement): Use append instead of appendNumber. (WTR::AccessibilityUIElement::attributedStringForRange): Ditto. (WTR::stringAtOffset): Ditto. 2021-05-13 Dmitry Bezhetskov Add dbezhetskov as a commiter https://bugs.webkit.org/show_bug.cgi?id=225742 Reviewed by Caio Araujo Neponoceno de Lima. * Scripts/webkitpy/common/config/contributors.json: 2021-05-13 Tim Horton ResizeReversePaginatedWebView fails on some OS versions on some hardware https://bugs.webkit.org/show_bug.cgi?id=224699 Reviewed by Megan Gardner. * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp: (TestWebKitAPI::didLayout): This test does *not* care about the specific number of pages that are generated; the key to the test is the scroll position check. Since the page-count check in this test has caused lots of trouble in the past (see the history) just remove it and replace it with a check that we ended up paginated at all. 2021-05-12 Simon Fraser Update the MotionMark 1.1 plan file Unreviewed. Update MotionMark 1.1 to use the version from r277406, which removes the Focus subtest. * Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan: 2021-05-12 Myles C. Maxfield [MotionMark] Update plan file after r277406 https://bugs.webkit.org/show_bug.cgi?id=225721 Rubber-stamped by Geoffrey Garen. Just update the plan. * Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan: 2021-05-12 Aakash Jain [build.webkit.org] Bots should automatically recover from svn checkout is already locked issue https://bugs.webkit.org/show_bug.cgi?id=225717 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/steps.py: (CheckOutSource): Set haltOnFailure to False so that cleanup step can run. Also set the step name while we are at it. (CheckOutSource.__init__): Also set logEnviron to False. (CheckOutSource.getResultSummary): Run SVNCleanup step in case of failure. (SVNCleanup): (SVNCleanup.__init__): (SVNCleanup.evaluateCommand): * CISupport/build-webkit-org/steps_unittest.py: Added unit-tests for the new step. 2021-05-12 Chris Dumez Unreviewed follow-up to r277376. Enable the API tests only if ENABLE(NOTIFICATIONS). It is important since notifications are enabled on macOS but not iOS currently. * TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: 2021-05-12 Sihui Liu [ BigSur Release ] TestWebKitAPI.IndexedDB.KillWebProcessWithOpenConnection is a constant failure https://bugs.webkit.org/show_bug.cgi?id=225372 Reviewed by Chris Dumez. Ensure IDB data is cleared before test and make error logging more detailed. * TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-1.html: * TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-2.html: * TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm: Listen to version change event because it indicates that server starts handling second open request in KillWebProcessWithOpenConnection-2.html. (-[IndexedDBWebProcessKillMessageHandler userContentController:didReceiveScriptMessage:]): (getNextMessage): (TEST): 2021-05-12 Jonathan Bedard [TestWebKitAPI] Explicitly exit after completing tests https://bugs.webkit.org/show_bug.cgi?id=225703 Reviewed by Alexey Proskuryakov. * TestWebKitAPI/ios/mainIOS.mm: (main): Explicitly exit the testing process. 2021-05-12 Chris Dumez Queue notification permission requests for the same origin on WebKit side https://bugs.webkit.org/show_bug.cgi?id=225701 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: Added. (-[NotificationPermissionMessageHandler userContentController:didReceiveScriptMessage:]): (-[NotificationPermissionUIDelegate initWithHandler:]): (-[NotificationPermissionUIDelegate _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]): (TestWebKitAPI::runRequestPermissionTest): (TestWebKitAPI::TEST): (TestWebKitAPI::runParallelPermissionRequestsTest): 2021-05-11 Chris Dumez Port WTF::FileSystem::listDirectory to std::filesystem https://bugs.webkit.org/show_bug.cgi?id=225633 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::createTestFile): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: (TestWebKitAPI::removeDirectoryAndAllContents): 2021-05-11 Chris Dumez Add SPI to suspend / resume a WKWebView https://bugs.webkit.org/show_bug.cgi?id=225333 Reviewed by Geoff Garen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html: Added. 2021-05-11 Darin Adler Remove the String::toInt family of functions https://bugs.webkit.org/show_bug.cgi?id=225599 Reviewed by Anders Carlsson. * TestWebKitAPI/CMakeLists.txt: Added StringToIntegerConversion.cpp. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto. * TestWebKitAPI/Tests/WTF/StringToIntegerConversion.cpp: Added. Contains tests moved and adapted from the files below so we don't lose test coverage. We and and should add many more tests. * TestWebKitAPI/Tests/WTF/StringView.cpp: Removed tests for parseUInt16 and StringView::toIntStrict. * TestWebKitAPI/Tests/WTF/WTFString.cpp: Removed tests for String::toInt. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: Use parseInteger instead of StringView::toUInt64Strict. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: Ditto. 2021-05-11 Devin Rousso [macCatalyst] should have CSS `hover: hover` and `pointer: fine` https://bugs.webkit.org/show_bug.cgi?id=225672 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm: (TEST.iOSMouseSupport.MouseAlwaysConnected): * TestWebKitAPI/Tests/WebKitCocoa/iOSStylusSupport.mm: 2021-05-11 Commit Queue Unreviewed, reverting r277341. https://bugs.webkit.org/show_bug.cgi?id=225685 Caused WK2 layout tests to exit with an exception Reverted changeset: "Add SPI to suspend / resume a WKWebView" https://bugs.webkit.org/show_bug.cgi?id=225333 https://trac.webkit.org/changeset/277341 2021-05-11 Wenson Hsieh [iOS] Mail compose web view doesn't scroll to reveal the selection in certain configurations https://bugs.webkit.org/show_bug.cgi?id=225675 rdar://77095886 Reviewed by Tim Horton. Rename some testing SPI. See WebKit/ChangeLog for more information. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::inputViewBounds const): 2021-05-11 Commit Queue Unreviewed, reverting r277319. https://bugs.webkit.org/show_bug.cgi?id=225680 Always enabling AsyncOverflowScrolling made many tests fail or crash Reverted changeset: "[GTK] compositing/overflow/dynamic-composited-scrolling- status.html is failing" https://bugs.webkit.org/show_bug.cgi?id=225644 https://trac.webkit.org/changeset/277319 2021-05-11 Sihui Liu Use one VM per thread for IDB serialization work https://bugs.webkit.org/show_bug.cgi?id=225658 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm: (-[DatabaseProcessKillMessageHandler userContentController:didReceiveScriptMessage:]): (TEST): 2021-05-11 Chris Dumez Add SPI to suspend / resume a WKWebView https://bugs.webkit.org/show_bug.cgi?id=225333 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html: Added. 2021-05-11 Alex Christensen Add SPI to restrict networking to a set of hosts https://bugs.webkit.org/show_bug.cgi?id=225426 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (TEST): (webSocketAcceptValue): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::Connection::webSocketHandshake): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::Connection::webSocketHandshake): 2021-05-11 Diego Pino Garcia [GTK] compositing/overflow/dynamic-composited-scrolling-status.html is failing https://bugs.webkit.org/show_bug.cgi?id=225644 Reviewed by Carlos Garcia Campos. The test started failing in r277258, which makes WebKitGTK to use always async scrolling in AC mode. After this change, WebKitTestRunner should always enable AsyncOverflowScrolling. * WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): Enable AsyncOverflowScrolling. 2021-05-11 Angelos Oikonomopoulos [JSC] detect infrastructure failure for remote stress tests https://bugs.webkit.org/show_bug.cgi?id=222601 Reviewed by Mark Lam. run-jsc-stress-tests currently detects failures by the absence of a failure file (that is generated by each failing test). This is fragile to begin with, as it assumes that tests that fail to run (e.g. because of an error in the runner script) are successful by default. However, the main motivation for this patch is to make execution more robust when using remote hosts. Currently, --gnu-parallel-runner will transparently reschedule jobs on a different host when a remote host goes away. But detectFailures expects to be able to connect to all hosts and fetch the failure files, which fails if a remote host is still down when the run finishes. Instead, this patch changes the runners to always generate a status file with the exit code. detectFailures then fetches all status files from all hosts that are live on exit. Tests that failed to run are explicitly accounted for as 'noreport' and are set to ERROR in the final report. * Scripts/run-javascriptcore-tests: (runJSCStressTests): * Scripts/run-jsc-stress-tests: * Scripts/webkitruby/jsc-stress-test-writer-default.rb: 2021-05-10 Chris Dumez Use non-throwing std::filesystem API in TestRunner https://bugs.webkit.org/show_bug.cgi?id=225632 Reviewed by Darin Adler. * TestRunnerShared/TestCommand.cpp: (WTR::testPath): (WTR::testURLString): * TestRunnerShared/TestFeatures.cpp: (WTR::parseTestHeader): 2021-05-10 Wenson Hsieh [macOS] Allow immediate action gestures to begin when force clicking text inside image overlays https://bugs.webkit.org/show_bug.cgi?id=225600 Reviewed by Tim Horton. Add new API tests to exercise these changes by grabbing the immediate action `NSGestureRecognizer` from `WKWebView` and calling into its delegate. This patch adds two basic immediate action tests by simulating the immediate action over text and the body element, and includes a third test that installs an image overlay using an injected `internals` object, and verifies that the immediate action in an image overlay matches that of regular text on the page. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/ImmediateActionTests.mm: Added. (swizzledImmediateActionLocationInView): (-[WKWebViewForTestingImmediateActions _immediateActionAnimationControllerForHitTestResult:withType:userData:]): (-[WKWebViewForTestingImmediateActions immediateActionGesture]): (-[WKWebViewForTestingImmediateActions simulateImmediateAction:]): (TestWebKitAPI::TEST): 2021-05-10 Kate Cheney Preflight requests not properly attributed as app-bound https://bugs.webkit.org/show_bug.cgi?id=225596 Reviewed by Brent Fulgham. Add test infrastructure. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::didLoadAppBoundRequest): (WTR::TestRunner::didLoadNonAppBoundRequest): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::didLoadAppBoundRequest): (WTR::TestController::didLoadNonAppBoundRequest): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::didLoadAppBoundRequest): (WTR::TestController::didLoadNonAppBoundRequest): * WebKitTestRunner/cocoa/TestRunnerWKWebView.h: * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView _didLoadAppBoundRequest:]): (-[TestRunnerWKWebView _didLoadNonAppBoundRequest:]): 2021-05-10 Chris Dumez [iOS] Pages with service workers do not suspend promptly https://bugs.webkit.org/show_bug.cgi?id=225598 Reviewed by Youenn Fablet. Update WebKit API test accordingly. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2021-05-10 Alex Christensen Add ObjC API similar to WKBundlePageCopyGroupIdentifier https://bugs.webkit.org/show_bug.cgi?id=225477 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h: * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistryPlugIn.mm: (-[RemoteObjectRegistryPlugIn getGroupIdentifier:]): 2021-05-10 Aakash Jain [build.webkit.org] Rename master_buildbot2.cfg to master.cfg https://bugs.webkit.org/show_bug.cgi?id=222600 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/buildbot.tac: * CISupport/build-webkit-org/master.cfg: Moved from Tools/CISupport/build-webkit-org/master_buildbot2.cfg. * CISupport/build-webkit-org/master_buildbot2.cfg: Removed. 2021-05-10 Alex Christensen Add unit test for r274129 https://bugs.webkit.org/show_bug.cgi?id=224021 Reviewed by Chris Dumez. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h: * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistryPlugIn.mm: (-[RemoteObjectRegistryPlugIn sendAwakener:completionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/TestAwakener.h: Added. * TestWebKitAPI/Tests/WebKitCocoa/TestAwakener.mm: Added. (-[TestAwakener awakeAfterUsingCoder:]): (-[TestAwakener initWithValue:]): (-[TestAwakener value]): (+[TestAwakener supportsSecureCoding]): (-[TestAwakener encodeWithCoder:]): (-[TestAwakener initWithCoder:]): 2021-05-10 Devin Rousso Add support for a `media` attribute on `` https://bugs.webkit.org/show_bug.cgi?id=224389 Reviewed by Ryosuke Niwa. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: (TEST.WKWebViewThemeColor.MetaElementValidNameAndColor): Added. (TEST.WKWebViewThemeColor.MetaElementValidNameAndColorAndMedia): Added. (TEST.WKWebViewThemeColor.MetaElementInvalidName): Added. (TEST.WKWebViewThemeColor.MetaElementInvalidColor): Added. (TEST.WKWebViewThemeColor.MetaElementInvalidMedia): Added. (TEST.WKWebViewThemeColor.MetaElementMultipleValid): Added. (TEST.WKWebViewThemeColor.MetaElementValidSubframe): Added. (-[WKWebViewThemeColorObserver observeValueForKeyPath:ofObject:change:context:]): (TEST.WKWebViewThemeColor.KVO): (TEST.WKWebViewThemeColor.MetaElementOnLoad): Deleted. (TEST.WKWebViewThemeColor.MetaElementMultipleTags): Deleted. 2021-05-09 Darin Adler Remove all remaining uses of the String::toInt family of functions https://bugs.webkit.org/show_bug.cgi?id=225580 Reviewed by Sam Weinig. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::numberAttributeValue): Use parseIntegerAllowingTrailingJunk instead of String::toInt. (WTR::AccessibilityUIElement::hierarchicalLevel const): Ditto. 2021-05-10 Alex Christensen css-display-none actions from WKContentRuleList should apply to pages loaded with loadData and loadHTMLString https://bugs.webkit.org/show_bug.cgi?id=225493 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (TEST): 2021-05-10 Chris Dumez Fix potential races in AppleLanguagesTest.UpdateAppleLanguages API test https://bugs.webkit.org/show_bug.cgi?id=225429 Reviewed by Darin Adler. Calling [TestWKWebView performAfterReceivingAnyMessage] registers a MessageHandler which sends an async WebUserContentController::AddUserScriptMessageHandlers IPC to the WebProcess. We want to make sure that that message handler is registered in the WebProcess before the JS on the page calls `webkit.messageHandlers.testHandler.postMessage()`. To address this issue, I moved the call to `[TestWKWebView performAfterReceivingAnyMessage]` before the call to evaluateJavaScript that registers the event listener that may call `webkit.messageHandlers.testHandler.postMessage()`. Also make sure the PreferenceObserver has been allocated after sending the "NSApplicationDidBecomeActiveNotification" and before proceeding with the test. I am also adding an extra check at the end to make sure that the value of navigator.language is correct and to make sure that WKPreferenceObserver.preferenceDidChange was called. This was done to help diagnose flakiness issues on the bots that I cannot reproduce locally. * TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm: (TEST_F): 2021-05-10 Aditya Keerthi [iPadOS] Do not present custom input peripherals when switching back to a tab with a focused element https://bugs.webkit.org/show_bug.cgi?id=225541 Reviewed by Wenson Hsieh. Updated a UIScriptController hook that simulates attaching a hardware keyboard to also swizzle [UIKeyboard isInHardwareKeyboardMode]. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformInitialize): (WTR::TestController::platformResetStateToConsistentValues): Moved the default swizzling behavior into this method so that it remains consistent across tests. Unfortunately, the default swizzling behavior contrasts with the default value of GSEventSetHardwareKeyboardAttached. However, this is an existing inconsistency, and should be looked at more carefully in a separate investigation. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::returnYes): (WTR::returnNo): (WTR::UIScriptControllerIOS::setHardwareKeyboardAttached): 2021-05-10 Alex Christensen Remove WKBundlePageGroupRef https://bugs.webkit.org/show_bug.cgi?id=225471 Reviewed by Darin Adler. Also use some smart pointers instead of raw pointers to keep things safe. * TestWebKitAPI/InjectedBundleController.cpp: (TestWebKitAPI::InjectedBundleController::InjectedBundleController): (TestWebKitAPI::InjectedBundleController::initialize): (TestWebKitAPI::InjectedBundleController::didInitializePageGroup): Deleted. * TestWebKitAPI/InjectedBundleController.h: (TestWebKitAPI::InjectedBundleController::bundle const): * TestWebKitAPI/InjectedBundleTest.h: (TestWebKitAPI::InjectedBundleTest::willDestroyPage): (TestWebKitAPI::InjectedBundleTest::Register::create): (TestWebKitAPI::InjectedBundleTest::didInitializePageGroup): Deleted. * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic_Bundle.cpp: * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp: * TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash_Bundle.cpp: * TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp: * TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen_Bundle.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::initialize): (WTR::InjectedBundle::didCreatePage): (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::reportLiveDocuments): (WTR::InjectedBundle::didReceiveMessageToPage): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::statisticsNotifyObserver): (WTR::InjectedBundle::didInitializePageGroup): Deleted. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTR::InjectedBundle::bundle const): (WTR::InjectedBundle::pageGroup const): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setUserStyleSheetEnabled): (WTR::TestRunner::setAsynchronousSpellCheckingEnabled): 2021-05-09 Khem Raj [Tools] Generate marshalling code without source reference https://bugs.webkit.org/show_bug.cgi?id=225283 Reviewed by Carlos Alberto Lopez Perez. * MiniBrowser/gtk/CMakeLists.txt: 2021-05-09 Ryosuke Niwa IPC testing API should have the ability to send and receive shared memory https://bugs.webkit.org/show_bug.cgi?id=225576 Reviewed by Wenson Hsieh. Added tests for sending and receiving shared memory in the IPC testing API. Also added a test to send semaphore, which was missing in r277199. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: (IPCTestingAPI.CanReceiveSharedMemory): Added. (IPCTestingAPI.CanCreateSharedMemory): Added. (IPCTestingAPI.CanSendSemaphpre): Added after r277199. (IPCTestingAPI.CanSendSharedMemory): Added. 2021-05-09 Myles C. Maxfield [GPU Process] Simplify DisplayList::Iterator part 6: Migrate ItemBufferWritingClient from ItemHandle to a const Variant& https://bugs.webkit.org/show_bug.cgi?id=224270 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: 2021-05-08 Alex Christensen REGRESSION (r276797?): [ macOS/iOS ] TestWebKitAPI.URLSchemeHandler.Exceptions is flakey crashing https://bugs.webkit.org/show_bug.cgi?id=225373 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm: (runUntilTasksInFlight): 2021-05-08 Chris Dumez Port Filesystem::pathByAppendingComponent() & Filesystem:: pathByAppendingComponents() to std::filesystem https://bugs.webkit.org/show_bug.cgi?id=225550 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-07 Chris Dumez Port FileSystem::pathGetFileName() & Filesystem::directoryName() to std::filesystem https://bugs.webkit.org/show_bug.cgi?id=225524 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-07 Brent Fulgham [iOS] Make AccessibilityReduceMotion test case work on iOS https://bugs.webkit.org/show_bug.cgi?id=225244 Reviewed by Per Arne Vollan. New tests for Accessibility-related features were added in Bug 215664, but only for macOS. We support these same features on iOS, and should have test coverage. * TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm: (notificationCallback): (TEST): 2021-05-07 Commit Queue Unreviewed, reverting r277201. https://bugs.webkit.org/show_bug.cgi?id=225542 Includes project file change. Reverted changeset: "[iOS] Make AccessibilityReduceMotion test case work on iOS" https://bugs.webkit.org/show_bug.cgi?id=225244 https://trac.webkit.org/changeset/277201 2021-05-07 Carlos Garcia Campos Do not try to remove and already removed node while deleting selection https://bugs.webkit.org/show_bug.cgi?id=224893 Reviewed by Ryosuke Niwa. Add new API to allow tests to trigger a force repaint on load finished. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::frameDidChangeLocation): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::displayOnLoadFinish): (WTR::TestRunner::shouldDisplayOnLoadFinish): 2021-05-07 Brent Fulgham [iOS] Make AccessibilityReduceMotion test case work on iOS https://bugs.webkit.org/show_bug.cgi?id=225244 New tests for Accessibility-related features were added in Bug 215664, but only for macOS. We support these same features on iOS, and should have test coverage. Reviewed by Per Arne Vollan. * TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm: (notificationCallback): (TEST): 2021-05-07 Ryosuke Niwa IPC testing API should have the ability to create and receive IPC::Semaphore https://bugs.webkit.org/show_bug.cgi?id=225537 Reviewed by Wenson Hsieh. Added tests to make sure IPC testing API allows creation of a semaphore, and receiving one as a reply to an IPC message. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: (IPCTestingAPI.CanReceiveIPCSemaphore): Added. (IPCTestingAPI.CanCreateIPCSemaphore): Added. 2021-05-07 Aakash Jain Use test-tube emoji for EWS status bubbles for tester queues https://bugs.webkit.org/show_bug.cgi?id=225517 Reviewed by Alan Bujtas. * CISupport/ews-app/ews/views/statusbubble.py: (StatusBubble): 2021-05-07 Chris Dumez Add API test for FileSystem::fileExists() and FileSystem::fileMetadata() when dealing with symlinks to symlinks https://bugs.webkit.org/show_bug.cgi?id=225491 Reviewed by Sam Weinig. Update FileSystemTest::SetUp() to use a valid path when constructing the test symlink (tempFileSymlinkPath). Add API test for FileSystem::fileExists() and FileSystem::fileMetadata() when dealing with symlinks to symlinks. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-07 Philippe Normand Unreviewed, WPE gardening * TestWebKitAPI/glib/TestExpectations.json: Unflag test, wpebackend-fdo was downgraded in the SDK revision r277166. 2021-05-06 Chris Dumez Port Filesystem::fileMetadata() & Filesystem::getFileModificationTime() to std::filesystem https://bugs.webkit.org/show_bug.cgi?id=225362 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::runGetFileModificationTimeTest): 2021-05-06 Lauro Moura [WPE] Garden web-process-crashed API test flakiness after SDK update Unreviewed test gardening. * TestWebKitAPI/glib/TestExpectations.json: 2021-05-06 Chris Dumez Regression(r254389?) navigator.languages returns all lowercase languages for ports using CF https://bugs.webkit.org/show_bug.cgi?id=225461 Reviewed by Darin Adler. Update existing API tests to reflect behavior change. * TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm: (TEST): (TEST_F): 2021-05-06 Devin Rousso Sampled Page Top Color: make hit tests consider elements with `pointer-events: none` https://bugs.webkit.org/show_bug.cgi?id=225419 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.HitTestCSSPointerEventsNone): Added. 2021-05-06 Devin Rousso Sampled Page Top Color: don't snapshot if the hit test location is a canvas https://bugs.webkit.org/show_bug.cgi?id=225418 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.HitTestHTMLCanvasWithoutRenderingContext): Added. (TEST.SampledPageTopColor.HitTestHTMLCanvasWithRenderingContext): Added. 2021-05-06 Jonathan Bedard [webkit-patch] setup-git-clone uses master instead of main https://bugs.webkit.org/show_bug.cgi?id=225460 Reviewed by Aakash Jain. * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): Pair the remote branch ref with the Svn remote. 2021-05-06 Chris Dumez Add API test for FileSystem::fileExists() on a broken symbolic link https://bugs.webkit.org/show_bug.cgi?id=225476 Reviewed by Darin Adler. Add API test for FileSystem::fileExists() on a broken symbolic link since this is a special case. FileSystem::fileExists() currently tries to follow symbolic links and will thus return false. The behavior is a little odd but I have verified that this is what our access()-based implementation was returning also before I ported FileSystem::fileExists() to std::filesystem. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-06 Filip Pizlo Make it easy to pass __XPC variables to run-benchmark https://bugs.webkit.org/show_bug.cgi?id=225473 Reviewed by Stephanie Lewis. * Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py: (OSXSafariDriver.launch_url): * Scripts/webkitpy/benchmark_runner/run_benchmark.py: (config_argument_parser): 2021-05-06 Aakash Jain EWS bubbles should show current status after pressing 'Retry failed builds' button https://bugs.webkit.org/show_bug.cgi?id=225411 Reviewed by Jonathan Bedard. * CISupport/ews-app/ews/views/statusbubble.py: (StatusBubble._build_bubble): 2021-05-06 Jonathan Bedard [webkitcorepy] Add API to efficiently create a sequence of commits https://bugs.webkit.org/show_bug.cgi?id=224890 Rubber-stamped by Aakash Jain. While it is possible to simple iterate through a range of commits to define them, every API we use to define commits has much more efficient techniques. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py: (Contributor): Add revision to SVN_AUTHOR_RE and add regex without lines. (Contributor.from_scm_log): Strip leading whitespace from author. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git._args_from_content): (Git.commits): Use `git log` to efficiently compute a range of commits. * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py: (Svn._args_from_content): (Svn.commits): Use `svn log` to efficiently compute a range of commits. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (Git.__init__): Add `git log` mock. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py: (Svn.__init__): Add `svn log` mock and more explicit `svn info` mock. (Svn._log_range): * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub._commits_response): Return all parent commits to provided ref. (GitHub.request): * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py: (Svn.range): More efficiently compute the range. (Svn.request): * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.request): Allow caller to disable pagination. (GitHub.commit): Reduce number of requests required to compute order. (GitHub.commits): Using the `commits` endpoint, more efficiently compute a range of commits. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py: (Svn): Generalize HISTORY_RE to match any single-line SVN XML response. (Svn._cache_revisions): Replace HISTORY_RE with DATA_RE. (Svn.commits): Use svn/rvr to efficiently compute a range of commits. * Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py: (ScmBase._commit_range): Return a pair of commits representing the range the caller is requesting, and preform some basic sanity checks. (ScmBase.commits): Declare function implemented by decedents. * Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py: * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: (TestGit.test_commits): (TestGit.test_commits_branch): (TestGitHub.test_commits): (TestGitHub.test_commits_branch): * Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py: (TestLocalSvn.test_commits): (TestLocalSvn.test_commits_branch): (TestRemoteSvn.test_commits): (TestRemoteSvn.test_commits_branch): 2021-05-06 Chris Dumez REGRESSION (r272414?): [macOS] TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=221742 Reviewed by Youenn Fablet. Check that video.currentTime is changing to determine if the video is playing, instead of relying on [webView _isPlayingAudio]. Also use a test page with a single video element instead of multiple. I am hoping this will make the test more reliable or at least shade some light on why this is flaky. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-05-06 Sam Sneddon mark all SCM tests using SVN as slow, a couple as xfail; enable SCM https://bugs.webkit.org/show_bug.cgi?id=225156 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: (SVNTest): Mark all tests with @slow (GitSVNTest): Mark all tests with @slow * Scripts/webkitpy/conftest.py: (pytest_configure): Define the "slow" marker (pytest_addoption): Add --run-slow to opt-in (pytest_collection_modifyitems): Implement --run-slow * Scripts/webkitpy/pytest.ini: remove "not scm_unitest" * Scripts/webkitpy/test/markers.py: (slow): add our own wrapper around the pytest mark function 2021-05-05 Diego Pino Garcia [build.webkit.org] Add new post-commit builder WPE-Linux-64-bit-Release-Non-Unified-Build https://bugs.webkit.org/show_bug.cgi?id=225385 Reviewed by Aakash Jain. This new post-commit builder will build WPE with Unified builds disabled. By default, builders build WebKit using Unified sources to speed up time compilation. Unfortunately, unified source compilation may hide compilation errors sometimes. A common hidden error are missing headers in some source files. This hidden compilation errors might be discovered later when a group of source files are stashed together in a different manner. Having a Non-Unified source post-commit builder will help to detect regressions in unified source compilation for a certain WebKit port, in this case WPE Release. Usually when these regressions happen they tend to happen too in other ports such as WebKitGTK, Win or PlayStation. * CISupport/build-webkit-org/config.json: 2021-05-05 Jonathan Bedard [run-api-tests] Use webkitcorepy's TaskPool https://bugs.webkit.org/show_bug.cgi?id=225221 Reviewed by Dewei Zhu. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (TaskPool.__enter__): Ensure that mock has been imported before spawning child processes. * Scripts/run-api-tests: Moved from webkitpy/api_tests/run_api_tests.py. * Scripts/webkitpy/api_tests/run_api_tests.py: Moved to run-api-tests. * Scripts/webkitpy/api_tests/runner.py: (_Worker): Representation of Worker process. (_Worker.setup): Pass port object to worker process. (_Worker.teardown): Un-set port object on worker process. (_Worker.__init__): Construct object to hold a Worker process's variables. (_Worker._run_single_test): Log test results, post results to parent. (_Worker.run): Run shard with and post results to parent process. (setup_shard): Run setup in Worker process. (run_shard): Run test shard in Worker process. (report_result): Receive result in the parent process. ((teardown_shard): Tear down Worker process. (Runner.__init__): (Runner.command_for_port): (Runner._shard_tests): Split tests into shards to be efficiently run. (Runner.run): Use TaskPool to run tests in sub processes. (Runner.callback): Save results in parent process. (Runner.result_map_by_status): (Runner.handle): Deleted. (_Worker._run_shard_with_binary): Deleted. (_Worker.post): Deleted. (_Worker.handle): Deleted. 2021-05-05 Devin Rousso Sampled Page Top Color: don't snapshot if the hit test location is an image or has an animation https://bugs.webkit.org/show_bug.cgi?id=225338 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.HitTestHTMLImage): (TEST.SampledPageTopColor.HitTestCSSBackgroundImage): (TEST.SampledPageTopColor.HitTestCSSAnimation): 2021-05-05 Aakash Jain [build.webkit.org] Add a build step to set appropriate permissions on uploaded test results https://bugs.webkit.org/show_bug.cgi?id=225415 Reviewed by Dewei Zhu. * CISupport/build-webkit-org/factories.py: (TestFactory.__init__): Added the build-step. * CISupport/build-webkit-org/steps.py: (ExtractTestResults.resultDirectoryURL): (SetPermissions): Build step to set permissions on uploaded test result directory. 2021-05-05 Alicia Boya García [MSE][GStreamer] WebKitMediaSrc rework v2 https://bugs.webkit.org/show_bug.cgi?id=225192 Reviewed by Xabier Rodriguez-Calvar. WebKitMediaSrc is a GObject class and needs to follow some GObject conventions that conflict with WebKit's. Make the checker aware of this. * Scripts/webkitpy/style/checker.py: 2021-05-05 Devin Rousso Sampled Page Top Color: take additional snapshots further down the page to see if the sampled top color is more than just a tiny strip https://bugs.webkit.org/show_bug.cgi?id=225323 Reviewed by Beth Dakin. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (createWebViewWithSampledPageTopColorMaxDifference): (createHTMLGradientWithColorStops): (TEST.SampledPageTopColor.ZeroMaxDifference): (TEST.SampledPageTopColor.NegativeMaxDifference): (TEST.SampledPageTopColor.SolidColor): (TEST.SampledPageTopColor.DifferentColorsWithoutOutlierBelowMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithLeftOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithMiddleOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithRightOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsIndividuallyAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsCumulativelyAboveMaxDifference): (TEST.SampledPageTopColor.VerticalGradientBelowMaxDifference): Added. (TEST.SampledPageTopColor.VerticalGradientAboveMaxDifference): Added. (TEST.SampledPageTopColor.DISABLED_DisplayP3): (TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor): 2021-05-05 Sam Weinig Add preliminary support for specifying a color space for 2D canvas https://bugs.webkit.org/show_bug.cgi?id=225286 Reviewed by Dean Jackson. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): Add CanvasColorSpaceEnabled for windows. 2021-05-05 Chris Dumez Unreviewed, reverting r276985. This test is still failing on Apple Silicon Reverted changeset: "Unreviewed, try and re-enable AppleLanguagesTest.UpdateAppleLanguages on Apple Silicon." https://commits.webkit.org/r276985 2021-05-05 Chris Dumez REGRESSION (r272414?): [macOS] TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=221742 Reviewed by Youenn Fablet. Make sure the video is looping so that it cannot stop playing before the end of the test. This is a speculative fix since I haven't been able to reproduce the issue. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-05-05 Carlos Garcia Campos [SOUP] Wrong cookie timestamp in case of long expire time https://bugs.webkit.org/show_bug.cgi?id=225389 Reviewed by Adrian Perez de Castro. Add a test case. * TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp: (testCookieManagerLongExpires): (beforeAll): 2021-05-04 Jiewen Tan PCM: Find a way to validate source_secret_token and source_secret_token_signature https://bugs.webkit.org/show_bug.cgi?id=224321 Reviewed by John Wilander. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): Uses RSA-PSS with SHA-384 to verify the signature. 2021-05-04 Jonathan Bedard [webkitscmpy] Scope classes used in TaskPool to object https://bugs.webkit.org/show_bug.cgi?id=225361 Reviewed by Dewei Zhu. The classes used by TaskPool must be stand-alone because they are passed between processes. However, it makes sense that those classes are scoped to the TaskPool object since their usage should always be associated with the TaskPool object * Scripts/libraries/webkitcorepy/setup.py: * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (_Message): Renamed from Message. (_Task): Renamed from Task. (_Result): Renamed from Result. (_Log): Renamed from Log. (_Print): Renamed from Print. (_State): Renamed from State. (_ChildException): Renamed from ChildException. (_BiDirectionalQueue): Renamed from BiDirectionalQueue. (_Process): Renamed from Process. (TaskPool): (TaskPool.do): (Message): Renamed to _Message.. (Task): Renamed to _Task. (Result): Renamed to _Result. (Log): Renamed to _Log. (Print): Renamed to _Print. (State): Renamed to _State. (ChildException): Renamed to _ChildException. (BiDirectionalQueue): Renamed to _BiDirectionalQueue. (Process): Renamed to _Process. 2021-05-04 Chris Dumez Unreviewed, try and re-enable AppleLanguagesTest.UpdateAppleLanguages on Apple Silicon. The test has been updated and it may be passing now or at least fail with a more useful output. * TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm: 2021-05-04 Alex Christensen localStorage changes aren't reflected between WKWebViews using WKWebViewConfiguration._groupIdentifier https://bugs.webkit.org/show_bug.cgi?id=225344 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (TEST): 2021-05-04 Aakash Jain [ews] Ensure file handles are not leaked in unit tests https://bugs.webkit.org/show_bug.cgi?id=225360 Reviewed by Jonathan Bedard. * CISupport/ews-build/email_unittest.py: (EmailsDotJSONTest.test_valid_emails_json): (EmailsDotJSONTest.test_emails_json_required_categories_present): * CISupport/ews-build/loadConfig_unittest.py: (ConfigDotJSONTest.get_config): 2021-05-04 Kate Cheney Unreviewed, adding myself as a reviewer. * Scripts/webkitpy/common/config/contributors.json: 2021-05-03 Kimmo Kinnunen [GPUP] Move GPUProcess WebGL to Experimental Feature https://bugs.webkit.org/show_bug.cgi?id=222836 rdar://75048190 Reviewed by Brent Fulgham. Move the setting for WebGL in GPU process to experimental features but disable it by default, even on layout tests. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): 2021-05-03 Chris Dumez Restore pre-r276879 behavior for FileSystem::moveFile() https://bugs.webkit.org/show_bug.cgi?id=225307 Reviewed by Sam Weinig. Add API test to make sure that FileSystem::moveFile() is able to move directories since this was the case prior to r276879. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-03 Jonathan Bedard [webkitpy] Support pickling platforminfo https://bugs.webkit.org/show_bug.cgi?id=225230 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/common/system/platforminfo.py: (PlatformInfo.__init__): Define default arguments. (PlatformInfo.display_name): Use default platform module if platform_module undefined. (PlatformInfo._win_version_str): Ditto. * Scripts/webkitpy/common/system/platforminfo_unittest.py: (TestPlatformInfo.test_real_code): * Scripts/webkitpy/common/system/systemhost.py: (SystemHost.__init__): Use default platforminfo sys and platform modules. 2021-05-03 Alex Christensen WKWebView: WKURLSchemeHandler request don't have Range headers for custom scheme videos https://bugs.webkit.org/show_bug.cgi?id=203302 Reviewed by Jer Noble and Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: 2021-05-03 Fujii Hironori REGRESSION(r275810): [WebKitTestRunner] fast/text/basic/004.html fails after running fast/layoutformattingcontext tests https://bugs.webkit.org/show_bug.cgi?id=225087 Reviewed by Don Olmstead. fast/layoutformattingcontext tests enable some internal debug settings by using the test file header. These settings weren't reset after running the tests. r275810 changed resetPreferencesToConsistentValues not to call WKPreferencesResetAllInternalDebugFeatures. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): Call WKPreferencesResetAllInternalDebugFeatures. 2021-05-03 Tim Nguyen Add committer status for "Tim Nguyen" in contributors.json https://bugs.webkit.org/show_bug.cgi?id=225320 Unreviewed. * Scripts/webkitpy/common/config/contributors.json: 2021-05-03 Wenson Hsieh editing/selection/ios/become-key-window-when-focusing-editable-area.html is timing out https://bugs.webkit.org/show_bug.cgi?id=225274 rdar://77042575 Reviewed by Tim Horton. This test is timing out on recent versions of iOS because the `-becomeKeyWindow` subclassing hook is no longer invoked when calling `-makeKeyWindow`, in the case where the `UIWindow` was already the key window. The iOS version of WebKitTestRunner on iOS was dependent on this behavior because `setWindowIsKey(false)` on `PlatformWebView` did not actually cause the test runner window to resign from being the key window. Instead, it only set the boolean flag `PlatformWebView::m_windowIsKey`, which `WebKitTestRunnerWindow` then uses to override the value of `-[WebKitTestRunnerWindow isKeyWindow]` (effectively side-stepping platform key window state). We can fix this by refactoring `PlatformWebView::setWindowIsKey` to actually make the `WebKitTestRunnerWindow` resign key window when calling `setWindowIsKey(false)`. Compared to macOS, doing this on iOS is a bit tricky since `-[UIWindow resignKeyWindow]` is purely a subclassing hook that is invoked when the window loses its status as the key window. However, we can work around this limitation by creating a separate `UIWindow` and making that window key instead (which implicitly makes our current `WebKitTestRunnerWindow` resign key window). * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/ios/PlatformWebViewIOS.mm: (WTR::PlatformWebView::setWindowIsKey): Install the other `UIWindow` and make it key in order to resign the current key window. Note that this window is placed just offscreen, so that simulated taps and other gestures will continue to go to the original window. (-[WebKitTestRunnerWindow isKeyWindow]): Deleted. Stop overriding the platform key window state with the simulated test runner state, since we now correctly update platform key window state when setting `m_windowIsKey`. This adjustment is also necessary to ensure that we actually end up in the `!isKey && m_window.keyWindow` case above. 2021-05-03 Jonathan Bedard [webkitcorepy] Pass logging level to child processes https://bugs.webkit.org/show_bug.cgi?id=225311 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (Process.main): Set root logging level. (TaskPool.__init__): Pass logging level to child process. 2021-05-03 Chris Dumez Restore pre-r276879 behavior for FileSystem::deleteFile() and FileSystem::deleteEmptyDirectory() https://bugs.webkit.org/show_bug.cgi?id=225289 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-05-03 Sam Weinig Remove default parameter values for color space and pixel format from ImageBuffer::create to make it clear everwhere we are explicitly requesting SRGB/BGRA8 buffers https://bugs.webkit.org/show_bug.cgi?id=225288 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): Pass arguments explicitly that were previously default values. 2021-05-03 Aakash Jain Remove unused gtk_im_multicontext_get_slave from valgrind/suppressions.txt https://bugs.webkit.org/show_bug.cgi?id=225300 Reviewed by Žan Doberšek. * Scripts/valgrind/suppressions.txt: 2021-05-03 Youenn Fablet Use OptionSet for MediaProducer::MutedStateFlags https://bugs.webkit.org/show_bug.cgi?id=224550 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (TestWebKitAPI::TEST): 2021-05-01 Chris Dumez Start leveraging std::filesystem in WTF::FileSystem https://bugs.webkit.org/show_bug.cgi?id=225255 Reviewed by Sam Weinig. Add API test coverage for the FileSystem API that was modified. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::FileSystemTest::tempFilePath const): (TestWebKitAPI::FileSystemTest::tempFileSymlinkPath const): (TestWebKitAPI::FileSystemTest::tempEmptyFolderPath const): (TestWebKitAPI::FileSystemTest::tempEmptyFolderSymlinkPath const): (TestWebKitAPI::FileSystemTest::tempEmptyFilePath const): (TestWebKitAPI::FileSystemTest::spaceContainingFilePath const): (TestWebKitAPI::FileSystemTest::bangContainingFilePath const): (TestWebKitAPI::FileSystemTest::quoteContainingFilePath const): (TestWebKitAPI::TEST_F): 2021-05-01 Aakash Jain start-local-buildbot-server should fail gracefully for Python 2 https://bugs.webkit.org/show_bug.cgi?id=225268 Reviewed by Alexey Proskuryakov. * CISupport/start-local-buildbot-server: 2021-05-01 Aakash Jain Disable search engine crawling on build.webkit.org webpages https://bugs.webkit.org/show_bug.cgi?id=225252 Reviewed by Jonathan Bedard. Referencec: https://developers.google.com/search/docs/advanced/robots/create-robots-txt * CISupport/build-webkit-org/public_html/robots.txt: 2021-04-30 Wenson Hsieh App highlight UI should be disabled when selecting text in image overlays https://bugs.webkit.org/show_bug.cgi?id=225260 rdar://77359313 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: Add a new API test to verify the behavior of `-targetForAction:withSender:` in `WKContentView`. * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): (WTR::TestOptions::keyTypeMapping): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::appHighlightsEnabled const): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): Add support for a new `TestOption` that enables app highlights. See the new layout test for more information. 2021-04-30 Carlos Alberto Lopez Perez [tools] Make run-buildbot-test compatible with buildbot 2.10.5 https://bugs.webkit.org/show_bug.cgi?id=222540 Reviewed by Aakash Jain. This renames the previous tool run-buildbot-test to start-buildbot-server-virtualenv and it makes several changes to it: - Use python3 and refactor the code. - Make it also work with the EWS config (previously it only worked for the build.webkit.org config). - Use newer buildbot configs. - Instead of hardcoding values try to automatically detect the values from the config dir. - Instead of starting Nth workers by default start only one round-robin worker (local-worker). It also modifies the configuration of the EWS server to add a force scheduler in order to allow to manually trigger builds (only in test mode). * CISupport/build-webkit-org/run-buildbot-test.py: Removed. * CISupport/ews-build/loadConfig.py: (loadBuilderConfig): * CISupport/ews-build/steps.py: (ApplyPatch.start): * CISupport/start-local-buildbot-server: Added. (check_tcp_port_open): (create_tempdir): (print_if_error_stdout_stderr): (cmd_exists): (BuildbotTestRunner): (BuildbotTestRunner.__init__): (BuildbotTestRunner._get_config_tcp_ports): (BuildbotTestRunner.start): (BuildbotTestRunner._wait_for_server_ready): (BuildbotTestRunner._create_mock_worker_passwords_dict): (BuildbotTestRunner._setup_server_workdir): (BuildbotTestRunner._setup_virtualenv): (BuildbotTestRunner._upgrade_db_needed): (BuildbotTestRunner._start_server): (BuildbotTestRunner._get_list_workers): (BuildbotTestRunner._start_worker): (BuildbotTestRunner._clean): 2021-04-30 Brent Fulgham [Cocoa] Always extend access to local process HTTP/3 cache directory https://bugs.webkit.org/show_bug.cgi?id=225171 Reviewed by Alex Christensen. Since we always create the directory (even if HTTP/3 is turned off) we should expect that it is created after loading a page. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2021-04-30 Kyle Piddington Add kpiddington to commiters list https://bugs.webkit.org/show_bug.cgi?id=225253 Reviewed by Dean Jackson. * Scripts/webkitpy/common/config/contributors.json: 2021-04-30 Jonathan Bedard [webkitcmpy] Better document inner-workings of identifier generation https://bugs.webkit.org/show_bug.cgi?id=225241 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.commit): (Git.find): * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py: (Svn.commit): * Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py: (BitBucket.commit): * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.commit): 2021-04-30 Wenson Hsieh [iOS] Add a heuristic to determine whether a synthetic click triggered any meaningful changes https://bugs.webkit.org/show_bug.cgi?id=225240 rdar://77221196 Reviewed by Tim Horton. Add test runner plumbing to test the new heuristic. Note that we can't just utilize the `WKUIDelegatePrivate` method directly, since we end up overriding the web view's `UIClient` via `WKPageSetPageUIClient`, so the call to `m_uiClient->didNotHandleTapAsMeaningfulClickAtPoint(point);` ends up being a no-op. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::installDidNotHandleTapAsMeaningfulClickCallback): (WTR::TestRunner::callDidNotHandleTapAsMeaningfulClickCallback): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::didNotHandleTapAsMeaningfulClick): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didNotHandleTapAsMeaningfulClick): * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]): 2021-04-30 Commit Queue Unreviewed, reverting r276846. https://bugs.webkit.org/show_bug.cgi?id=225242 Breaks test execution in GTK and WPE ports Reverted changeset: "[webkitpy] Support pickling platforminfo" https://bugs.webkit.org/show_bug.cgi?id=225230 https://trac.webkit.org/changeset/276846 2021-04-30 Miguel Gomez [GTK][WPE] Properly recover from unresponsive web processes https://bugs.webkit.org/show_bug.cgi?id=224533 Reviewed by Carlos Garcia Campos. Add unit tests for the new webkit_web_view_terminate_web_process GLib API method. Also move the methods used to wait for responsiveness changes to WebViewTest, as they are used by more than a single test. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewIsWebProcessResponsive): (testWebViewTerminateWebProcess): (testWebViewTerminateUnresponsiveWebProcess): (beforeAll): * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp: (isWebProcessResponsiveChanged): (WebViewTest::waitUntilIsWebProcessResponsiveChanged): * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h: 2021-04-30 Jonathan Bedard [webkitpy] Support pickling platforminfo https://bugs.webkit.org/show_bug.cgi?id=225230 Reviewed by Stephanie Lewis. * Scripts/webkitpy/common/system/platforminfo.py: (PlatformInfo.__init__): Define default arguments. (PlatformInfo.display_name): Use default platform module if platform_module undefined. (PlatformInfo._win_version_str): Ditto. * Scripts/webkitpy/common/system/platforminfo_unittest.py: (TestPlatformInfo.test_real_code): * Scripts/webkitpy/common/system/systemhost.py: (SystemHost.__init__): Use default platforminfo sys and platform modules. 2021-04-30 Aakash Jain report-non-inclusive-language should skip buildstream directory https://bugs.webkit.org/show_bug.cgi?id=225212 Reviewed by Alexey Proskuryakov. * Scripts/report-non-inclusive-language: 2021-04-30 Jonathan Bedard [webkitscpy] Support arguments to TaskPool setup and teardown https://bugs.webkit.org/show_bug.cgi?id=225220 Reviewed by Dewei Zhu. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (Process.main): Accept setup and teardown arguments to child processes. (TaskPool.__init__): Pass setup and teardown arguments to child processes. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py: (setup): Acception optional argument. (teardown): Ditto. (TaskPoolUnittest.test_setup_arguments): (TaskPoolUnittest.test_teardown_arguments): 2021-04-29 Darin Adler Extend SortedArrayMap further to work on case-folded strings, use in MIMETypeRegistry https://bugs.webkit.org/show_bug.cgi?id=224968 Reviewed by Sam Weinig. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added SortedArrayMap.cpp, and removed references to non-existent FullscreenRemoveNodeBeforeEnter.h and FloatQuadTests.h. * TestWebKitAPI/Tests/WTF/SortedArrayMap.cpp: Added. 2021-04-29 Roy Reapor [webkitcorepy] Allow user to specify interpreter used by autoinstall.py to install imported dependencies https://bugs.webkit.org/show_bug.cgi?id=225172 Reviewed by Jonathan Bedard. * Scripts/libraries/webkitcorepy/setup.py: Version bump. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Version bump. * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py: (Package.install): AUTOINSTALL_PYTHON_EXECUTABLE environment variable can override python interpreter used by this module. 2021-04-29 Aakash Jain [webkitpy] Remove deprecated slave-config-json-path parameter in perftestsrunner.py https://bugs.webkit.org/show_bug.cgi?id=225106 Reviewed by Ryosuke Niwa. * Scripts/webkitpy/performance_tests/perftestsrunner.py: (PerfTestsRunner._parse_args): * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: (MainTest.test_parse_deprecated_args): Deleted. 2021-04-29 Aakash Jain Remove unused slave parameter from run-jsc-benchmarks script https://bugs.webkit.org/show_bug.cgi?id=225153 Reviewed by Alexey Proskuryakov. * Scripts/run-jsc-benchmarks: 2021-04-29 Sam Sneddon Make sure webkitpy tests pass on Linux and on more Python versions https://bugs.webkit.org/show_bug.cgi?id=225157 Reviewed by Jonathan Bedard. This gets us passing the webkitpy tests, run under pytest, on Linux, under Python 2.7, 3.6, 3.7, 3.8, 3.9, and alpha 3.10. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Conditionally install setuptools 56 on Python 3, keep setuptools 44.1.1 on Python 2. (44.1.1 is the last release supporting Python 2, but due to removals doesn't install on Python 3.10.) * Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py: (FakeBrowserDriver): Implement a FakeBrowserDriver which does nothing. (FakeBrowserDriver.__init__): (FakeBrowserDriver.prepare_env): (FakeBrowserDriver.prepare_initial_env): (FakeBrowserDriver.restore_env): (FakeBrowserDriver.restore_env_after_all_testing): (FakeBrowserDriver.close_browsers): (FakeBrowserDriver.launch_url): (FakeBrowserDriver.launch_webdriver): (BrowserPerfDashRunnerTest.test_can_construct_runner_object_minimum_parameters): Use the FakeBrowserRunner rather than the platform/browser default. (This fixes this test on Linux when no minibrowser-gtk is available.) * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: (GitTest.setUp): Set user.name/user.email to ensure they're set. (GitSVNTest._setup_git_checkout): Set user.name/user.email to ensure they're set. * Scripts/webkitpy/common/net/credentials.py: Conditionally import keyring; the rest of the code already supports keyring being None. (keyring doesn't have any release supporting both Python 2 and 3.10, but updating keyring pulls in new dependencies and is left as future work.) * Scripts/webkitpy/common/prettypatch_unittest.py: (PrettyPatchTest.check_ruby): Also check Ruby version. (test_pretty_diff_encodings): Explicitly skip; don't just return. (test_pretty_print_empty_string): Explicitly skip; don't just return. * Scripts/webkitpy/common/system/logtesting.py: (TestLogStream.write): Python 3.6's logging appears to put new lines following a message in a new message, which breaks many tests. * Scripts/webkitpy/pytest.ini: Broaden ignored warnings. * Scripts/webkitpy/results/upload_unittest.py: (UploadTest.normalize): collections -> collections.abc for Py3.10 * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager._create_device_with_runtime): Use modern plistlib API. (SimulatedDevice.state): Use modern plistlib API. 2021-04-28 Devin Rousso experiment with averaging sampling colors across the top of the page as the scroll area background https://bugs.webkit.org/show_bug.cgi?id=224987 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: Added. (-[TestKVOWrapper initWithObservable:keyPath:callback:]): (-[TestKVOWrapper dealloc]): (-[TestKVOWrapper observeValueForKeyPath:ofObject:change:context:]): (createWebViewWithSampledPageTopColorMaxDifference): (waitForSampledPageTopColorToChangeForHTML): (createHTMLGradientWithColorStops): (TEST.SampledPageTopColor.ZeroMaxDifference): (TEST.SampledPageTopColor.NegativeMaxDifference): (TEST.SampledPageTopColor.SolidColor): (TEST.SampledPageTopColor.DifferentColorsWithoutOutlierBelowMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithLeftOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithMiddleOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithRightOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsIndividuallyAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsCumulativelyAboveMaxDifference): (TEST.SampledPageTopColor.DisplayP3): (TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor): * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2021-04-28 Jonathan Bedard [webkitpy] Refactor SimulatorDevice https://bugs.webkit.org/show_bug.cgi?id=225158 Reviewed by Stephanie Lewis. * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager._get_device_identifier_for_type): Handle partially defined device types. (SimulatedDevice.is_usable): Place Home Screen services into dictionary. 2021-04-28 Ryosuke Niwa When IPC testing API is enabled, GPU process shouldn't kill Web Process https://bugs.webkit.org/show_bug.cgi?id=225143 Reviewed by Chris Dumez. Added tests for sending IPC messages to GPU process via IPC testing API. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: (IPCTestingAPI.CanSendInvalidAsyncMessageToUIProcessWithoutTermination): Renamed from CanSendInvalidAsyncMessageWithoutTermination. (IPCTestingAPI.CanSendInvalidSyncMessageToUIProcessWithoutTermination): Renamed from CanSendInvalidMessageWithoutTermination. (IPCTestingAPI.CanSendSyncMessageToGPUProcess): Added. (IPCTestingAPI.CanSendAsyncMessageToGPUProcess): Added. (IPCTestingAPI.CanSendInvalidAsyncMessageToGPUProcessWithoutTermination): Added. 2021-04-28 Wenson Hsieh Fine-tune some more selection behaviors in image overlays https://bugs.webkit.org/show_bug.cgi?id=225121 Reviewed by Tim Horton. Add an API test to verify that selected text inside image overlays is dragged out as plain text only. * TestWebKitAPI/Tests/WebKit/simple-image-overlay.html: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TEST): 2021-04-28 Alex Christensen Add SPI to query whether a URL would be upgraded to HTTPS https://bugs.webkit.org/show_bug.cgi?id=225154 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm: (TEST): 2021-04-28 Jonathan Bedard [configure-xcode-for-embedded-development] Support Xcode 12.5 https://bugs.webkit.org/show_bug.cgi?id=225127 Reviewed by Stephanie Lewis. * Scripts/configure-xcode-for-embedded-development: Add definition of com.apple.package-type.mach-o-executable and com.apple.product-type.tool instead of copying from the MacOS SDK. 2021-04-28 Alex Christensen Remove support for NPAPI plugins in WebView https://bugs.webkit.org/show_bug.cgi?id=224449 Reviewed by Geoffrey Garen. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): 2021-04-28 Kimmo Kinnunen Asserting that function or variable is accessed in a certain thread should be simpler and more robust https://bugs.webkit.org/show_bug.cgi?id=224971 Reviewed by Darin Adler. Add simple tests to make sure code in ThreadAssertions.h compiles. * Scripts/generate-gpup-webgl: Use ThreadAssertions in RemoteGraphicsContextGL implementation as an example. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/ThreadAssertionsTest.cpp: Added. (TestWebKitAPI::TEST): (TestWebKitAPI::WTF_REQUIRES_LOCK): 2021-04-27 Aakash Jain Delete unused iExploder https://bugs.webkit.org/show_bug.cgi?id=225118 Rubber-stamped by Alexey Proskuryakov. * iExploder: Removed. 2021-04-27 Kimmo Kinnunen Add a Condition type that supports thread safety analysis https://bugs.webkit.org/show_bug.cgi?id=224970 Reviewed by Darin Adler. A simple test for CheckedCondition to make sure it compiles. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/CheckedConditionTest.cpp: Copied from Tools/TestWebKitAPI/Tests/WTF/CheckedLockTest.cpp. (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/CheckedLockTest.cpp: 2021-04-27 Sam Sneddon Make TestInput immutable https://bugs.webkit.org/show_bug.cgi?id=224989 Reviewed by Jonathan Bedard. The main point here is moving computing reference_files and should_run_pixel_test to when we initially construct TestInput, as at this point this happens in the some process and thread (since bug 221577), hence there's no real reason for it to happen later. In doing this, I've eliminated Port.should_run_as_pixel_test on the basis that no port actually overrode this to apply any different logic, especially given it seems unlikely that any port would want to use different logic here. (Note that ports still have some control through Port.default_pixel_tests.) With this done, it should then be possible to make TestInput immutable, which should help make things easier to understand. Expect, as it happens, there was a reason for it to happen later: we previously generated all the TestInputs twice, once to find out how many workers we need and then another time to actually run them (plus potentially a third time for retries!). There's no actual reason to do this, so move the creation to Manager.run and pass that list around instead of the Tests. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner.run_tests): Don't update TestInput. (LayoutTestRunner._update_test_input): Deleted. * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._test_input_for_file): Moved from _update_test_input and Port.should_run_as_pixel_test. (Manager._get_test_inputs): Deleted. (Manager._multiply_test_inputs): Simplify code used to generated repeated/rerun test inputs. (Manager._update_worker_count): Don't create TestInputs; take test_inputs as arg. (Manager._set_up_run): Rename test_names to test_inputs. (Manager.run): Create TestInput objects here. (Manager._run_test_subset): Take TestInputs not Tests, generate new TestInputs for retry if needed. (Manager._run_tests): Don't create TestInputs; take test_inputs as arg. * Scripts/webkitpy/layout_tests/models/test.py: Fly-by: use __slots__. * Scripts/webkitpy/layout_tests/models/test_input.py: (TestInput): Migrate to attrs. (TestInput.__init__): Deleted. (TestInput.__repr__): Deleted. * Scripts/webkitpy/port/base.py: (Port.should_run_as_pixel_test): Deleted. (Port._should_run_as_pixel_test): Deleted. 2021-04-27 Sam Sneddon Optimize Port._expected_baselines_for_suffixes https://bugs.webkit.org/show_bug.cgi?id=225115 Reviewed by Jonathan Bedard. This takes out the join() and splitext() calls from the inner loop as they are loop invariant, and account for a large proportion of the function's execution time. After this, exists() account for almost all. * Scripts/webkitpy/port/base.py: (Port._expected_baselines_for_suffixes): 2021-04-27 Ryan Haddad [ews] Configure bots for stress test queue https://bugs.webkit.org/show_bug.cgi?id=225000 Reviewed by Aakash Jain. * CISupport/ews-build/config.json: Add ews181 and ews182. 2021-04-27 Alex Christensen Unreviewed, reverting r275912. rdar://77179042 Broke internal client Reverted changeset: "Remove support for NPAPI plugins in WebView" https://bugs.webkit.org/show_bug.cgi?id=224449 https://commits.webkit.org/r275912 2021-04-27 Angelos Oikonomopoulos [JSC] Autoscale jobs for remote boards https://bugs.webkit.org/show_bug.cgi?id=225100 Reviewed by Mark Lam. When using --gnu-parallel-runner, let GNU parallel handle the number of jobs unless the user has explicitly requested a specific number of remote processes. Previously, run-jsc-stress-tests would set numChildProcesses by querying the first remote, under the assumption that the remotes are homogeneous. The number of jobs inferred by looking at the CPUs of the first remote may be inappropriate for the rest of the remotes. * Scripts/run-jsc-stress-tests: 2021-04-27 Don Olmstead [CMake] Don't use FORWARDING_HEADERS_DIR for GTK WebKit headers https://bugs.webkit.org/show_bug.cgi?id=225006 Reviewed by Michael Catanzaro. Use WebKit2Gtk_FRAMEWORK_HEADERS_DIR and WebKit2Gtk_DERIVED_SOURCES_DIR for WebKit2 GTK headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR. * MiniBrowser/gtk/CMakeLists.txt: * TestWebKitAPI/glib/PlatformGTK.cmake: 2021-04-27 Aakash Jain Rename slave to worker in TestFailures https://bugs.webkit.org/show_bug.cgi?id=225079 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/public_html/TestFailures/scripts/Builder.js: * CISupport/build-webkit-org/public_html/TestFailures/scripts/builders_unittests.js: * CISupport/build-webkit-org/public_html/TestFailures/scripts/results_unittests.js: 2021-04-26 Wenson Hsieh Subdivide image overlay text into one or more elements per line https://bugs.webkit.org/show_bug.cgi?id=225038 rdar://75505043 Reviewed by Tim Horton and Devin Rousso. Adjust several existing layout tests after changing `internals.installImageOverlay`. See WebCore ChangeLog for more details. Additionally, rename a WebCore geometry helper method. * TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/simple-image-overlay.html: 2021-04-26 Kate Cheney ResourceLoadStatisticsDatabaseStore::aggregatedThirdPartyData() hangs for a long time https://bugs.webkit.org/show_bug.cgi?id=225063 Reviewed by Brent Fulgham. Test coverage. Currently API testing is the only way to test data migration and schema changes in the ITP database because we can load a pre-seeded database and check the correct values after migration. We should add some ability for unit testing in the future. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): 2021-04-26 Alex Christensen Update Mac-specific CMake files https://bugs.webkit.org/show_bug.cgi?id=225064 Rubber-stamped by Tim Horton. * MiniBrowser/mac/CMakeLists.txt: 2021-04-26 Aakash Jain [ews-app] Status bubble should only display important messages in pop-over - part 4 https://bugs.webkit.org/show_bug.cgi?id=225076 Reviewed by Jonathan Bedard. * CISupport/ews-app/ews/views/statusbubble.py: (StatusBubble): 2021-04-26 Don Olmstead [CMake] Modernize WebKit GLib testing https://bugs.webkit.org/show_bug.cgi?id=225052 Reviewed by Adrian Perez de Castro. Set values on targets directly rather than the older add_definitions and include_directories style. Clean up the code and format it properly. A NO_GTEST_USAGE definition is used to prevent gtest from being included when an alternate testing framework is used. * TestWebKitAPI/config.h: * TestWebKitAPI/glib/CMakeLists.txt: 2021-04-26 Don Olmstead Fix includes for some GTK/GLib headers https://bugs.webkit.org/show_bug.cgi?id=225020 Reviewed by Adrian Perez de Castro. Update include paths to use their correct <> path. * TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp: * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp: * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp: * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp: * TestWebKitAPI/glib/WebKitGLib/gtk/WebViewTestGtk.cpp: * TestWebKitAPI/gtk/PlatformWebViewGtk.cpp: * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: 2021-04-26 Enrique Ocaña González [GStreamer] media/track/in-band/ layout tests introduced in r154908 are failing https://bugs.webkit.org/show_bug.cgi?id=120665 Reviewed by Philippe Normand. Fix media/track/in-band/tests Add libkate as dependency, so gst-plugins-bad detects it and can build the GstKateDec element. This isn't actually needed when using Flatpak (the dependency has been added there), but is still useful when using jhbuild and is also coherent with the need of other multimedia dependencies such as libvpx. * gtk/install-dependencies: * wpe/install-dependencies: 2021-04-25 Ryosuke Niwa Add an option to not enable all experimental features in DumpRenderTree https://bugs.webkit.org/show_bug.cgi?id=225041 Reviewed by Wenson Hsieh. Added --no-enable-all-experimental-features to DumpRenderTree as we did for WebKitTestRunner in r276559. * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): (initializeGlobalsFromCommandLineOptions): 2021-04-25 Darin Adler Fix handling of overflow of /= and *= operators with double over Checked and other 64-bit types. https://bugs.webkit.org/show_bug.cgi?id=224835 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp: Removed tests of the "/=" operator with floating point arguments, no longer supported. 2021-04-25 Tyler Wilcock jsonchecker.py validate_string uses Python 2 basestring type instead of Python 2/3 str type https://bugs.webkit.org/show_bug.cgi?id=224978 Reviewed by Darin Adler. validate_string uses the Python 2 basestring type instead of the Python 2/3 str type. This causes the check to exit early the first time it validates a string with this error: name 'basestring' is not defined This resulted in jsonchecker not checking the file beyond the first string validation. I believe this caused jsonchecker to miss a bug in one of my previous patches in which I put the "settings-flag" property in the wrong place: https://bugs.webkit.org/show_bug.cgi?id=224718#c20 * Scripts/webkitpy/style/checkers/jsonchecker.py: (JSONCSSPropertiesChecker.validate_string): validate_string with Python 2 / 3 str type instead of Python 2 basestring. 2021-04-24 Aakash Jain Rename slave to worker in webkitpy - part 2 https://bugs.webkit.org/show_bug.cgi?id=224988 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/system/crashlogs_unittest.py: 2021-04-24 Ryosuke Niwa Add an option to not enable all experimental features in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=224958 Reviewed by Tim Horton. Added --no-enable-all-experimental-features to run-webkit-tests and WebKitTestRunner. It causes a crash in DumpRenderTree for now. We should rectify this in the future when we align the behaviors of WebKitTestRunner and DumpRenderTree. * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): Added --no-enable-all-experimental-features. * Scripts/webkitpy/port/driver.py: (Driver.cmd_line): Pass along the option to WebKitTestRunner. * WebKitTestRunner/Options.cpp: (WTR::handleOptionNoEnableAllExperimentalFeatures): Added. (WTR::OptionsHandler::OptionsHandler): Added --no-enable-all-experimental-features. * WebKitTestRunner/Options.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): (WTR::TestController::resetPreferencesToConsistentValues): * WebKitTestRunner/TestController.h: 2021-04-24 Tyler Wilcock Refactor ValueRange from enum to enum class https://bugs.webkit.org/show_bug.cgi?id=224981 Reviewed by Sam Weinig. ValueRange has been refactored from enum to enum class : uint8_t to make it smaller and harder to misuse. * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: (TestWebKitAPI::createTestValue): Refactor ValueRangeAll and ValueRangeNonNegative to ValueRange::All and ValueRange::NonNegative. 2021-04-23 Aakash Jain Delete unused buildbot.css and default.css https://bugs.webkit.org/show_bug.cgi?id=224997 Reviewed by Alexey Proskuryakov. * CISupport/build-webkit-org/public_html/buildbot.css: Removed. * CISupport/build-webkit-org/public_html/default.css: Removed. 2021-04-23 Sam Sneddon Add a conftest.py to run existing webkitpy tests in pytest https://bugs.webkit.org/show_bug.cgi?id=224687 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/system/executive_unittest.py: (ExecutiveTest.serial_test_run_in_parallel): Deal with the fact that pytest running the tests might be not be the same version as the autoinstalled version, and not API compatible. * Scripts/webkitpy/conftest.py: Added. (pytest_configure): Define the markers the plugins in conftest use (pytest_addoption): Add --run-integration to allow them to be disabled by default. (pytest_pycollect_makeitem): Rename serial/integration tests so pytest finds them. (pytest_collection_modifyitems): Mark tests as skipped when needed per the above. * Scripts/webkitpy/pytest.ini: Added. * Scripts/webkitpy/test/main_unittest.py: (TestStubs): Stop these from being picked up by pytest as tests. * Scripts/webkitpy/test/markers.py: Fix this so pytest is technically optional, even though it is always present because of the autoinstalled copy. 2021-04-23 Aakash Jain Make report-non-inclusive-language ignore .db files https://bugs.webkit.org/show_bug.cgi?id=224979 Reviewed by Darin Adler. * Scripts/report-non-inclusive-language: 2021-04-23 Youenn Fablet Fix KVO for camera/microphone capture state WKWebView API https://bugs.webkit.org/show_bug.cgi?id=224922 Reviewed by Eric Carlson. Add tests for capture state API. * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (-[MediaCaptureObserver observeValueForKeyPath:ofObject:change:context:]): (TestWebKitAPI::waitUntilCameraState): (TestWebKitAPI::waitUntilMicrophoneState): (TestWebKitAPI::TEST): 2021-04-22 Tyler Wilcock [css-counter-styles] Parse @counter-style descriptors https://bugs.webkit.org/show_bug.cgi?id=224718 Reviewed by Darin Adler. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): Fix typo (missing 's'). CSSCounterStyleAtRulesEnabled, not CSSCounterStyleAtRuleEnabled. 2021-04-22 BJ Burg [Cocoa] re-enable test case WKInspectorDelegate.InspectorConfiguration https://bugs.webkit.org/show_bug.cgi?id=224577 Reviewed by Devin Rousso. Trigger a fetch of a resource that uses a custom URL scheme handler in order to test that custom scheme handlers registered in an _WKInspectorConfiguration are getting used as expected. Add an -inspectorFrontendLoaded: delegate method to -WKInspectorDelegate. This is mainly used to prevent tests from progressing with a half-loaded inspector. To make it possible to do this fetch(), there are some CSP related changes that were made for Main.html so that fetching from a registered custom scheme is allowed. Drive-by, per post-commit comments, add a better fix for the memory leak reported in https://bugs.webkit.org/show_bug.cgi?id=223899. Thanks Joe! * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (resetGlobalState): (-[InspectorDelegate inspectorFrontendLoaded:]): (TEST): (-[UIDelegate _webView:didAttachLocalInspector:]): (-[UIDelegate _webView:willCloseLocalInspector:]): (-[UIDelegate _webViewDidEnableInspectorBrowserDomain:]): (-[UIDelegate _webViewDidDisableInspectorBrowserDomain:]): 2021-04-22 Lauro Moura Unreviewed. Gardening TestSSL flakiness * TestWebKitAPI/glib/TestExpectations.json: 2021-04-22 Simon Fraser Add trace points for WKWebView snapshotting https://bugs.webkit.org/show_bug.cgi?id=224943 Reviewed by Tim Horton. New snapshot descriptions. * Tracing/SystemTracePoints.plist: 2021-04-22 Tim Nguyen Add "Tim Nguyen" to contributors.json. https://bugs.webkit.org/show_bug.cgi?id=224936 Reviewed by Alexey Proskuryakov. * Scripts/webkitpy/common/config/contributors.json: 2021-04-22 Fujii Hironori [Win][WTR] eventSender.leapForward doesn't work as expected https://bugs.webkit.org/show_bug.cgi?id=224918 Reviewed by Don Olmstead. fast/events/click-count.html was failing because eventSender.leapForward didn't work as expected. Use Sleep() API to implement it as well as DRT does. * WebKitTestRunner/win/EventSenderProxyWin.cpp: (WTR::EventSenderProxy::dispatchMessage): (WTR::EventSenderProxy::EventSenderProxy): (WTR::EventSenderProxy::leapForward): 2021-04-22 BJ Burg v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak https://bugs.webkit.org/show_bug.cgi?id=223899 Reviewed by Devin Rousso. Address post-review feedback. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (TEST): 2021-04-22 Sam Sneddon Ensure all non-local AutoInstalled libraries specify version https://bugs.webkit.org/show_bug.cgi?id=224872 Reviewed by Jonathan Bedard. Currently on Python 3 running test-webkitpy fails due to us attempting to install flask 2.0.0rc1, recently released. We shouldn't, however, be installing the latest possible version of flask, but rather specifying one. We do actually attempt to specify one in webkitflaskpy, but we pass the Version object to the wrong place. Now actually specifying the versions, we need to change some of them to the latest version which supports Python 2 to be able to install them to run test-webkitpy-python2. To ensure we don't repeat this, this makes AutoInstall.register raise if you try to register a non-local package without specifying a version. Additionally, require AutoInstall.register's package argument be a Package by passing moving the lookup to AutoInstall.install and requiring it to be successful. Finally, while I'm touching this, make registering 'autoinstalled' an outright failure, and make installing a local package fail if it cannot be found. * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py: (AutoInstall.register): (AutoInstall.install): * Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: 2021-04-21 Wenson Hsieh [iOS] The Look Up text service popover should avoid covering selected text https://bugs.webkit.org/show_bug.cgi?id=224915 rdar://75891746 Reviewed by Megan Gardner. Add a new API test to exercise the change. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/TextServicesTests.mm: Added. (TestWebKitAPI::handleLookup): (TestWebKitAPI::TEST): * TestWebKitAPI/ios/UIKitSPI.h: Add SPI declarations for UIWKTextInteractionAssistant. 2021-04-22 Aakash Jain Services EWS should run for webkitscmpy and webkitcorepy changes https://bugs.webkit.org/show_bug.cgi?id=223941 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (CheckPatchRelevance): * CISupport/ews-build/steps_unittest.py: Added unit-test. 2021-04-22 Sam Sneddon Add an xfail marker for webkitpy's tests; get SCM passing https://bugs.webkit.org/show_bug.cgi?id=224886 Reviewed by Jonathan Bedard. Also: Delete the old, unused skip_if decorator. Fix our runner to detect unexpected-success and report them as failures. * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: (GitSVNTest.test_rebase_in_progress): (GitTestWithMock.test_create_patch): * Scripts/webkitpy/test/markers.py: (xfail): (xfail.decorator): * Scripts/webkitpy/test/runner.py: (Runner.handle): (_Worker.handle): (TestResult): (TestResult.__init__): (TestResult.addSuccess): * Scripts/webkitpy/test/runner_unittest.py: (FakeTestCase): (FakeTestCase.__init__): (FakeTestCase.id): (FakeModuleSuite.run): * Scripts/webkitpy/test/skip.py: Removed. * Scripts/webkitpy/test/skip_unittest.py: Removed. 2021-04-22 Sam Sneddon server_process_unittest.py's MockFile should all be bytes https://bugs.webkit.org/show_bug.cgi?id=224877 Reviewed by Jonathan Bedard. This fixes the test when run under pytest on Python 3. * Scripts/webkitpy/port/server_process_unittest.py: (MockFile.read): 2021-04-22 Sam Sneddon Fix potential flakiness when running webkitpy tests https://bugs.webkit.org/show_bug.cgi?id=224887 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/system/executive_unittest.py: (ExecutiveTest.serial_test_run_in_parallel): Increase the delay to ensure it's much greater than the VM spawn time, as the current time is a bit marginal when the system is under load and we're using the spawn multiprocessing start method * Scripts/webkitpy/test/main.py: (Tester.run): Allow argv to be passed through for testing * Scripts/webkitpy/test/main_unittest.py: (TesterTest.test_no_tests_found): Explicitly pass argv to avoid using sys.argv * Scripts/webkitpy/w3c/test_parser_unittest.py: (TestParserTest.test_analyze_pixel_test_all_true): Reset options after test (TestParserTest.test_analyze_pixel_test_all_false): Reset options after test * Scripts/webkitpy/xcode/simulated_device_unittest.py: (SimulatedDeviceTest.reset_simulated_device_manager): _device_identifier_to_name is a dict, and should remain one 2021-04-22 Myles C. Maxfield [iOS] Web processes recreated after crashing are not created with the right contentSizeCategory https://bugs.webkit.org/show_bug.cgi?id=224916 Reviewed by Tim Horton. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/TextStyleFontSize.mm: Added. (-[TextStyleFontSizeWebView _contentSizeCategory]): (TEST): 2021-04-21 Commit Queue Unreviewed, reverting r276380 and r276386. https://bugs.webkit.org/show_bug.cgi?id=224912 Caused WPT css/css-counter-styles/cssom test crashes on macOS WK1 with ASan Reverted changesets: "[css-counter-styles] Parse @counter-style descriptors" https://bugs.webkit.org/show_bug.cgi?id=224718 https://trac.webkit.org/changeset/276380 "CSSComputedStyleDeclaration.cpp should use C++ style comments" https://bugs.webkit.org/show_bug.cgi?id=224875 https://trac.webkit.org/changeset/276386 2021-04-21 Chris Dumez Regression(r275887) open.spotify.com says Safari is not supported https://bugs.webkit.org/show_bug.cgi?id=224905 Reviewed by Eric Carlson. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-04-21 Aakash Jain [build.webkit.org] Disable unused parameters in force build dialog box https://bugs.webkit.org/show_bug.cgi?id=224544 Unreviewed minor infrastructure fix. * CISupport/build-webkit-org/loadConfig.py: 2021-04-21 Don Olmstead [Python 3] Update gni-to-cmake.py https://bugs.webkit.org/show_bug.cgi?id=224880 Reviewed by Kenneth Russell. Update script to use the `--prepend` argument. * Scripts/update-angle: 2021-04-21 Chris Dumez GPUProcess launches unnecessarily when loading the amazon front page https://bugs.webkit.org/show_bug.cgi?id=224843 Reviewed by Eric Carlson. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-04-21 Sam Sneddon Always pass --no-abbrev-commit to git-log/show https://bugs.webkit.org/show_bug.cgi?id=224879 Reviewed by Jonathan Bedard. Currently some of the SCM tests fail with git's log.abbrevCommit; we should avoid any risk of the tests failing or functionality being broken by always asking for the unabbreviated commit. * Scripts/webkitpy/common/checkout/scm/git.py: (Git.local_commits): (Git.exists): (Git._changes_files_for_commit): (Git.revisions_changing_file): (Git._most_recent_log_matching): (Git._most_recent_log_for_revision): (Git.git_commit_from_svn_revision): (Git.contents_at_revision): (Git.show_head): (Git.committer_email_for_revision): 2021-04-21 Tyler Wilcock [css-counter-styles] Parse @counter-style descriptors https://bugs.webkit.org/show_bug.cgi?id=224718 Reviewed by Darin Adler. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): Fix typo (missing 's'). CSSCounterStyleAtRulesEnabled, not CSSCounterStyleAtRuleEnabled. 2021-04-21 Sam Sneddon Handle os.getenv returning None https://bugs.webkit.org/show_bug.cgi?id=224869 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/checkout/scm/svn.py: (SVNRepository.has_authorization_for_realm): This entirely replaces reading $HOME with a call to os.path.expanduser. Notably, the stdlib function both handles cases on Unix-like OSes when $HOME is undefined and on Windows (where $HOME is undefined by default) correctly constructs the path. * Scripts/webkitpy/common/system/executive.py: (Executive.kill_all): Handle $USER being undefined by just attempting to kill all processes regardless of owner. 2021-04-21 Simon Fraser Enhance scrolling-related trace points https://bugs.webkit.org/show_bug.cgi?id=224852 Reviewed by Tim Horton. Update trace point descriptions. * Tracing/SystemTracePoints.plist: 2021-04-21 Lauro Moura [WPE] Allow defining custom repo and branch for Cog checkout https://bugs.webkit.org/show_bug.cgi?id=224739 Reviewed by Philippe Normand. Use cmake args "-DWPE_COG_REPO=" and "-DWPE_COG_TAG=" to build different cog versions without having to edit the cmake files. There might be the need to wipe the checked-out dir from time to time, as only CMake 3.18 introduced different checkout strategies. Previous cmakes try to rebase the previously checked out branch which might lead to conflicts. This commit also allows selecting between Cog and MiniBrowser with the WPE_BROWSER envvar. * PlatformWPE.cmake: * Scripts/webkitpy/port/wpe.py: (WPEPort.cog_path): (WPEPort): (WPEPort.browser_name): (WPEPort.run_minibrowser): * Scripts/webkitpy/port/wpe_unittest.py: (WPEPortTest.test_default_upload_configuration): (WPEPortTest): (WPEPortTest.test_browser_name_default): (WPEPortTest.test_browser_name_with_cog_built): (WPEPortTest.test_browser_name_override_minibrowser_with_cog_built): (WPEPortTest.test_browser_name_override_cog_without_cog_built): (WPEPortTest.test_browser_name_override_unknown): * Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: (WebDriverWPE.browser_name): Make it cog-aware. (WebDriverWPE.browser_path): Ditto. 2021-04-21 Tim Horton Long-pressing a data detectors link causes the link to be followed https://bugs.webkit.org/show_bug.cgi?id=224847 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm: (TEST): Add tests ensuring that we get a click event for completed touches, and not for cancelled touches. 2021-04-21 Megan Gardner Support scrolling to a selected AppHighlight https://bugs.webkit.org/show_bug.cgi?id=224773 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm: (TestWebKitAPI::TEST): 2021-04-20 Devin Rousso Parse `theme_color` in web application manifests and pass it along to `-[WKWebView themeColor]` https://bugs.webkit.org/show_bug.cgi?id=224796 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: (ApplicationManifestParserTest::testThemeColor): Added. (TEST_F.ApplicationManifestParserTest.ThemeColor): Added. * TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: (TEST.ApplicationManifestBasic): (TEST.ApplicationManifestCoding): * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/HTMLMetaThemeColor.mm. (TEST.WKWebViewThemeColor.ApplicationManifest): (TEST.WKWebViewThemeColor.MetaElementOverridesApplicationManifest): Rename this file now that it also deals with web application manifest (in addition to ``). * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2021-04-20 Tim Horton MacCatalyst tests crash on NSInternalInconsistencyException, reason: NSApplication has not been created yet https://bugs.webkit.org/show_bug.cgi?id=224606 Reviewed by Wenson Hsieh. * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Link UIKitMacHelper in macCatalyst builds. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/ios/UIKitMacHelperSPI.h: Added. * TestWebKitAPI/ios/mainIOS.mm: (main): Call UINSApplicationInstantiate to keep the tests limping along until we create an actual UIApp. * TestWebKitAPI/Configurations/TestWTF.xcconfig: Also, fix the TestWTF configuration to not link Cocoa in macCatalyst builds. 2021-04-20 Kate Cheney Preconnect tasks and preflight checks do not correctly mark app-bound context string https://bugs.webkit.org/show_bug.cgi?id=224779 Reviewed by Brent Fulgham. We should clear data between tests to avoid flakiness or failures. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): (WTR::TestController::clearAppBoundNavigationData): * WebKitTestRunner/TestController.h: * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::clearAppBoundNavigationData): 2021-04-20 Basuke Suzuki [PlayStation] Remove warnings for unused parameter. https://bugs.webkit.org/show_bug.cgi?id=224830 Reviewed by Darin Adler. * MiniBrowser/playstation/main.cpp: (main): 2021-04-20 Kimmo Kinnunen gtest.a exports symbols, causing link-time warning: direct access in function ... means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. https://bugs.webkit.org/show_bug.cgi?id=224812 Reviewed by Alexey Proskuryakov. Compile and use gtest as a static library that does not export any symbols. Fixes link-time warnings about mismatch of symbol visibility. The error occurs when gtest.a is compiled exporting symbols with default visibility, but the clients use the library and hide the symbols via ld flags. * TestWebKitAPI/Configurations/TestWTF.xcconfig: * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Compile the gtest clients with GTEST_API_= 2021-04-20 Don Olmstead [CMake] Don't use FORWARDING_HEADERS_DIR for JSC GLib headers https://bugs.webkit.org/show_bug.cgi?id=224821 Reviewed by Michael Catanzaro. Use JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR and JavaScriptCoreGLib_DERIVED_SOURCES_DIR for GLib JSC headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR. * MiniBrowser/wpe/CMakeLists.txt: * TestWebKitAPI/glib/CMakeLists.txt: * TestWebKitAPI/glib/PlatformWPE.cmake: 2021-04-20 Aakash Jain Switch commit-queue back to git.webkit.org https://bugs.webkit.org/show_bug.cgi?id=224762 Reviewed by Jonathan Bedard. * CISupport/ews-build/factories.py: (CommitQueueFactory.__init__): Use git.webkit.org for Commit-Queue. * CISupport/ews-build/factories_unittest.py: (TestCommitQueueFactory.test_commit_queue_factory): Updated unit-tests. * CISupport/ews-build/steps.py: (CheckOutSource.__init__): (PushCommitToWebKitRepo.evaluateCommand): 2021-04-20 Alex Christensen Fix use-after-move introduced in r275407 https://bugs.webkit.org/show_bug.cgi?id=224045 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm: (-[FakeWebGeolocationPolicyDecider receivedRequest]): (-[FakeWebGeolocationPolicyDecider decidePolicyForGeolocationRequestFromOrigin:requestingURL:window:listener:]): (fakeWebGeolocationPolicyDecider): (TestWebKitAPI::TEST): * TestWebKitAPI/ios/UIKitSPI.h: 2021-04-20 Marco Felsch [WPE][Qt] Fix build failure after r270690 https://bugs.webkit.org/show_bug.cgi?id=223070 Reviewed by Philippe Normand. * Scripts/webkitpy/style/checker.py: Add exception for WPE QT wrapper library to use system alloc instead of WTF. 2021-04-19 Chris Dumez REGRESSION (r276189): GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is crashing https://bugs.webkit.org/show_bug.cgi?id=224790 Reviewed by Darin Adler. Re-enable API test now that it is no longer crashing. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-04-19 Chris Dumez Unreviewed, temporarily disable GPUProcess.DISABLED_WebProcessTerminationAfterTooManyGPUProcessCrashes https://bugs.webkit.org/show_bug.cgi?id=224790 It is crashing. I will renable it with the fix at Bug 224790. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-04-19 Aakash Jain [ews] Enabled detailed error log when unit-tests fails https://bugs.webkit.org/show_bug.cgi?id=224789 Unreviewed minor unit-test fix. * CISupport/ews-build/factories_unittest.py: (TestCase): Set maxDiff to None. 2021-04-19 BJ Burg Can't use Web Inspector on web views made by TestWebKitAPI https://bugs.webkit.org/show_bug.cgi?id=147073 Reviewed by Devin Rousso. It is necessary to spin a nested run loop at the point in the test where you would like to remote inspect a WebView. Messages from the remote connection are dispatched through UIProcess, so if lldb has paused UIProcess, WebInspectorUI will not be able to get any data from the inspected WebView. * TestWebKitAPI/DebugUtilities.h: Added. Add macros to wait for a remote inspector to attach or detach, then drop into the debugger when it has done so. * TestWebKitAPI/PlatformUtilities.h: Add missing `#pragma once`. * TestWebKitAPI/WTFStringUtilities.h: Force the build to fail noisily if we have attempted to redefine WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING. Force the correct ordering between "WTFStringUtilities.h" and . 2021-04-19 Wenson Hsieh Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty() https://bugs.webkit.org/show_bug.cgi?id=224769 Reviewed by Tim Horton. Add an API test to exercise the new `FloatQuad::isEmpty()` method. * TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp: (TestWebKitAPI::checkIsEmpty): (TestWebKitAPI::TEST): 2021-04-19 Tim Horton Fix the macCatalyst TestWebKitAPI build https://bugs.webkit.org/show_bug.cgi?id=224780 * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Unreviewed build fix; link PDFKit since we now enable it. 2021-04-19 Chris Dumez SVG Images launch the GPUProcess unnecessarily https://bugs.webkit.org/show_bug.cgi?id=224770 Reviewed by Eric Carlson. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-04-19 Philippe Normand Unreviewed, WPE Minibrowser build warning fix. * MiniBrowser/wpe/main.cpp: No need to use typedef for this struct declaration. 2021-04-19 Kimmo Kinnunen Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards https://bugs.webkit.org/show_bug.cgi?id=221614 Reviewed by David Kilzer. * TestWebKitAPI/Configurations/Base.xcconfig: Add -Wthread-safety to compile flags. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/CheckedLock.cpp: Added. (TestWebKitAPI::TEST): Implement a test for testing that CheckedLock compiles. 2021-04-18 Zalan Bujtas Update name in contributors.json https://bugs.webkit.org/show_bug.cgi?id=224731 Unreviewed. * Scripts/webkitpy/common/config/contributors.json: 2021-04-17 Chris Dumez GPUConnectionToWebProcess::allowsExitUnderMemoryPressure() should check if libWebRTCCodecsProxy is used https://bugs.webkit.org/show_bug.cgi?id=224709 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (runMemoryPressureExitTest): (waitUntilCaptureState): (TEST): 2021-04-17 Wenson Hsieh Remove PromisedAttachmentInfo::blobURL and adjacent code https://bugs.webkit.org/show_bug.cgi?id=224720 Reviewed by Ryosuke Niwa. Rebaseline a couple of iOS WKAttachment tests that are failing on recent versions of the iOS SDK. The content type of text files that are inserted as attachments is now a MIME type rather than a UTI, which is still valid since it is valid for the content type of an attachment to be either a MIME type or UTI. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (TestWebKitAPI::TEST): 2021-04-17 Aakash Jain Do not configure Janitor to delete old logs in local testing mode https://bugs.webkit.org/show_bug.cgi?id=224552 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/master_buildbot2.cfg: * CISupport/ews-build/master.cfg: 2021-04-16 Lauro Moura REGRESSION(r276164) [GTK] WKPreferencesDefaults API test is failing https://bugs.webkit.org/show_bug.cgi?id=224710 Reviewed by Alex Christensen. As of r276164, Mac/iOS disabled application cache by default but other ports are still enabling it. * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp: (TestWebKitAPI::TEST): Add missing WPE guard and test against expected port value instead of enforcing a single value for every port. * TestWebKitAPI/glib/TestExpectations.json: Remove WPE expected failure. 2021-04-16 Brent Fulgham Perform port blocking earlier in the load https://bugs.webkit.org/show_bug.cgi?id=224525 Reviewed by Darin Adler. Update URLScheme test to use a non-prohibited port for the test. Tests of failed fetches are already handled in WPT and other tests, so using a valid port here should continue to be a valid test. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: (-[FrameSchemeHandler webView:startURLSchemeTask:]): Use allowed port or the test instead of 123. 2021-04-16 Chris Dumez RemoteAudioDestinationProxy should not launch / relaunch the GPUProcess unless it is actually rendering https://bugs.webkit.org/show_bug.cgi?id=224691 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/audio-context-playing.html: 2021-04-16 Jiewen Tan Pass credential name to the WebAuthn UI during registration https://bugs.webkit.org/show_bug.cgi?id=224697 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-04-16 Kate Cheney Disable app-bound request API tests on specific OS versions https://bugs.webkit.org/show_bug.cgi?id=223692 Reviewed by Brent Fulgham. These test rely on internal additions only available on certain OS versions. We should disable them on other versions. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: 2021-04-16 Alex Christensen Disable ApplicationCache with linkedOnOrAfter check https://bugs.webkit.org/show_bug.cgi?id=224629 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): 2021-04-16 Tyler Wilcock [css-counter-styles] Parse and add feature flag for @counter-style https://bugs.webkit.org/show_bug.cgi?id=223150 Reviewed by Darin Adler. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): Add `false` defaults for CSSCounterStyleAtRulesEnabled and CSSCounterStyleAtRuleImageSymbolsEnabled flags. 2021-04-16 Chris Dumez Exit the GPUProcess when under memory pressure if it is not being used https://bugs.webkit.org/show_bug.cgi?id=224556 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (runMemoryPressureExitTest): (TEST): 2021-04-16 Aakash Jain [ews] Improve step description when layout-tests step is skipped https://bugs.webkit.org/show_bug.cgi?id=224666 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (RunWebKitTests.getResultSummary): * CISupport/ews-build/steps_unittest.py: Updated unit-tests. 2021-04-16 Manuel Rego Casasnovas Avoid converting HTML chars in _W3CTestConverter https://bugs.webkit.org/show_bug.cgi?id=224658 Reviewed by Adrian Perez de Castro. There has been a change in Python HTMLParser in version 3.5 that makes convert_charrefs to be True by default: https://docs.python.org/3/library/html.parser.html This is causing that we're modifying the tests that have HTML characters, which is something we shouldn't change and was not happening in previous Python 3 versions, or Python 2. * Scripts/webkitpy/w3c/test_converter.py: (_W3CTestConverter.__init__): Set convert_charrefs to False. * Scripts/webkitpy/w3c/test_converter_unittest.py: Update test to include HTML chars and check that they're not modified. 2021-04-16 Youenn Fablet Promote WKWebView device orientation permission delegate to API https://bugs.webkit.org/show_bug.cgi?id=223919 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm: (-[DeviceOrientationPermissionUIDelegate webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]): (-[DeviceOrientationPermissionValidationDelegate webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[WebsitePoliciesDeviceOrientationUIDelegate webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]): 2021-04-15 Aakash Jain Pass -d parameter to git clean in commit-queue https://bugs.webkit.org/show_bug.cgi?id=224636 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (CleanGitRepo): * CISupport/ews-build/steps_unittest.py: 2021-04-15 Sam Sneddon scm_unittest.py fails at import-time on Python 2 https://bugs.webkit.org/show_bug.cgi?id=224627 Reviewed by Jonathan Bedard. * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py: (Package.__repr__): Add a __repr__ for debug friendliness * Scripts/webkitpy/__init__.py: pathlib2 never provides pathlib * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: ditto 2021-04-15 Jonathan Bedard style checker should warn about adding new PHP files https://bugs.webkit.org/show_bug.cgi?id=223905 Reviewed by Youenn Fablet. * Scripts/webkitpy/style/checker.py: (CheckerDispatcher.is_valid_file): Check if a file has a file extension for an unsupported language. (StyleProcessor.should_process): If a file has an extension of an unsupported language, report a style error. * Scripts/webkitpy/style/checker_unittest.py: (CheckerDispatcherDispatchTest.test_text_paths): php files are now invalid extensions. (CheckerDispatcherDispatchTest.test_none_paths): php files have no checker. (StyleProcessor_CodeCoverageTest.MockDispatcher.is_valid_file): (StyleProcessor_CodeCoverageTest.test_invalid_file): Check that an error is returned when checking a file with an invalid extension. * Scripts/webkitpy/style/checkers/cpp.py: (CppChecker): Add a language rule. 2021-04-15 Sam Sneddon webkitpy classes need not define loads/dumps helpers for pickle https://bugs.webkit.org/show_bug.cgi?id=224620 Reviewed by Jonathan Bedard. * Scripts/webkitpy/layout_tests/models/test_failures.py: (TestFailure.loads): Deleted. (TestFailure.dumps): Deleted. * Scripts/webkitpy/layout_tests/models/test_failures_unittest.py: (TestFailuresTest.assert_pickle_roundtrip): (TestFailuresTest.test_pickle_roundtrip): * Scripts/webkitpy/layout_tests/models/test_results.py: (TestResult.loads): Deleted. (TestResult.dumps): Deleted. * Scripts/webkitpy/layout_tests/models/test_results_unittest.py: (TestResultsTest.test_pickle_roundtrip): 2021-04-15 Wenson Hsieh WKContentView should become focused without requiring -[WKWebView canBecomeFocused] to return YES https://bugs.webkit.org/show_bug.cgi?id=224613 Reviewed by Tim Horton. Adjust an existing API test so that it adopts the new UI delegate method. * TestWebKitAPI/Tests/ios/UIFocusTests.mm: (-[UIFocusDelegate _webViewCanTakeFocus:]): (-[UIFocusDelegate _webView:takeFocus:]): (TestWebKitAPI::TEST): (-[UIFocusTestWKWebView canBecomeFocused]): Deleted. 2021-04-15 Jonathan Bedard [results.webkit.org] Fully report git commits https://bugs.webkit.org/show_bug.cgi?id=224519 Reviewed by Aakash Jain. Rather than allowing the back-end to fully define commits associated with a test, define those commits client side and post the result. * Scripts/webkitpy/layout_tests/models/test_run_results.py: (summarize_results): Handle fully qualified commits. * Scripts/webkitpy/port/base.py: (Port.commits_for_upload): Fully define git commits. * Scripts/webkitpy/port/base_unittest.py: (PortTest.test_commits_for_upload_git_svn): 2021-04-15 Brady Eidson Move WKURLSchemeTask redirect API to SPI https://bugs.webkit.org/show_bug.cgi?id=224581 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: (-[TaskSchemeHandler webView:startURLSchemeTask:]): (-[HTTPRedirectTest webView:startURLSchemeTask:]): Deleted. (-[HTTPRedirectTest webView:stopURLSchemeTask:]): Deleted. 2021-04-15 Aakash Jain Allow fast-cq as a prefix for patch name for fast-cq mode on commit-queue https://bugs.webkit.org/show_bug.cgi?id=224580 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (BugzillaMixin): (BugzillaMixin._is_patch_obsolete): * CISupport/ews-build/steps_unittest.py: Updated unit-test. 2021-04-14 Devin Rousso Promote `-[WKWebView _themeColor]` SPI to API https://bugs.webkit.org/show_bug.cgi?id=224571 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/HTMLMetaThemeColor.mm: (TEST.HTMLMetaThemeColor.OnLoad): (TEST.HTMLMetaThemeColor.MultipleTags): (-[WKWebViewThemeColorObserver initWithWebView:]): (TEST.HTMLMetaThemeColor.KVO): (TEST.HTMLMetaThemeColor.ExperimentalUseThemeColorForScrollAreaBackgroundColor): 2021-04-14 Youenn Fablet Update WKPageSet implementation according new MediaProducer::MutedState values https://bugs.webkit.org/show_bug.cgi?id=224548 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (TestWebKitAPI::doCaptureMuteTest): (TestWebKitAPI::TEST): 2021-04-14 Alex Christensen Don't block proxy authentication challenges https://bugs.webkit.org/show_bug.cgi?id=224564 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::proxyAuthenticationServer): (TestWebKitAPI::webViewAndDelegate): (TestWebKitAPI::TEST): 2021-04-14 Jonathan Bedard [GitHub] Add script to verify integrity of the mirror https://bugs.webkit.org/show_bug.cgi?id=224514 Reviewed by Aakash Jain. * Scripts/check-github-mirror-integrity: Added. 2021-04-14 Jonathan Bedard [results.webkit.org] Document ref API argument https://bugs.webkit.org/show_bug.cgi?id=224435 Reviewed by Aakash Jain. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version. * Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html: * Scripts/libraries/resultsdbpy/setup.py: Bump version. 2021-04-14 Kate Cheney Service worker soft-update loads not being marked app-bound https://bugs.webkit.org/show_bug.cgi?id=223200 Reviewed by Youenn Fablet. API test coverage. Refactor to avoid code duplication in other tests. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: A soft update might be delayed after the synthetic response comes back. We should wait until we receive the test data indicating that a soft update has occurred before checking the app-bound values. 2021-04-14 Aakash Jain Add support for using local-worker for build.webkit.org https://bugs.webkit.org/show_bug.cgi?id=224551 Reviewed by Carlos Alberto Lopez Perez. * CISupport/build-webkit-org/loadConfig.py: (loadBuilderConfig): Added local-worker support. * CISupport/ews-build/loadConfig.py: (loadBuilderConfig): Removed use_localhost_worker variable. 2021-04-14 Aakash Jain Commit queue isn't skipping builds and test on revert patches https://bugs.webkit.org/show_bug.cgi?id=224477 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (BugzillaMixin): Changed preamble to lower-case to match with new logic. * CISupport/ews-build/steps_unittest.py: Added unit-tests. 2021-04-14 Carlos Garcia Campos [GTK4] Use a while loop in PlatformWebView::dismissAllPopupMenus() https://bugs.webkit.org/show_bug.cgi?id=224534 Reviewed by Philippe Normand. The child might be destroyed during the loop iteration. Using a while loop we ensure we get the next sibling before the current child is destroyed. * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: (WTR::PlatformWebView::dismissAllPopupMenus): 2021-04-14 Miguel Gomez [GTK][WPE] Add a property to the WebKitWebView indicating whether the web process is responsive https://bugs.webkit.org/show_bug.cgi?id=224359 Reviewed by Adrian Perez de Castro. Added unit test for web process responsiveness API. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewIsWebProcessResponsive): (beforeAll): 2021-04-13 Myles C. Maxfield [GPU Process] Simplify DisplayList::Iterator part 4: Move DisplayList::Iterator to its own .h/.cpp files https://bugs.webkit.org/show_bug.cgi?id=224146 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: 2021-04-13 Alex Christensen Remove support for NPAPI plugins in WebView https://bugs.webkit.org/show_bug.cgi?id=224449 Reviewed by Chris Dumez. Keep them on in tests until we remove the code. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): 2021-04-13 Alex Christensen Remove support for NPAPI plugins in WKWebView https://bugs.webkit.org/show_bug.cgi?id=224451 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/Copying.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[PlugInDelegate _webView:unavailablePlugInButtonClickedWithReason:plugInInfo:]): Deleted. 2021-04-13 Yusuke Suzuki [WTF] Add Vector&& move constructor / assignment to FixedVector and RefCountedArray https://bugs.webkit.org/show_bug.cgi?id=224475 Reviewed by Ryosuke Niwa. * TestWebKitAPI/Tests/WTF/FixedVector.cpp: (TestWebKitAPI::TEST): 2021-04-13 Alex Christensen Remove SharedBuffer's equality operators with Ref https://bugs.webkit.org/show_bug.cgi?id=224464 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): 2021-04-13 Devin Rousso [iOS] Only use the theme color if it's valid when `UseThemeColorForScrollAreaBackgroundColor` is enabled https://bugs.webkit.org/show_bug.cgi?id=224455 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/HTMLMetaThemeColor.mm: (createWebView): Added. (TEST.HTMLMetaThemeColor.ExperimentalUseThemeColorForScrollAreaBackgroundColor): Added. 2021-04-12 Simon Fraser REGRESSION (r275792): [ iOS wk2 ] TestWebKitAPI.IndexedDB.DatabaseProcessKill is a flakey timeout https://bugs.webkit.org/show_bug.cgi?id=224454 Reviewed by Brady Eidson, Sihui Liu. This test was racey; the content ran script immediately, and it was possible for the first set of messages to be received before -_test_waitForDidFinishNavigation returned; the test would then stall because nothing triggered any more messages. Fix by removing the call to -_test_waitForDidFinishNavigation and setting receivedScriptMessage to false after waiting for the previous message. * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill-1.html: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm: (TEST): 2021-04-13 Sam Sneddon Test objects should know if they need servers https://bugs.webkit.org/show_bug.cgi?id=224442 Reviewed by Jonathan Bedard. This also removes the unused Manager.needs_servers * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py: (LayoutTestFinder.__init__): Move known paths from Manager.__init__ (LayoutTestFinder.find_tests_by_path): * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager.__init__): (Manager._is_http_test): Deleted. (Manager._is_websocket_test): Deleted. (Manager._needs_web_platform_test): Deleted. (Manager._http_tests): Deleted. (Manager._tests_to_run): (Manager._test_input_for_file): (Manager.needs_servers): Deleted. (Manager.run): * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: (ManagerTest.test_needs_servers): Deleted. (ManagerTest.integration_test_needs_servers): Deleted. * Scripts/webkitpy/layout_tests/models/test.py: (Test): (Test.needs_http_server): (Test.needs_websocket_server): (Test.needs_wpt_server): (Test.needs_any_server): 2021-04-13 Chris Dumez The GPUProcess should only launch when it is needed https://bugs.webkit.org/show_bug.cgi?id=224461 Reviewed by Eric Carlson. Add layout test coverage. * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): 2021-04-13 Carlos Garcia Campos [GTK4] WTR crash in PlatformWebView::dismissAllPopupMenus() https://bugs.webkit.org/show_bug.cgi?id=224487 Reviewed by Philippe Normand. This is because we are using a for loop to iterate children that are destroyed. We should not be destroying the children, though, we should just hide them, since they are owned by the web view. * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: (WTR::PlatformWebView::dismissAllPopupMenus): 2021-04-13 Aakash Jain Delete various old EWS specific scripts https://bugs.webkit.org/show_bug.cgi?id=224460 Reviewed by Alexey Proskuryakov. * EWSTools/Start-Queue.ps1: Removed. * EWSTools/boot.sh: Removed. * EWSTools/build-boot-cmd.sh: Removed. * EWSTools/screen-config: Removed. * EWSTools/start-queue-mac.sh: Removed. * EWSTools/start-queue-win.sh: Removed. * EWSTools/start-queue.sh: Removed. * EWSTools/ubuntu-ews-packages: Removed. 2021-04-12 Aakash Jain Make Commit Queue robust by adding few git commands to clean up repository https://bugs.webkit.org/show_bug.cgi?id=224444 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (CleanGitRepo): Build step to run few commands to cleanup git repository. (CleanGitRepo.run): (CleanGitRepo.getResultSummary): Custom failure message. * CISupport/ews-build/steps_unittest.py: Added unit-tests. * CISupport/ews-build/factories.py: (CommitQueueFactory.__init__): * CISupport/ews-build/factories_unittest.py: (TestCommitQueueFactory.test_commit_queue_factory): Updated unit-test. 2021-04-11 Commit Queue Unreviewed, reverting r275801. https://bugs.webkit.org/show_bug.cgi?id=224423 run-jsc-stress-tests output includes a lot of texts Reverted changeset: "[JSC] detect infrastructure failure for remote stress tests" https://bugs.webkit.org/show_bug.cgi?id=222601 https://trac.webkit.org/changeset/275801 2021-04-11 Sam Weinig Simplify WebKitTestRunner preference reset to be more like DRT https://bugs.webkit.org/show_bug.cgi?id=224410 Reviewed by Darin Adler. - Use boolWebPreferenceFeatures consistently for accessibilityIsolatedTreeMode - Adopt new WKPreferencesStartBatchingUpdates/WKPreferencesEndBatchingUpdates to ensure all preferences updates are batched. - Move all preference overrides that can be moved (two still require some specialized handling for now) to TestOptions defaults. - Remove now unnecessary platformResetPreferencesToConsistentValues() platform configuration point. * WebKitTestRunner/Options.cpp: (WTR::handleOptionAccessibilityIsolatedTreeMode): * WebKitTestRunner/Options.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): (WTR::batchUpdatePreferences): (WTR::TestController::resetPreferencesToConsistentValues): (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: (WTR::TestController::accessibilityIsolatedTreeMode const): Deleted. * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::accessibilityIsolatedTreeMode const): * WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::platformResetPreferencesToConsistentValues): Deleted. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::platformResetPreferencesToConsistentValues): Deleted. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformResetPreferencesToConsistentValues): Deleted. * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::platformResetPreferencesToConsistentValues): Deleted. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformResetPreferencesToConsistentValues): Deleted. 2021-04-10 Angelos Oikonomopoulos [JSC] detect infrastructure failure for remote stress tests https://bugs.webkit.org/show_bug.cgi?id=222601 Reviewed by Yusuke Suzuki. run-jsc-stress-tests currently detects failures by the absence of a failure file (that is generated by each failing test). This is fragile to begin with, as it assumes that tests that fail to run (e.g. because of an error in the runner script) are successful by default. However, the main motivation for this patch is to make execution more robust when using remote hosts. Currently, --gnu-parallel-runner will transparently reschedule jobs on a different host when a remote host goes away. But detectFailures expects to be able to connect to all hosts and fetch the failure files, which fails if a remote host is still down when the run finishes. Instead, this patch changes the runners to always generate a status file with the exit code. detectFailures then fetches all status files from all hosts that are live on exit. Tests that failed to run are explicitly accounted for as 'noreport' and are set to ERROR in the final report. * Scripts/run-javascriptcore-tests: (runJSCStressTests): * Scripts/run-jsc-stress-tests: * Scripts/webkitruby/jsc-stress-test-writer-default.rb: 2021-04-10 Aakash Jain Improve step description when compile-webkit step is skipped https://bugs.webkit.org/show_bug.cgi?id=224373 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (CompileWebKit.getResultSummary): Set custom summary when this step is skipped. * CISupport/ews-build/steps_unittest.py: Updated unit-tests. 2021-04-09 Wenson Hsieh REGRESSION (r271660): Tap highlight no longer shows when tapping clickable elements without touch event listeners https://bugs.webkit.org/show_bug.cgi?id=224385 Reviewed by Tim Horton. Add plumbing to expose the frame of the tap highlight view via `UIScriptController`. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::tapHighlightViewRect const): * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::tapHighlightViewRect const): 2021-04-09 Aakash Jain git-webkit find doesn't work well with unicode characters in author name (follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=223686 Reviewed by Jonathan Bedard. * Scripts/libraries/webkitscmpy/webkitscmpy/program/find.py: (Info.main): Updated the error message. 2021-04-09 Sam Sneddon Make TestInput take a Test object, not a path https://bugs.webkit.org/show_bug.cgi?id=224329 Reviewed by Jonathan Bedard. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner.run_tests): Remove test_to_skip argument; skipped tests aren't for the runner. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py: (LayoutTestRunnerTests._run_tests): TestInput expects a Test. (LayoutTestRunnerTests.test_interrupt_if_at_failure_limits): TestInput expects a Test. (SharderTests.get_test_input): TestInput expects a Test. * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._collect_tests): Move duplicated code from Manager.run and Manager.print_expectations here. (Manager._tests_to_run): Renamed from Manager._prepare_lists; now just gives tests to run. (Manager._test_input_for_file): Now takes a Test, not a str; device_type changes behaviour and shouldn't have any default. (Manager._test_is_slow): device_type changes behaviour and shouldn't have any default. (Manager._test_should_dump_jsconsolelog_in_stderr): device_type changes behaviour and shouldn't have any default. (Manager._get_test_inputs): device_type changes behaviour and shouldn't have any default. (Manager._update_worker_count): device_type changes behaviour and shouldn't have any default. (Manager._set_up_run): device_type changes behaviour and shouldn't have any default. (Manager.run): Largely just change for Manager._collect_tests, also renaming the sets to match their clearer names in print_expectations. Additionally, now generate skip results here, as they aren't to do with actually running tests, they're about test selection. (Manager._run_test_subset): Remove tests_to_skip argument, devie_type is required. (Manager._run_tests): Remove tests_to_skip argument, devie_type is required. (Manager._print_expectation_line_for_test): Now takes a Test, not a str; device_type changes behaviour and shouldn't have any default. (Manager._print_expectations_for_subset): Change default of tests_to_skip to avoid set/dict oddness. (Manager.print_expectations): Largely change for Manager._collect_tests. * Scripts/webkitpy/layout_tests/models/test.py: (Test): Use attrs to avoid having to define cmp, hash, repr, etc. * Scripts/webkitpy/layout_tests/models/test_input.py: (TestInput.__init__): Take a Test, not a str. (TestInput.test_name): Maintain compatibility with code reading TestInput.test_name for now. * Scripts/webkitpy/layout_tests/models/test_run_results.py: (TestRunResults.merge): Fix merging of dicts-of-sets, rather than overwriting the sets. (TestRunResults.merge.merge_dict_sets): Implement the merging. 2021-04-09 Aditya Keerthi [iOS][FCR] Use context menus for text input datalist dropdowns https://bugs.webkit.org/show_bug.cgi?id=224287 Reviewed by Wenson Hsieh. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::isShowingDataListSuggestions const): Use the exposed information from the webview to determine whether the datalist suggestions are visible, rather than traversing the view hierarchy. 2021-04-08 Jiewen Tan PCM: Write more blinded secret tests https://bugs.webkit.org/show_bug.cgi?id=222018 Reviewed by John Wilander. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): Adds the new test. 2021-04-08 Alex Christensen Serialize URL instead of entire challenge for informing client that modern TLS was negotiated https://bugs.webkit.org/show_bug.cgi?id=224346 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: (-[TLSNavigationDelegate waitForDidNegotiateModernTLS]): (-[TLSNavigationDelegate _webView:didNegotiateModernTLSForURL:]): (TestWebKitAPI::TEST): (-[TLSNavigationDelegate _webView:didNegotiateModernTLS:]): Deleted. 2021-04-08 Tim Horton Safari unit tests sometimes fail an ASSERTion in IOSurface.mm's optionsFor32BitSurface() https://bugs.webkit.org/show_bug.cgi?id=224351 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/ios/NavigationSwipeTests.mm: (TEST): Add a test that taking navigation snapshots for a 0x0 WKWebView doesn't assert. 2021-04-08 Alex Christensen REGRESSION(r273541) WKWebView can't load NSURLRequest subclasses https://bugs.webkit.org/show_bug.cgi?id=224338 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (respond): * TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm: (-[TestURLRequest initWithURL:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h: 2021-04-08 David Kilzer REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when coverage/sanitizer switch is not set Reviewed by Mark Lam. * Scripts/set-webkit-configuration: (updateOrDeleteConfigurationFile): - Change to take enabled and disabled arguments, and only reset (unlink) a config file if the --no-