blob: abf050d01e3b701b98853d8cbebd8cab8317cea2 [file] [log] [blame]
2022-01-14 Jonathan Bedard <jbedard@apple.com>
[EWS] ShowIdentifier should support pull-requests
https://bugs.webkit.org/show_bug.cgi?id=235252
<rdar://problem/87618736>
Reviewed by Aakash Jain.
* CISupport/ews-build/steps.py:
(ShowIdentifier.start): Extract revision from diverse set of properties.
(ShowIdentifier.evaluateCommand):
* CISupport/ews-build/steps_unittest.py:
2022-01-14 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Occasional crash under -[UITargetedPreview initWithView:parameters:target:] when focusing form controls
https://bugs.webkit.org/show_bug.cgi?id=235248
rdar://79220540
Reviewed by Tim Horton and Aditya Keerthi.
Add an API test that exercises the crash by forcing `-resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:`
to return nil via swizzling.
* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(TestWebKitAPI::nilResizableSnapshotViewFromRect):
(TestWebKitAPI::TEST):
2022-01-07 Jonathan Bedard <jbedard@apple.com>
[webkitbugspy] Support radar as issue tracker type
https://bugs.webkit.org/show_bug.cgi?id=234993
<rdar://problem/87276178>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/__init__.py:
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/base.py:
(Base): Radar mock should not inherit from mocks.Requests.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py:
(Bugzilla): Inherit from both Base and mocks.Requests.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py:
(GitHub): Inherit from both Base and mocks.Requests.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py: Added.
(AppleDirectoryUserEntry): Mock AppleDirectoryUserEntry from radarclient.
(AppleDirectoryQuery): Mock AppleDirectoryQuery from radarclient.
(RadarModel): Mock various Model objects from radarclient.
(RadarClient): Mock RadarClient from radarclient.
(Radar): Mock radarclient library.
(NoRadar): Mock unavailable radarclient library.
* Scripts/libraries/webkitbugspy/webkitbugspy/radar.py: Added.
(Tracker):
(Tracker.radarclient): Optionally import radarclient.
(Tracker.__init__):
(Tracker.authentication): Determine which authentication strategy to use.
(Tracker.from_string): Construct issue given Radar string
(Tracker.user): Find user given name, DSID or email.
(Tracker.issue): Construct issue given Radar ID.
(Tracker.populate): Populate Issue arguments.
* Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py: Added.
(TestGitHub):
(TestGitHub.test_no_radar):
(TestGitHub.test_users):
(TestGitHub.test_link):
(TestGitHub.test_title):
(TestGitHub.test_timestamp):
(TestGitHub.test_creator):
(TestGitHub.test_description):
(TestGitHub.test_assignee):
(TestGitHub.test_comments):
(TestGitHub.test_watchers):
(TestGitHub.test_references):
(TestGitHub.test_reference_parse):
* Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py:
(Tracker): Match single integer issue URLs.
2022-01-14 Wenson Hsieh <wenson_hsieh@apple.com>
Avoid redundant text analysis requests when long pressing inside an image that contains Live Text
https://bugs.webkit.org/show_bug.cgi?id=235129
rdar://87366539
Reviewed by Tim Horton.
Add a new API test and refactor some existing tests.
* TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:
(swizzledLocationInView):
(-[TestWKWebView simulateImageAnalysisGesture:]):
Add a helper method to simulate the image analysis gesture recognizer being activated on iOS, and wait for image
analysis to finish.
(TestWebKitAPI::swizzledProcessRequestWithResults):
(TestWebKitAPI::TEST):
Add a new API test to verify that we make at most one extra VKImageAnalyzer request when invoking a non-Live-
Text part of the image a second time. Additionally, adjust an existing test (HandleImageAnalyzerErrors) to
verify that we invoke VKImageAnalyzer a total of two times during the course of one image analysis gesture (once
for Live Text recognition, and another for visual look up). This test currently passes with only a single check
because it ends too early (i.e. after only one round trip to the web process and back).
(TestWebKitAPI::swizzledLocationInView): Deleted.
* TestWebKitAPI/cocoa/ImageAnalysisTestingUtilities.mm:
(-[TestVKImageAnalysis hasResultsForAnalysisTypes:]):
Implement this method stub to avoid an unrecognized selector crash.
2022-01-13 Jonathan Bedard <jbedard@apple.com>
[EWS] Support pull-requests in ValidateChange
https://bugs.webkit.org/show_bug.cgi?id=234861
<rdar://problem/87114299>
Reviewed by Aakash Jain.
* CISupport/ews-build/factories.py:
(Factory.__init__): Rename ValidatePatch to ValidateChange.
(StyleFactory.__init__): Ditto.
(WatchListFactory.__init__): Ditto.
(WindowsFactory.__init__): Ditto.
(CommitQueueFactory.__init__): Ditto.
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps): Step name changed from validate-patch to validate-change.
* CISupport/ews-build/steps.py:
(GitHub.pr_url): Add missing /.
(GitHub.api_url): Convert a repository URL to the API url for that repository.
(GitHub.credentials): Access GitHub credentials from passwords.json.
(GitHubMixin):
(GitHubMixin.fetch_data_from_url_with_authentication):
(GitHubMixin.get_pr_json):
(GitHubMixin._is_pr_closed): Check if a pull-request is closed.
(GitHubMixin._is_pr_obsolete): Check if a pull-request is obsolete.
(ValidateChange): Renamed from ValidatePatch.
(ValidateChange.getResultSummary):
(ValidateChange.start): Invoke validate_bugzilla or validate_github.
(ValidateChange.validate_bugzilla): Check a bugzilla patch.
(ValidateChange.validate_github): Check a GitHub pull-request.
(CompileWebKit.evaluateCommand): Rename ValidatePatch to ValidateChange.
(RunJavaScriptCoreTests.evaluateCommand): Ditto.
(RunWebKitTests.evaluateCommand): Ditto.
(ReRunWebKitTests.evaluateCommand): Ditto.
(RunWebKitTestsRedTree.evaluateCommand): Ditto.
(RunWebKitTestsRepeatFailuresRedTree.evaluateCommand): Ditto.
(RunAPITests.evaluateCommand): Ditto.
(ReRunAPITests.evaluateCommand): Ditto.
(ValidatePatch): Renamed to ValidateChange.
* CISupport/ews-build/steps_unittest.py:
2022-01-14 J Pascoe <j_pascoe@apple.com>
Expose way to encode CTAP commands with only the hash of ClientDataJSON
https://bugs.webkit.org/show_bug.cgi?id=235191
<rdar://problem/87557846>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
Tests for new SPIs.
2022-01-13 Wenson Hsieh <wenson_hsieh@apple.com>
Crash in Document::updateStyleIfNeeded() when removing a node containing the drag caret
https://bugs.webkit.org/show_bug.cgi?id=235184
rdar://74845918
Reviewed by Darin Adler.
Add a test to exercise the crash using drag and drop in WebKit2, on both iOS and macOS.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/remove-node-on-drop.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
(TEST):
2022-01-13 Ross Kirsling <ross.kirsling@sony.com>
PlayStation MiniBrowser should accept a command-line URL argument
https://bugs.webkit.org/show_bug.cgi?id=235193
Reviewed by Don Olmstead.
Windows MiniBrowser can be launched from the command line with a URL argument for the initial page to load;
this patch allows PlayStation MiniBrowser to do similarly.
* MiniBrowser/playstation/MainWindow.cpp:
(MainWindow::MainWindow):
* MiniBrowser/playstation/MainWindow.h:
* MiniBrowser/playstation/main.cpp:
(main):
2022-01-13 Patrick Angle <pangle@apple.com>
Web Inspector: Implement `frameURL` option for `devtools.inspectedWindow.eval` command
https://bugs.webkit.org/show_bug.cgi?id=222568
Reviewed by Devin Rousso.
Add test coverage for evaluating script on an inspected page from an extension, including evaluating on an inner
frame.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionEvaluateScriptOnPage.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionEvaluateScriptOnPageInnerFrame.html: Added.
2022-01-12 Jonathan Bedard <jbedard@apple.com>
[EWS] Load contributors from stand-alone class
https://bugs.webkit.org/show_bug.cgi?id=235161
<rdar://problem/87491516>
Reviewed by Aakash Jain.
* CISupport/ews-build/steps.py:
(Contributors): Moved from ValidateCommiterAndReviewer.
(ValidateCommiterAndReviewer.load_contributors_from_disk): Moved to Contributors.
(ValidateCommiterAndReviewer.load_contributors_from_github): Ditto.
(ValidateCommiterAndReviewer.load_contributors): Ditto.
* CISupport/ews-build/steps_unittest.py:
2022-01-12 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, reverting r287944.
Breaks Monterey build.
Reverted changeset:
"Build WebKitSwift when building with make or build-webkit"
https://bugs.webkit.org/show_bug.cgi?id=235093
https://commits.webkit.org/r287944
2022-01-12 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Fix freebie call without user gesture not being given
https://bugs.webkit.org/show_bug.cgi?id=235078
rdar://87327557
Reviewed by Brent Fulgham.
Updated API test to reflect user gesture freebie.
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html:
2022-01-12 Elliott Williams <emw@apple.com>
[Xcode] Configure each project for the legacy build system
https://bugs.webkit.org/show_bug.cgi?id=235091
Reviewed by Darin Adler.
* ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj:
* EditingHistory/EditingHistory.xcodeproj/project.pbxproj:
* FontWithFeatures/FontWithFeatures.xcodeproj/project.pbxproj:
* ImageDiff/ImageDiff.xcodeproj/project.pbxproj:
* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
* MiniBrowserSwiftUI/MiniBrowserSwiftUI.xcodeproj/project.pbxproj:
* MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* WebEditingTester/WebEditingTester.xcodeproj/project.pbxproj:
2022-01-12 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] [WK2] NSFontPanel UI (font color, text decorations, font shadow) doesn't update on selection change
https://bugs.webkit.org/show_bug.cgi?id=190120
rdar://44897405
Reviewed by Darin Adler.
Augment and adjust some existing API tests. See WebKit/ChangeLog for more information.
* TestWebKitAPI/Tests/WebKitCocoa/FontAttributes.mm:
Augment an existing API test, FontAttributes.FontAttributesAfterChangingSelection, to additionally check shared
NSFontManager state (foreground/background color, shadow color and radius, etc.) on macOS.
(TestWebKitAPI::webViewForTestingFontAttributes):
On macOS, additionally make the font panel visible so that we can test font panel state.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/FontManagerTests.mm:
Relax some constraints on FontManagerTests.ChangeFontWithPanel, so that it verifies that the platform font in
the NSFontManager has all of the same attributes as the expectation, rather than being equal to the exact same
font object.
Adjust an existing API test, FontManagerTests.ChangeAttributesWithFontEffectsBox, to also vary the length of
font shadows. Updating font attributes on the font manager exposed an issue with this API test where, because
the font panel's attributes are never updated, the value of the shadow length slider remains at the default
value of 0.125, producing a shadow length of 1.25px. However, now that the selection moves to non-shadowed text
before moving to shadowed text again, we need to explicitly set the shadow length slider's value when testing
the second shadowed text selection.
(webViewForFontManagerTesting):
(TestWebKitAPI::TEST):
* TestWebKitAPI/mac/NSFontPanelTesting.h:
* TestWebKitAPI/mac/NSFontPanelTesting.mm:
Add some additional testing helpers to query the state of controls in the font panel (e.g. font shadow sliders,
foreground color well, and strike-through/underline popup menu state).
(-[NSFontPanel underlineToolbarButton]):
(-[NSFontPanel strikeThroughToolbarButton]):
(-[NSFontPanel foregroundColorToolbarColorWell]):
(-[NSFontPanel chooseUnderlineMenuItemWithTitle:]):
(-[NSFontPanel chooseStrikeThroughMenuItemWithTitle:]):
(-[NSFontPanel shadowLengthSlider]):
(-[NSFontPanel hasShadow]):
(-[NSFontPanel shadowLength]):
(-[NSFontPanel setShadowLength:]):
(-[NSFontPanel hasUnderline]):
(-[NSFontPanel hasStrikeThrough]):
(-[NSFontPanel foregroundColor]):
2022-01-12 Jonathan Bedard <jbedard@apple.com>
[EWS] Accept GitHub hooks (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=235033
<rdar://problem/87345269>
Reviewed by Aakash Jain.
Trigger a subset of queues for incoming GitHub pull-requests.
* CISupport/ews-build/config.json: Enable webkitperl, webkitpy, services and style checks.
* CISupport/ews-build/loadConfig_unittest.py:
(ConfigDotJSONTest):
(ConfigDotJSONTest.test_multiple_scheduers_for_builder):
* CISupport/ews-build/master.cfg: Accept GitHub hooks, specify variables
to extract from incoming request.
* CISupport/ews-build/steps.py:
(GitHub):
(GitHub.repository_urls): Concatenate all valid projects with the base URL.
(GitHub.pr_url): Given a repository and pull-request number, return the URL
for that pull-request.
(ConfigureBuild.add_pr_details):
(GitHubMixin): Deleted.
2022-01-12 Alex Christensen <achristensen@webkit.org>
Build WebKitSwift when building with make or build-webkit
https://bugs.webkit.org/show_bug.cgi?id=235093
Reviewed by Alexey Proskuryakov.
* Scripts/build-webkit:
2022-01-11 Geoffrey Garen <ggaren@apple.com>
WebPageProxy destruction should not launch a network process
https://bugs.webkit.org/show_bug.cgi?id=235086
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST): Include WebView destruction in the test. Also do a little
run loop spinning, to give the test a better chance of failing when
async behavior does launch the Network process.
2022-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Web process crashes in some sites having SVG images
https://bugs.webkit.org/show_bug.cgi?id=234737
Reviewed by Adrian Perez de Castro.
Use AccessibilityAtspi::singleton().
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
(WTR::AccessibilityController::axRunLoop):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.cpp:
(WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler):
(WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler):
2022-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: do not immediately process main thread events while waiting for ax thread task
https://bugs.webkit.org/show_bug.cgi?id=234950
Reviewed by Adrian Perez de Castro.
We want to process the main thread events while waiting for ax thread to avoid blocking in case the ax thread
needs to get any value from the main thread. This might have side effects causing things to happen earlier than
expected. This patch only process main thread events after 125 milliseconds waiting for the ax thread, because
that probably means the ax thread is waiting for the main thread. This made most of the test to pass in isolated
tree mode with ATSPI.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
(WTR::AccessibilityController::executeOnAXThreadAndWait):
2022-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Set active state when element is the selected option active or aria-current isn't false with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=235029
Reviewed by Adrian Perez de Castro.
Add a unit test to check acive state and implement AccessibilityUIElement::currentStateValue().
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testAccessibleState):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::currentStateValue const): Deleted.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::currentStateValue const):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::currentStateValue const):
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::currentStateValue const):
2022-01-10 Dewei Zhu <dewei_zhu@apple.com>
Revert r287861.
https://bugs.webkit.org/show_bug.cgi?id=235048
<rdar://problem/87360213>
Unreviewed revert.
Temporarily revert r287861(245905@main) which breaks git-webkit script when
invoked outside of a checkout directory.
* Scripts/git-webkit:
2022-01-10 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Use cwd as default path
https://bugs.webkit.org/show_bug.cgi?id=235048
<rdar://problem/87360213>
Reviewed by Aakash Jain.
* Scripts/git-webkit: Use default path behavior.
2022-01-10 Wenson Hsieh <wenson_hsieh@apple.com>
Modal container observer should classify elements that are styled like clickable controls
https://bugs.webkit.org/show_bug.cgi?id=235022
Reviewed by Tim Horton.
Add a new API test to exercise the change, and adjust the test harness to allow tests using the harness to
additionally add an event listener on the modal container.
* TestWebKitAPI/Tests/WebKit/modal-container-custom.html:
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(TestWebKitAPI::TEST):
2022-01-10 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Retain old commits in pull-request (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=234453
<rdar://problem/86654956>
Unreviewed follow-up fix.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
(Land.main):
2022-01-05 Jonathan Bedard <jbedard@apple.com>
[EWS] Always invoke CleanGitRepo before CheckOutSource
https://bugs.webkit.org/show_bug.cgi?id=234882
<rdar://problem/87145396>
Reviewed by Aakash Jain.
* CISupport/ews-build/factories.py:
(Factory.__init__): Add CleanGitRepo step.
(StyleFactory.__init__): Ditto.
(WatchListFactory.__init__): Ditto.
(CommitQueueFactory.__init__): Specify default branch as 'master.'
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
* CISupport/ews-build/steps.py:
(CleanGitRepo.__init__): Accept default_branch and remote.
(CleanGitRepo.run): Construct commands with awareness of branch and remote,
check to see if a basename is specified.
* CISupport/ews-build/steps_unittest.py:
2021-12-17 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Retain old commits in pull-request
https://bugs.webkit.org/show_bug.cgi?id=234453
<rdar://problem/86654956>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
(Land.main): Find all numbered branches for landing pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.parser): Add history option.
(PullRequest.main): Add a numbered branch which persists through the life of the pull-request.
2022-01-10 Wenson Hsieh <wenson_hsieh@apple.com>
Modal container observer fails detection when rendered text is inserted after the container
https://bugs.webkit.org/show_bug.cgi?id=234752
rdar://87200177
Reviewed by Tim Horton.
Add a new API test to exercise the change.
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(TestWebKitAPI::TEST):
2022-01-10 Alex Christensen <achristensen@webkit.org>
Start using C++20
https://bugs.webkit.org/show_bug.cgi?id=233963
Reviewed by Yusuke Suzuki.
* DumpRenderTree/DerivedSources.make:
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MobileMiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Tests/WTF/Expected.cpp:
(TestWebKitAPI::NonCopyable::NonCopyable):
* TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F):
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/DerivedSources.make:
* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
2022-01-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: do not show html-id and toolkit attributes in test results
https://bugs.webkit.org/show_bug.cgi?id=235024
Reviewed by Adrian Perez de Castro.
The html-id attribute is an internal one used by WTR to get the accessible of an element by its id. The toolkit
attribute will make the results different for every platform. Also sort the attributes to ensure same results
even if the order is different among platforms.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::attributesOfElement):
2022-01-09 Sam Weinig <weinig@apple.com>
Remove support for Direct2D
https://bugs.webkit.org/show_bug.cgi?id=234999
Reviewed by Darin Adler.
Direct2D and FTW have not been building for over a year. It is
time to remove them.
* DumpRenderTree/PixelDumpSupport.cpp:
* DumpRenderTree/PlatformWin.cmake:
* DumpRenderTree/win/PixelDumpSupportDirect2D.cpp: Removed.
* DumpRenderTree/win/PixelDumpSupportDirect2D.h: Removed.
* DumpRenderTree/win/PixelDumpSupportWin.cpp:
(createBitmapContextFromWebView):
* PlatformFTW.cmake: Removed.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpDOMAsWebArchive):
* WebKitTestRunner/PlatformFTW.cmake: Removed.
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/win/PlatformWebViewWin.cpp:
* WebKitTestRunner/win/TestInvocationDirect2D.cpp: Removed.
2022-01-08 Wenson Hsieh <wenson_hsieh@apple.com>
Null pointer crash when calling into `-[WebView close]` in `-webView:didCommitLoadForFrame:`
https://bugs.webkit.org/show_bug.cgi?id=234994
rdar://86845512
Reviewed by Chris Dumez and Geoff Garen.
Add a new API test to exercise the fix.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/CloseWhileCommittingLoad.mm: Added.
(-[CloseWhileCommittingLoadDelegate webView:didCommitLoadForFrame:]):
(TestWebKitAPI::TEST):
2022-01-08 Tyler Wilcock <tyler_w@apple.com>
AX: AccessibilityObject::setFocused(true) should make the webpage focused, and make web content the first responder
https://bugs.webkit.org/show_bug.cgi?id=234885
Reviewed by Darin Adler.
Add testing functionality necessary to check that web content is the
first responder in the UI process.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::isWebContentFirstResponder const):
Added.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::takeFocus):
Implement this method.
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::isWebContentFirstResponder const):
Added.
2022-01-07 Tim Horton <timothy_horton@apple.com>
A/B comparison tests fail trying to look up fuzzy match tolerance
https://bugs.webkit.org/show_bug.cgi?id=234974
Reviewed by Aditya Keerthi.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._run_self_comparison_test):
(SingleTestRunner._compare_output_with_reference):
Disable fuzzy matching for A/B tests, because A) we don't really want it
and B) it crashes run-webkit-tests because there is no actual reference file
in which to find the tolerance value.
2022-01-07 David Kilzer <ddkilzer@apple.com>
check-webkit-style: add checker for unexpected fall through after ASSERT_NOT_REACHED() statements
<https://webkit.org/b/234932>
<rdar://87213520>
Reviewed by Brent Fulgham.
This checker only returns a confidence level of 4 (out of 5)
since there are too many different code patterns to check them
all perfectly using regular expressions.
Run new checker tests like this:
$ test-webkitpy webkitpy.style.checkers.cpp_unittest.CppStyleTest.test_debug_not_reached_assertion
Run this checker against a file or folder like this:
$ check-webkit-style --filter "-,+security/assertion_fallthrough" (file|folder)
* Scripts/webkitpy/style/checkers/cpp.py:
(SingleLineView.__init__):
- Expose `trimmed_lines` as a property on SingleLineView.
(_FunctionState.body_view): Add.
- Add method to return a SingleLineView object containing the
body of the function.
(check_function_body): Add.
- New function to check for fall through after
ASSERT_NOT_REACHED() statements.
(process_line):
- Call check_function_body() to implement the new check.
(CppChecker.categories):
- Add 'security/assertion_fallthrough' to the list of known
checkers.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTestBase.perform_function_body_check): Add.
- Add method to call check_function_body() for testing.
(CppStyleTest.test_debug_not_reached_assertion): Add.
- Add tests for the new checker.
2022-01-07 Wenson Hsieh <wenson_hsieh@apple.com>
Teach modal container observer to make the body element scrollable if necessary
https://bugs.webkit.org/show_bug.cgi?id=234708
rdar://86960677
Reviewed by Tim Horton.
Adjust an existing API test to exercise the change.
* TestWebKitAPI/Tests/WebKit/modal-container-with-overlay.html:
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(TestWebKitAPI::TEST):
2022-01-07 Ryan Haddad <ryanhaddad@apple.com>
REGRESSION: TestWebKitAPI.PublicSuffix.IsPublicSuffix is failing on some bots
https://bugs.webkit.org/show_bug.cgi?id=234609
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebCore/PublicSuffix.cpp:
(TestWebKitAPI::TEST_F): Disable failing subtest.
2022-01-07 Alex Christensen <achristensen@webkit.org>
Unreviewed, reverting r287698.
Broke an internal build
Reverted changeset:
"Start using C++20"
https://bugs.webkit.org/show_bug.cgi?id=233963
https://commits.webkit.org/r287698
2022-01-06 Lauro Moura <lmoura@igalia.com>
[GLIB] Make API test initialize localstorage to ensure the database file is created
https://bugs.webkit.org/show_bug.cgi?id=234891
Reviewed by Michael Catanzaro.
Changes needed after 245553@main/r287418 changed the localstorage
behavior to avoid creating an empty database file when reading empty
databases.
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration):
2022-01-04 Jonathan Bedard <jbedard@apple.com>
[EWS] Support pull-requests in ConfigureBuild
https://bugs.webkit.org/show_bug.cgi?id=234848
<rdar://problem/87094989>
Reviewed by Dewei Zhu.
* CISupport/ews-build/steps.py:
(GitHubMixin.pr_url): Map pull-request number to URL.
(GitHubMixin.get_pull_request_number): Check if the event triggering
this was a pull_request, and the specified branch can be mapped to a
pull-request.
(ConfigureBuild.start): Add pull-request details.
(ConfigureBuild.add_pr_details): Ditto.
2022-01-06 Alex Christensen <achristensen@webkit.org>
Start using C++20
https://bugs.webkit.org/show_bug.cgi?id=233963
Reviewed by Yusuke Suzuki.
* DumpRenderTree/DerivedSources.make:
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MobileMiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Tests/WTF/Expected.cpp:
(TestWebKitAPI::NonCopyable::NonCopyable):
* TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F):
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/DerivedSources.make:
* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
2021-12-16 Jonathan Bedard <jbedard@apple.com>
[webkitbugspy] Initial library commit
https://bugs.webkit.org/show_bug.cgi?id=234400
<rdar://problem/86585683>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitbugspy/MANIFEST.in: Added.
* Scripts/libraries/webkitbugspy/README.md: Added.
* Scripts/libraries/webkitbugspy/setup.py: Added.
* Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Added.
* Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py: Added.
(Tracker): Bugzilla implementation of generic isssue tracker.
* Scripts/libraries/webkitbugspy/webkitbugspy/github.py: Added.
(Tracker): GitHub implementation of generic isssue tracker.
* Scripts/libraries/webkitbugspy/webkitbugspy/issue.py: Added.
(Issue): Dynamically fetched generic Issue object referencing parent Tracker.
(Issue.Comment): Issue comment including author and timestamp.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/__init__.py: Added.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/base.py: Added.
(Base): Base class for mocking http based issue trackers.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py: Added.
(Bugzilla): Partial mock of Bugzilla webserver.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/data.py: Added.
* Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py: Added.
(GitHub): Partial mock of GitHub webserver.
* Scripts/libraries/webkitbugspy/webkitbugspy/tests/__init__.py: Added.
* Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py: Added.
(TestBugzilla):
* Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py: Added.
(TestGitHub):
* Scripts/libraries/webkitbugspy/webkitbugspy/tests/user_unittest.py: Added.
(TestUser):
* Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py: Added.
(Tracker): Generic base of all issue trackers.
* Scripts/libraries/webkitbugspy/webkitbugspy/user.py: Added.
(User): User object tied to specific tracker.
(User.Encoder): User JSON encoder.
(User.Mapping): Mapping of user alias to User object.
* Scripts/webkitpy/test/main.py:
(main): Add webkitbugspy to subdirectories to be tested.
2022-01-05 Wenson Hsieh <wenson_hsieh@apple.com>
Modal container observer should detect and suppress elements that prevent user interaction
https://bugs.webkit.org/show_bug.cgi?id=234695
Reviewed by Tim Horton.
Add an API test (as well as a new test page) to exercise the fix.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/modal-container-with-overlay.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(TestWebKitAPI::TEST):
2022-01-05 Jonathan Bedard <jbedard@apple.com>
Running layout tests sometimes throws an AssertionError in python2.7/multiprocessing
https://bugs.webkit.org/show_bug.cgi?id=234487
Reviewed by Simon Fraser.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(_BiDirectionalQueue.send): Log failed queue put.
2022-01-05 Youenn Fablet <youenn@apple.com>
Tighten ServiceWorkerRegistrationKey::fromDatabaseKey
https://bugs.webkit.org/show_bug.cgi?id=234838
Reviewed by Chris Dumez.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ServiceWorkerRoutines.cpp: Added.
2022-01-05 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][DumpRenderTree] dumpHistoryItem leaks a SafeArray
https://bugs.webkit.org/show_bug.cgi?id=234870
Reviewed by Darin Adler.
r23462 added the following code.
> if (arrPtr && SUCCEEDED(::SafeArrayUnlock(arrPtr)))
> ::SafeArrayDestroy(arrPtr);
However, the array wasn't locked. SafeArrayUnlock always failed.
Thus, SafeArrayDestroy wasn't called.
* DumpRenderTree/win/DumpRenderTree.cpp:
(dumpHistoryItem): Don't use SafeArrayUnlock. Fixed a typo 'arrary'.
2022-01-04 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, reverting r287374.
Caused assertion failures on Monterey
Reverted changeset:
"Re-enable CustomDisplayName and DefaultDisplayName API tests
on Monterey"
https://bugs.webkit.org/show_bug.cgi?id=234613
https://commits.webkit.org/r287374
2022-01-04 Wenson Hsieh <wenson_hsieh@apple.com>
Use ICU instead of relying on hard-coded string equality checks in ModalContainerControlClassifier
https://bugs.webkit.org/show_bug.cgi?id=234677
Reviewed by Tim Horton.
Augment the existing API test so that it additionally tests a symbol ("small roman numeral ten") that would not
have been covered as one of the three hard-coded symbol strings in the earlier fix.
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(TestWebKitAPI::TEST):
2022-01-04 Wenson Hsieh <wenson_hsieh@apple.com>
ModalContainerObserver should search for text in subframes
https://bugs.webkit.org/show_bug.cgi?id=234446
rdar://86897770
Reviewed by Tim Horton.
Add an API test to exercise the change. See WebCore/ChangLog for more details.
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(TestWebKitAPI::TEST):
2022-01-04 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Open closed pull-request when running pr (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=232765
<rdar://problem/85084318>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Log found pull-request instead of undefined candidates.
2022-01-04 Alex Christensen <achristensen@webkit.org>
Re-disable WKInspectorExtensionDelegate.ExtensionTabNavigatedCallbacks API test in debug builds
https://bugs.webkit.org/show_bug.cgi?id=232857
I enabled it with an unrelated change and it is timing out, so re-disable it.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:
(TEST):
2022-01-04 Alex Christensen <achristensen@webkit.org>
Re-enable URLSchemeHandler.Leaks1 API test
https://bugs.webkit.org/show_bug.cgi?id=234625
Reviewed by Darin Adler.
The test seems to not time out any more. I think it has been fixed without re-enabling the test.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm:
(TEST):
2022-01-03 Sam Weinig <weinig@apple.com>
Add resolved/unresolved color type accessors to require users to be explicit about whether they will handle missing/none color components
https://bugs.webkit.org/show_bug.cgi?id=234798
Reviewed by Antti Koivisto.
* TestWebKitAPI/Tests/WebCore/ColorTests.cpp:
(TestWebKitAPI::TEST):
Replace uses of Color::toSRGBALossy<>() with Color::toColorTypeLossy<SRGBA<>>() and add
calls to resolved() to access color components. Also update to new name of colorSpaceAndComponents(),
colorSpaceAndResolvedColorComponents().
* TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm:
(TestWebKitAPI::changeContextContents):
Replace unnecessary use of colorSpaceAndComponents() with the more common toColorTypeLossy<WebCore::SRGBA<float>>().resolved().
2022-01-03 Wenson Hsieh <wenson_hsieh@apple.com>
Undownloaded iCloud Photos are inserted as broken images when attachment element is enabled
https://bugs.webkit.org/show_bug.cgi?id=234803
rdar://82318259
Reviewed by Darin Adler.
Add a new API test to exercise the change. See WebCore/ChangeLog for more information.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(nonexistentFilePath):
(TestWebKitAPI::TEST):
2022-01-03 Martin Robinson <mrobinson@webkit.org>
A manual test was imported with the WPT css-transforms test suite
https://bugs.webkit.org/show_bug.cgi?id=234245
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test): Manual tests may also be reference tests and these
should not be imported.
* Scripts/webkitpy/w3c/test_parser_unittest.py:
(test_analyze_manual_reference_wpt_test): Add a test for this situation.
2022-01-02 Wenson Hsieh <wenson_hsieh@apple.com>
[WebKit2] Camera continuity is disabled in richly editable content
https://bugs.webkit.org/show_bug.cgi?id=234773
rdar://46323417
Reviewed by Darin Adler.
Add an API test to verify that the result of `-validRequestorForSendType:returnType:` isn't always `nil` in the
case where there is no send type.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/NSResponderTests.mm: Added.
(TestWebKitAPI::TEST):
2022-01-01 Jean-Yves Avenard <jya@apple.com>
make SharedBuffer::copy() return a contiguous SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=234622
rdar://problem/86829527
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F):
2022-01-01 Wenson Hsieh <wenson_hsieh@apple.com>
Modal containers are incorrectly detected in navigation elements and fixed document elements
https://bugs.webkit.org/show_bug.cgi?id=234669
rdar://87030613
Reviewed by Darin Adler.
Add several new API tests to exercise the changes.
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(-[ModalContainerWebView initWithFrame:configuration:]):
(-[ModalContainerWebView loadHTML:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(TestWebKitAPI::TEST):
2022-01-01 Wenson Hsieh <wenson_hsieh@apple.com>
[Cocoa] Simplify some FontAttributes API tests
https://bugs.webkit.org/show_bug.cgi?id=234770
Reviewed by Darin Adler.
Simplify some of the logic around FontAttributes.FontAttributesAfterChangingSelection:
1. Instead of defining PlatformColor/PlatformFont, use CocoaColor/CocoaFont from WebCore.
2. Remove the `Nullity` flag in ShadowExpectation and ColorExpectation (and use `std::optional` instead to
indicate that the shadow or font attribute should be null).
3. Change a several rvalue references to be plain values instead (when passinng expectation structs that only
contain a handful of scalar values).
* TestWebKitAPI/Tests/WebKitCocoa/FontAttributes.mm:
(TestWebKitAPI::checkColor):
(TestWebKitAPI::checkShadow):
(TestWebKitAPI::checkFont):
(TestWebKitAPI::TEST):
(TestWebKitAPI::ColorExpectation::ColorExpectation): Deleted.
(TestWebKitAPI::ShadowExpectation::ShadowExpectation): Deleted.
2021-12-31 Wenson Hsieh <wenson_hsieh@apple.com>
Include a few more tag names to search when running modal container detection
https://bugs.webkit.org/show_bug.cgi?id=234652
Reviewed by Darin Adler.
Add an API test that's representative of the website where modal container observation failed (due to the search
term being inside a `b` element).
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(TestWebKitAPI::TEST):
2021-12-31 Wenson Hsieh <wenson_hsieh@apple.com>
Updating the file name of attachment-backed images should automatically set the `alt` attribute
https://bugs.webkit.org/show_bug.cgi?id=234747
rdar://85899879
Reviewed by Darin Adler.
Add a new API test to exercise this scenario -- i.e. copying an attachment-backed image in one web view, pasting
it into another web view, and confirming that the pasted attachment preserves the _WKAttachment file name.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView ensureAttachmentForImageElement]):
(TestWebKitAPI::TEST):
2021-12-30 Jean-Yves Avenard <jya@apple.com>
SharedBuffer::takeData() is still dangerous
https://bugs.webkit.org/show_bug.cgi?id=234724
rdar://problem/86957233
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F):
2021-12-28 Sam Weinig <weinig@apple.com>
Enhance Vector::map to allow specifying what kind of Vector to return (e.g. inline capacity, overflow, etc.)
https://bugs.webkit.org/show_bug.cgi?id=234683
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WTF/Vector.cpp:
Add test for new Vector::map overload.
2021-12-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Stop setting manages-descendants on web process root object with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234663
Reviewed by Adrian Perez de Castro.
Update the unit test to remove the ATSPI ifdef.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testAccessibleBasicHierarchy):
2021-12-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: handle xml-roles attributes to return the right role for landmark with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234638
Reviewed by Adrian Perez de Castro.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::xmlRoleValueString):
(WTR::AccessibilityUIElement::role):
2021-12-26 Sam Weinig <weinig@apple.com>
Replace WebKit/CocoaColor.h with WebCore/ColorCocoa.h, not confusing at all
https://bugs.webkit.org/show_bug.cgi?id=234693
Reviewed by Simon Fraser.
Use WebCore/ColorCocoa.h instead.
* TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:
2021-12-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Expose live region attributes with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234637
Reviewed by Adrian Perez de Castro.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSupported):
2021-12-23 Wenson Hsieh <wenson_hsieh@apple.com>
Modal container control classifier fails on some neutral controls that contain multiplication symbols
https://bugs.webkit.org/show_bug.cgi?id=234651
Reviewed by Tim Horton.
Add a new API test to exercise the change.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/modal-container-custom.html: Added.
Add an alternate version of `modal-container.html` that allows each API test to present custom markup (as
innerHTML) inside a fixed position modal container; use this test page in the new API test.
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:
(-[ModalContainerWebView loadBundlePage:andDecidePolicy:]):
(-[ModalContainerWebView evaluate:andDecidePolicy:]):
(-[ModalContainerWebView loadBundlePage:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(-[ModalContainerWebView lastModalContainerInfo]):
Add a property to keep track of the most recent _WKModalContainerInfo we recieved via the modal container
decision handler, and use this to test for which types of controls are available, in both the new test as well
as existing tests.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin:
* TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin:
Adjust the test CoreML model to classify "x" as the neutral control type.
2021-12-23 Sihui Liu <sihui_liu@apple.com>
Don't create LocalStorage database for read if it does not exist
https://bugs.webkit.org/show_bug.cgi?id=234569
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm:
(-[LocalStorageUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
2021-12-23 Matt Woodrow <mattwoodrow@apple.com>
Check allowed network hosts list when we schedule the load in the network process
https://bugs.webkit.org/show_bug.cgi?id=234543
<rdar://83501315>
Reviewed by Alex Christensen.
The check for WKWebViewConfiguration._allowedNetworkHost previously happened before the check to see if
the given ResourceRequest would directly from an archive.
This moves to the allowed network host list check to happen when we schedule the network request, and thus
allows subresources cached within an archive to load, even if their original URL would be blocked.
New test LoadWebArchive.DisallowedNetworkHosts added.
* TestWebKitAPI/Tests/mac/LoadWebArchive.mm:
(TestWebKitAPI::TEST):
2021-12-23 Brady Eidson <beidson@apple.com>
Add WTF::UUID class which is natively a 128-bit integer
https://bugs.webkit.org/show_bug.cgi?id=234571
Reviewed by Alex Christensen.
Notifications - which are UUID identified - are now addressed by a UUID object instead of a v4 UUID string.
The way our C-API vends that UUID object is through a data object, so change WKTR to account for that.
* WebKitTestRunner/DataFunctions.h: Copied from Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h.
(WTR::dataValue):
(WTR::dataToUUID):
(WTR::uuidToData):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::postSimulateWebNotificationClick):
(WTR::postPageMessage):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::simulateWebNotificationClick):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/WebNotificationProvider.cpp:
(WTR::WebNotificationProvider::showWebNotification):
(WTR::WebNotificationProvider::closeWebNotification):
(WTR::WebNotificationProvider::removeNotificationManager):
(WTR::WebNotificationProvider::simulateWebNotificationClick):
(WTR::WebNotificationProvider::reset):
* WebKitTestRunner/WebNotificationProvider.h:
2021-12-23 Sam Weinig <weinig@apple.com>
Encapsulate gradient color stops into a self contained class
https://bugs.webkit.org/show_bug.cgi?id=234583
Reviewed by Simon Fraser.
* TestRunnerShared/PlatformGTK.cmake: Added.
* TestRunnerShared/PlatformWPE.cmake: Added.
Keep GTK and WPE ports building by propogating glib.h header to the test runnner. Change
by Fujii Hironori.
2021-12-23 Patrick Griffis <pgriffis@igalia.com>
[Flatpak] Revert filesystem permission change in r287396
https://bugs.webkit.org/show_bug.cgi?id=234612
Reviewed by Michael Catanzaro.
This causes a regression where some important contents of
XDG_RUNTIME_DIR are overriden and causes issues like TLS failures.
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
2021-12-23 Wenson Hsieh <wenson_hsieh@apple.com>
Add API testing support for modal container observation
https://bugs.webkit.org/show_bug.cgi?id=234610
Reviewed by Megan Gardner.
Add support for new API tests that exercise the modal container observation policy in webpage preferences, as
well as the UI delegate SPI method for deciding policies in detected modal containers.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/modal-container.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:
Non-unified-source build fix (see below).
* TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: Added.
(-[NSBundle swizzled_URLForResource:withExtension:]):
(TestWebKitAPI::ClassifierModelSwizzler::ClassifierModelSwizzler):
(TestWebKitAPI::ClassifierModelSwizzler::~ClassifierModelSwizzler):
(-[ModalContainerWebView initWithFrame:configuration:]):
(-[ModalContainerWebView loadBundlePage:andDecidePolicy:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(TestWebKitAPI::createModalContainerWebView):
(TestWebKitAPI::TEST):
Add API tests to exercise each of the 4 modal container policy decisions in a simple modal container. Two key
pieces are needed in order to simulate the end-to-end flow for detecting and deciding policies for modal
containers:
1. Add `internals.overrideModalContainerSearchTermForTesting()`, which allows script (through the
`internals` testing plugin) to set ModalContainerObserver's search term.
2. Swizzle out `-[NSBundle URLForResource:withExtension:]` to return the file URL to TestWebKitAPI's
`TestModalContainerControls.mlmodelc`, instead of the real CoreML model.
* TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin: Added.
* TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin: Copied from Source/WebCore/page/ModalContainerObserver.h.
* TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/metadata.json: Added.
Add a mock CoreML model that's used to simulate classifier results in WebKit::ModalContainerControlClassifier.
See above for more details.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm:
More non-unified-source build fixes: hoist the definitions of `redColorComponents` and `blueColorComponents`
into the `USE(CG)` part of TestCocoa.h, and then import TestCocoa.h in these files. This avoids build failures
due to symbol redefinition when we add the new test file above.
* TestWebKitAPI/cocoa/TestCocoa.h:
2021-12-23 Patrick Griffis <pgriffis@igalia.com>
[Flatpak] Fix a11y tests on some distros including Fedora
https://bugs.webkit.org/show_bug.cgi?id=234612
Reviewed by Michael Catanzaro.
Using --no-a11y-bus fixes a11y working in Fedora, as well
as just being the intended behavior it always had since we
granted direct org.a11y.Bus access.
* flatpak/flatpakutils.py:
(WebkitFlatpak):
(WebkitFlatpak.run_in_sandbox):
2021-12-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: handle heading level as special case in intValue with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234603
Reviewed by Adrian Perez de Castro.
Tests expect intValue to return the heading level.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::intValue const):
2021-12-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: handle missing cases in isAttributeSettable with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234601
Reviewed by Adrian Perez de Castro.
We need to handle aria-readonly attribute and the combobox and listbox elements.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::isAttributeSettable):
2021-12-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: add missing bool and string attribute values with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234599
Reviewed by Adrian Perez de Castro.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::checkElementState):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::boolAttributeValue):
2021-12-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: ensure the root object is created before getting the focused element with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234597
Reviewed by Adrian Perez de Castro.
This is causing some tests to fail when executed in the same web process after another test.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
(WTR::AccessibilityController::focusedElement):
2021-12-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] WTR: add support for notifications when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234550
Reviewed by Adrian Perez de Castro.
Add AccessibilityNotificationHandler class to handle the ATSPI notifications.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
(WTR::AccessibilityController::resetToConsistentState): Remove the global event listener if there's one active.
(WTR::AccessibilityController::addNotificationListener): Create a global event listener.
(WTR::AccessibilityController::removeNotificationListener): Remove the global event listener.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.cpp: Added.
(WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler):
(WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.h: Added.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::addNotificationListener): Create the element event listener.
(WTR::AccessibilityUIElement::removeNotificationListener): Remove the element event listener.
* WebKitTestRunner/PlatformGTK.cmake:
2021-12-22 Alex Christensen <achristensen@webkit.org>
Re-enable WebPushD.HandleInjectedPush API test
https://bugs.webkit.org/show_bug.cgi?id=234627
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
2021-12-22 Alex Christensen <achristensen@webkit.org>
Disable WKInspectorExtensionDelegate.ShowAndHideTabCallbacks API test
webkit.org/b/231847
It seems to be timing out a lot everywhere.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:
(TEST):
2021-12-22 Sihui Liu <sihui_liu@apple.com>
WebsiteDataStore::excludeDirectoryFromBackup should set attribute for existing directories
https://bugs.webkit.org/show_bug.cgi?id=234404
Reviewed by Youenn Fablet.
* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
(TEST):
2021-12-22 Alex Christensen <achristensen@webkit.org>
Re-enable CustomDisplayName and DefaultDisplayName API tests on Monterey
https://bugs.webkit.org/show_bug.cgi?id=234613
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm:
(TestWebKitAPI::TEST):
2021-12-22 Kate Cheney <katherine_cheney@apple.com>
PCM tests crashing with 'unlink' errors
https://bugs.webkit.org/show_bug.cgi?id=234565
<rdar://problem/86771766>
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(cleanUp):
Close the databases before removing the files.
(TEST):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::simulatePrivateClickMeasurementSessionRestart):
(WTR::TestRunner::simulateResourceLoadStatisticsSessionRestart): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::simulatePrivateClickMeasurementSessionRestart):
(WTR::TestController::simulateResourceLoadStatisticsSessionRestart): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
Rename.
2021-12-22 Alex Christensen <achristensen@webkit.org>
Fix compiling with pickier compiler
https://bugs.webkit.org/show_bug.cgi?id=234593
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm:
* TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
(TestWebKitAPI::TEST):
2021-12-22 Alex Christensen <achristensen@webkit.org>
Re-enable WebpagePreferences.WebsitePoliciesDuringRedirect API test on Monterey
https://bugs.webkit.org/show_bug.cgi?id=234607
Reviewed by Brady Eidson.
This is the same as r285057 where we were responding with one byte short of the ranges requested,
which used to give a playing event but since Monterey it doesn't. The fix is to respond with all
the bytes requested. If the request is for bytes 0-1, we need to respond with two bytes, for example.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[TestSchemeHandler webView:startURLSchemeTask:]):
(TEST):
2021-12-22 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Set Web Authentication experimental feature flag as default true
https://bugs.webkit.org/show_bug.cgi?id=234533
<rdar://problem/86743595>
Reviewed by Brent Fulgham.
The Web Authentication feature has been shipping for a while. Default value for
experimental feature flag should be true.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
(TestWebKitAPI::WebCore::webAuthenticationExperimentalFeature): Deleted.
2021-12-22 Alex Christensen <achristensen@webkit.org>
Re-enable PrivateClickMeasurement.EphemeralWithAttributedBundleIdentifier API test
https://bugs.webkit.org/show_bug.cgi?id=226548
It was fixed with r287275
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-12-22 Alex Christensen <achristensen@webkit.org>
Remove failing API test check added in r287342
https://bugs.webkit.org/show_bug.cgi?id=234576
I added a check that has failed on some bots. No need to add it.
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
(TestWebKitAPI::TEST):
2021-12-21 Alex Christensen <achristensen@webkit.org>
Fix some API tests after r287341
https://bugs.webkit.org/show_bug.cgi?id=232857
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::TEST):
2021-12-21 Simon Fraser <simon.fraser@apple.com>
Fuzzy pixel data need to be computed in terms of CSS pixels
https://bugs.webkit.org/show_bug.cgi?id=232525
Reviewed by Tim Horton.
Pixel tolerance is computed in CSS pixels, so have ImageDiff divide the total number of
differing pixels by the square of the scale factor (a single different pixel at 1x becomes 4
different pixels at 2x).
* ImageDiff/ImageDiff.cpp:
(processImages):
* ImageDiff/PlatformImage.cpp:
(ImageDiff::PlatformImage::isCompatible const):
(ImageDiff::PlatformImage::difference):
2021-12-21 Alex Christensen <achristensen@webkit.org>
Re-enable ContextMenu API tests
https://bugs.webkit.org/show_bug.cgi?id=234585
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
(TEST):
* TestWebKitAPI/cocoa/TestContextMenuDriver.h:
* TestWebKitAPI/cocoa/TestContextMenuDriver.mm:
(+[TestContextMenuDriver prefersCancelsTouchesInView]):
(-[TestContextMenuDriver cancelsTouchesInView]):
(-[TestContextMenuDriver setCancelsTouchesInView:]):
2021-12-21 Alex Christensen <achristensen@webkit.org>
Enable Fullscreen.LayoutConstraints API test
https://bugs.webkit.org/show_bug.cgi?id=234576
Reviewed by Tim Horton.
Added in bug 159900 and not compiled until bug 232768, now it's giving us some useful test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
(TestWebKitAPI::TEST):
2021-12-21 Alex Christensen <achristensen@webkit.org>
Fix some API tests after r287316
https://bugs.webkit.org/show_bug.cgi?id=232857
I saw the test behavior difference on my Monterey arm64 Mac and assumed it was because it was Monterey,
but actually it's because it's an arm64 Mac. Fix the test expectations.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::TEST):
2021-12-21 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION (12/21/2021): [iOS] TestWebKitAPI.WebKit.AddAndRemoveDataDetectors is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=234574
rdar://86782559
Reviewed by Tim Horton.
This test began failing today due to DataDetectors no longer recognizing "December 21, 2021" as a valid date in
the future. Avoid this problem (at least, until the next century) by adjusting this date to be much later.
* TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/data-detectors.html:
2021-12-21 Brady Eidson <beidson@apple.com>
Make Notification identifiers be a UUID string instead of a uint64_t
https://bugs.webkit.org/show_bug.cgi?id=234534
Reviewed by Alex Christensen.
Where possible, use the String UUID identifier.
This gets rid of lots of weird maps and cleans up flaky situations that could occasionally occur.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::postSimulateWebNotificationClick):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::simulateWebNotificationClick):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::simulateWebNotificationClick):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/WebNotificationProvider.cpp:
(WTR::WebNotificationProvider::~WebNotificationProvider):
(WTR::WebNotificationProvider::showWebNotification):
(WTR::WebNotificationProvider::closeWebNotification):
(WTR::WebNotificationProvider::addNotificationManager):
(WTR::WebNotificationProvider::removeNotificationManager):
(WTR::WebNotificationProvider::simulateWebNotificationClick):
(WTR::WebNotificationProvider::reset):
(WTR::removeGlobalIDFromIDMap): Deleted.
* WebKitTestRunner/WebNotificationProvider.h:
2021-12-21 Simon Fraser <simon.fraser@apple.com>
Allow a way to specify a custom pixel tolerance in a ref test
https://bugs.webkit.org/show_bug.cgi?id=149828
Reviewed by Martin Robinson.
When determining if a ref test failed, look for <meta name=fuzzy> in the test file,
and if present, compare the actual pixel differences with the range allowed by the
fuzzy metadata. This may cause a failing reference to match, or a passing reference
(based on ImageDiff internal tolerance) to fail.
In the case of mismatch ref tests, the fuzziness is taken into account to determine
if the mismatch still occurs. If not, then the mismatch test fails.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._fuzzy_tolerance_for_reference):
(SingleTestRunner._compare_output_with_reference):
2021-12-21 Alex Christensen <achristensen@webkit.org>
ASSERT NOT REACHED under WebKit::Daemon::ConnectionToMachService seen with TestWebKitAPI.WebPushD.BasicCommunication and PermissionManagement
https://bugs.webkit.org/show_bug.cgi?id=232857
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::TEST):
2021-12-21 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Authenticator is not falling back to clientPIN after internal verification fails and is blocked.
https://bugs.webkit.org/show_bug.cgi?id=232501
<rdar://problem/84913636>
Reviewed by Darin Adler.
Whenever internal uv gets blocked, the user agent should fall back to using a pin for user verification. This
adds an API test to verify this behavior.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-12-21 Sam Weinig <weinig@apple.com>
Add support for premultiplied alpha interpolated gradients and defaulted off option to use them for CSS Gradients
https://bugs.webkit.org/show_bug.cgi?id=234492
Reviewed by Simon Fraser.
* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
Add default for Windows WebKitLegacy testing which still requires it.
2021-12-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Implement list markers when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234485
Reviewed by Adrian Perez de Castro.
Add test cases to check list item markers.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testAccessibleListMarkers):
(testTextListMarkers):
(testHyperlinkBasic):
(testHypertextBasic):
(beforeAll):
2021-12-20 Alex Christensen <achristensen@webkit.org>
REGRESSION: [ iOS ] 5 TestWebKitAPI.WebpagePreferences.* api tests are flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=229094
Reviewed by Darin Adler.
The tests don't seem to time out any more. Let's try re-enabling them.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(TEST):
2021-12-20 Fujii Hironori <Hironori.Fujii@sony.com>
[Win] MSVC reports "DumpRenderTree.cpp(633): error C2362: initialization of 'length' is skipped by 'goto exit'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234503
Reviewed by Don Olmstead.
* DumpRenderTree/win/DumpRenderTree.cpp:
(dumpHistoryItem): Removed goto statements. Use std::unique_ptr for SAFEARRAY.
2021-12-20 Simon Fraser <simon.fraser@apple.com>
Make it possible to enable log channels in WebKitTestRunner and DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=234525
Reviewed by Wenson Hsieh.
Support a "--WebCoreLogging" argument to DumpRenderTree to enable the WebCore
log channels.
Support "--WebCoreLogging" and "--WebKitLogging" arguments to WebKitTestRunner to enable the WebCore
and WebKit log channels.
DRT requires the double dash format, so I chose to have both use double dashes
for consistency (although this is inconsistent with the single dash format used
by AppKit and UIKit apps).
* DumpRenderTree/mac/DumpRenderTree.mm:
(initializeGlobalsFromCommandLineOptions):
(prepareConsistentTestingEnvironment):
* WebKitTestRunner/Options.cpp:
(WTR::handleOptionLogChannels):
(WTR::OptionsHandler::OptionsHandler):
* WebKitTestRunner/Options.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformInitialize):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformInitialize):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformInitialize):
* WebKitTestRunner/win/TestControllerWin.cpp:
(WTR::TestController::platformInitialize):
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformInitialize):
2021-12-20 Dewei Zhu <dewei_zhu@apple.com>
'run-benchmark' should launch browsers in a relative clean state.
https://bugs.webkit.org/show_bug.cgi?id=234107
Reviewed by Stephanie Lewis.
Add code to ensure Chrome and Firefox launches in a relative clean state.
Refactor browser drivers for macOS Chrome and Firefox to share more code.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
Added '--no-first-run', '--no-default-browser-check', '--disable-extensions' flags.
(OSXChromeDriverBase):
(OSXChromeDriverBase.launch_url):
(OSXChromeDriverBase.launch_driver):
(OSXChromeDriverBase._create_chrome_options):
(OSXChromeDriverBase._window_size_arg):
(OSXChromeDriverBase._set_chrome_binary_location):
(OSXChromeDriver):
(OSXChromeDriver._set_chrome_binary_location):
(OSXChromeCanaryDriver._set_chrome_binary_location):
(OSXChromeDriver.launch_url): Deleted.
(OSXChromeDriver.launch_driver): Deleted.
(OSXChromeCanaryDriver.launch_url): Deleted.
(OSXChromeCanaryDriver.launch_driver): Deleted.
(create_args): Deleted.
(create_chrome_options): Deleted.
(create_window_size_arg): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
Added code to use profiles to suppress default browser check and privacy notice tab.
(OSXFirefoxDriverBase):
(OSXFirefoxDriverBase.__init__):
(OSXFirefoxDriverBase.prepare_env):
(OSXFirefoxDriverBase.restore_env):
(OSXFirefoxDriverBase.launch_url):
(OSXFirefoxDriverBase.launch_driver):
(OSXFirefoxDriverBase._setup_temporary_profile_directory):
(OSXFirefoxDriverBase._teardown_temporary_profile_directory):
(OSXFirefoxDriverBase._set_firefox_binary_location):
(OSXFirefoxDriver):
(OSXFirefoxDriver._set_firefox_binary_location):
(OSXFirefoxNightlyDriver):
(OSXFirefoxNightlyDriver._set_firefox_binary_location):
(OSXFirefoxDriver.launch_url): Deleted.
(OSXFirefoxDriver.launch_driver): Deleted.
(OSXFirefoxNightlyDriver.launch_url): Deleted.
(OSXFirefoxNightlyDriver.launch_driver): Deleted.
(create_args): Deleted.
* Scripts/webkitpy/benchmark_runner/data/firefox_profile/user.js: Added user preferences
so that Firefox can be launched without checking default browser and privacy notice.
2021-12-20 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Add option to change requestWebAuthenticationNoGesture delegate for api tests.
https://bugs.webkit.org/show_bug.cgi?id=234444
rdar://86644642
Reviewed by Brent Fulgham.
These test a lack of user gesture in local authenticator. Recently we made a change to
change user gesture behavior, causing these tests to call out to an agent that cannot be called
from TWAPI. To restore test behavior, we add an option to change the return value of the
requestWebAuthenticationNoGesture delegate in tests.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelUIDelegate _webView:requestWebAuthenticationNoGestureForOrigin:completionHandler:]):
(TestWebKitAPI::WebCore::reset):
(TestWebKitAPI::TEST):
2021-12-20 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Only run WebAuthn test process on platform it is used
https://bugs.webkit.org/show_bug.cgi?id=234445
rdar://86646638
Reviewed by Brent Fulgham.
Add PLATFORM(IOS) macro around webauthn process test.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
2021-12-20 Alex Christensen <achristensen@webkit.org>
Prevent test functionality in AdAttributionDaemon when not running tests
https://bugs.webkit.org/show_bug.cgi?id=231258
Reviewed by Brady Eidson.
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
* WebKitTestRunner/Configurations/WebKitTestRunner.entitlements:
2021-12-20 Alex Christensen <achristensen@webkit.org>
[ Monterey ] TestWebKitAPI.WebSocket.PageWithAttributedBundleIdentifierDestroyed (API-test) is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=233224
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):
2021-12-20 Tim Nguyen <ntim@apple.com>
Stop assuming WPT is a reftest based on existence of -ref.html file
https://bugs.webkit.org/show_bug.cgi?id=234510
Reviewed by Sam Sneddon & Darin Adler.
Only the presence of <link rel="match">/<link rel="mismatch"> indicates a test is a reftest. The script
should not assume that the existence of a similarly named file with a `-ref.html` suffix means that the
original test file is reftest.
Here's how upstream WPT detects reftests:
https://github.com/web-platform-tests/wpt/blob/22f29564bb82b407aeaf6507c8efffdbd51b9974/tools/manifest/sourcefile.py#L1065
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test):
(TestParser.fuzzy_metadata):
(TestParser.is_reference_filename):
(TestParser.potential_ref_filename): Deleted.
(TestParser.is_wpt_reftest): Deleted.
* Scripts/webkitpy/w3c/test_parser_unittest.py:
2021-12-20 Lauro Moura <lmoura@igalia.com>
[webkitcorepy] Require cryptography while on Linux with Py3
https://bugs.webkit.org/show_bug.cgi?id=234499
Reviewed by Philippe Normand.
cryptography is required by secretstorage.util. When not installed,
the import fails and the keyring backend initialization fails silently,
just removing the SecretService keyring backend from the list of
viable backends. This can happen when running the scripts from a fresh
virtualenv, for example.
* Scripts/libraries/webkitcorepy/setup.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
2021-12-20 Tim Nguyen <ntim@apple.com>
Fix Tools/Scripts/webkitpy/w3c/test_importer.py
https://bugs.webkit.org/show_bug.cgi?id=234480
Reviewed by Manuel Rego Casasnovas.
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.find_importable_tests):
2021-12-20 Lauro Moura <lmoura@igalia.com>
REGRESSION(r286936) [GLIB] WebsiteData configuration API test is failing with non-created localstorage dir
https://bugs.webkit.org/show_bug.cgi?id=234497
Reviewed by Adrian Perez de Castro.
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration): Ensure localStorage is created before
trying to query it.
2021-12-18 Alex Christensen <achristensen@webkit.org>
[Monterey] TestWebKitAPI.PrivateClickMeasurement.Daemon* tests timing out: Failed to connect to mach service org.webkit.pcmtestdaemon.service
https://bugs.webkit.org/show_bug.cgi?id=232890
Reviewed by Brady Eidson.
Using OSLaunchdJob on macOS works, but it requires a private entitlement which the public SDK can't sign with.
Just continue using launchctl instead. Also, do the NSDictionary -> xpc dictionary conversion at runtime to reduce duplicate code.
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::setUpTestWebPushD):
* TestWebKitAPI/cocoa/DaemonTestUtilities.h:
* TestWebKitAPI/cocoa/DaemonTestUtilities.mm:
(TestWebKitAPI::convertArrayToXPC):
(TestWebKitAPI::convertDictionaryToXPC):
(TestWebKitAPI::registerPlistWithLaunchD):
2021-12-17 Simon Fraser <simon.fraser@apple.com>
Read the default value of the ScrollAnimatorEnabled setting from NSUserDefaults
https://bugs.webkit.org/show_bug.cgi?id=234456
Reviewed by Tim Horton.
It's impossible for a test to run with an animated keyboard scroll because platformAllowsScrollAnimation(),
which reads from NSUserDefaults, always trumps the Setting.
Fix by initializing the setting from NSUserDefaults and removing the platformAllowsScrollAnimation()
check. This allows for a WebKitTestRunner test override the setting.
Unfortunately in WebKitLegacy AppKit code consults the @"NSScrollAnimationEnabled" key, so
DumpRenderTree has to continue to initialize this NSUserDefault to @NO and tests that
try to change the Setting will fail.
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/mac/main.mm:
(setDefaultsToConsistentValuesForTesting):
2021-12-17 Simon Fraser <simon.fraser@apple.com>
Rename MockScrollAnimatorEnabled to MockScrollbarsControllerEnabled
https://bugs.webkit.org/show_bug.cgi?id=234452
Reviewed by Anders Carlsson.
The class formerly known as MockScrollAnimatorEnabled is used for logging when scrollbars
get events, so fix the name. It's a subclass of ScrollbarsController.
* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
2021-12-18 Chris Dumez <cdumez@apple.com>
Drop ServiceWorkerTCPServer and use HTTPServer instead
https://bugs.webkit.org/show_bug.cgi?id=234443
<rdar://86646140>
Reviewed by Alex Christensen.
Drop ServiceWorkerTCPServer and use HTTPServer instead. ServiceWorkerTCPServer relies on TCPServer which is
known to cause flakiness and sometimes hang in its destruction.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h: Removed.
(): Deleted.
(ServiceWorkerTCPServer::ServiceWorkerTCPServer): Deleted.
(ServiceWorkerTCPServer::request): Deleted.
(ServiceWorkerTCPServer::requestWithLocalhost): Deleted.
(ServiceWorkerTCPServer::requestWithFragment): Deleted.
(ServiceWorkerTCPServer::userAgentsChecked const): Deleted.
(ServiceWorkerTCPServer::respondToRequests): Deleted.
(ServiceWorkerTCPServer::requestWithURLString): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
* TestWebKitAPI/cocoa/HTTPServer.h:
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::HTTPServer::scheme const):
(TestWebKitAPI::HTTPServer::request const):
(TestWebKitAPI::HTTPServer::requestWithLocalhost const):
2021-12-17 Yusuke Suzuki <ysuzuki@apple.com>
[WTF] Introduce TrailingArray
https://bugs.webkit.org/show_bug.cgi?id=234201
Reviewed by Darin Adler.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/EmbeddedFixedVector.cpp: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::DestructorObserver::DestructorObserver):
(TestWebKitAPI::DestructorObserver::~DestructorObserver):
(TestWebKitAPI::DestructorObserver::operator=):
* TestWebKitAPI/Tests/WTF/FixedVector.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/RefCountedFixedVector.cpp: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::DestructorObserver::DestructorObserver):
(TestWebKitAPI::DestructorObserver::~DestructorObserver):
(TestWebKitAPI::DestructorObserver::operator=):
2021-12-17 Yusuke Suzuki <ysuzuki@apple.com>
[JSC] Fix runscript's standalone ability to run
https://bugs.webkit.org/show_bug.cgi?id=234166
Reviewed by Mark Lam.
r286109 broke the ability to run `runscript` as a standalone script to test JSC stress test package on the device.
This patch reverts the ability back.
* Scripts/jsc-stress-test-helpers/shell-runner.sh:
2021-12-17 Alex Christensen <achristensen@webkit.org>
Remove API::Object::Type::BundlePageGroup
https://bugs.webkit.org/show_bug.cgi?id=225611
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp:
(TestWebKitAPI::TEST):
2021-12-17 Alexey Shvayka <ashvayka@apple.com>
Tools/Scripts/run-perf-tests is failing on Speedometer2
https://bugs.webkit.org/show_bug.cgi?id=234426
Reviewed by Carlos Alberto Lopez Perez.
r282357 added a debug console warning regarding 'dppx' units, which is being emitted
for TodoMVC's stylesheets, thus failing metrics parsing in PerfTest. To fix the execution
of Speedometer2 suite, this particular warning has now been added to the ignore list.
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
2021-12-17 Alexey Shvayka <ashvayka@apple.com>
Fix deprecation warning in Tools/Scripts/run-jsc-benchmarks
https://bugs.webkit.org/show_bug.cgi?id=234425
Reviewed by Alex Christensen.
Ruby 2.4 unified Fixnum and Bignum classes into Integer [1], deprecating them as
implementation details. To get rid of the deprecation console message, this patch replaces
Fixnum type checks with Integer, which is unobservable and backwards-compatible.
[1] https://bugs.ruby-lang.org/issues/12005
* Scripts/run-jsc-benchmarks:
2021-12-16 Jonathan Bedard <jbedard@apple.com>
[reporelaypy] Accept pull-request hooks
https://bugs.webkit.org/show_bug.cgi?id=234406
<rdar://problem/86598451>
Reviewed by Dewei Zhu.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Scripts/libraries/reporelaypy/reporelaypy/hooks.py:
(HookProcessor):
(HookProcessor.is_valid): Check 'pull_request' hook format.
* Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py:
(HooksUnittest.test_pull_request):
* Scripts/libraries/reporelaypy/setup.py: Bump version.
2021-12-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK][WPE] Don't ignore stderr when calling flatpak in update-webkitgtk-libs
https://bugs.webkit.org/show_bug.cgi?id=234407
Reviewed by Michael Catanzaro.
Print stderr when calling flatpak, is useful to debug problems when it fails.
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
2021-12-16 Alex Christensen <achristensen@webkit.org>
Unreviewed, reverting r287056.
<rdar://86519800>
Caused performance regression...again
Reverted changeset:
"Remove properties set by NSURLProtocol on NSURLRequest before
serializing"
https://bugs.webkit.org/show_bug.cgi?id=232332
https://commits.webkit.org/r287056
2021-12-15 Darin Adler <darin@apple.com>
Many call sites use makeNeverDestroyed, but could instead take advantage of the NeverDestroyed deduction guide
https://bugs.webkit.org/show_bug.cgi?id=234350
Reviewed by Sam Weinig.
* DumpRenderTree/mac/DumpRenderTree.mm:
(fontAllowList): Use deduction.
* TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp:
(TestWebKitAPI::TEST): Remove tests of makeNeverDestroyed.
(TestWebKitAPI::list): Use deduction.
2021-12-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Add gtk-wk2 to EWS bubbles
https://bugs.webkit.org/show_bug.cgi?id=209104
Reviewed by Jonathan Bedard.
A new queue was added in 286405 which runs GTK LayoutTests.
This patch adds the queue to the EWS bubbles.
* CISupport/ews-app/ews/views/statusbubble.py:
(StatusBubble):
2021-12-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK][WPE] Apply optimizations to speed up the layout-test EWS and add a few more workers to the build ones.
https://bugs.webkit.org/show_bug.cgi?id=234378
Reviewed by Jonathan Bedard.
This applies two optimizations to speed up the testing on the layout-tests EWS added in r286405
1. Pass --fully-parallel to the retry steps. This makes the tool to utilize all the available workers for running
the tests instead of running them in serial. That makes the time needed to complete the retry steps to be considerable less,
In this example https://ews-build.webkit.org/#/builders/35/builds/1757 it reduces the timing from 43 mins to 12 mins.
2. When the first run fails without giving a list of failures and we have not reached the maximum retry count
we are going to end retring the whole testing anyway, so there is no point in running the tests without patch
in that case, we can skip doing that to save time. See: https://ews-build.webkit.org/#/builders/35/builds/1763
On top of that this patch adds an extra worker to the EWS build queues of GTK and WPE
because I detected that this queues sometimes are not fast enough.
* CISupport/ews-build/config.json:
* CISupport/ews-build/steps.py:
(BugzillaMixin.send_email_for_infrastructure_issue):
(RunWebKitTestsRedTree.evaluateCommand):
(RunWebKitTestsRepeatFailuresRedTree.setLayoutTestCommand):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree.setLayoutTestCommand):
* CISupport/ews-build/steps_unittest.py:
2021-12-15 John Wilander <wilander@apple.com>
TestWebKitAPI.PrivateClickMeasurement.MigrateWithDestinationToken is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=234335
<rdar://problem/86505218>
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(cleanUp):
Made the function sleep-wait until the file is indeed deleted.
2021-12-15 Jonathan Bedard <jbedard@apple.com>
[reporelaypy] Forward branches to alternate remote
https://bugs.webkit.org/show_bug.cgi?id=234347
<rdar://problem/86526293>
Reviewed by Dewei Zhu.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Scripts/libraries/reporelaypy/reporelaypy/checkout.py:
(Checkout.Encoder.default): Add remotes.
(Checkout.clone): After cloning a repository, add required remotes.
(Checkout.add_remotes): Track remotes in repository.
(Checkout.__init__): Allow caller to specify set of remotes to be tracked.
(Checkout.push_update): Push update for specified remote.
(Checkout.update_for): Return 'True' and 'False.'
(Checkout.update_all): If a branch is being updated, we should forward that
update to any tracked remotes.
* Scripts/libraries/reporelaypy/reporelaypy/hooks.py:
(HookProcessor.process_worker_hook): After updating a branch, forward that
update to any tracked remotes.
* Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:
(CheckoutUnittest.test_constructor_no_sentinal): Capture debug logging.
* Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py:
(CheckoutRouteUnittest.test_landing): Capture debug logging.
(CheckoutRouteUnittest.test_invoked_redirect): Ditto.
(CheckoutRouteUnittest.test_trac): Ditto.
* Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py:
(HooksUnittest.test_process): Test for any error logging.
(HooksUnittest.test_process_branch): Ditto.
* Scripts/libraries/reporelaypy/run: Allow caller to specify remote to be tracked.
* Scripts/libraries/reporelaypy/setup.py: Bump version.
2021-12-15 Don Olmstead <don.olmstead@sony.com>
Split ATK specific code in WPEViewBackends
https://bugs.webkit.org/show_bug.cgi?id=234310
Reviewed by Adrian Perez de Castro.
Move ATK specific code in WPEViewBackends into the atk directory. This splits
ViewBackend's implementation into two files with ATK specific code migrated to
atk/ViewBackendAtk.cpp. The code in WebKitAccessibleApplication is all ATK specific so
its completely moved into the atk directory.
* wpe/backends/CMakeLists.txt:
* wpe/backends/PlatformWPE.cmake:
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::initializeAccessibility):
(WPEToolingBackends::ViewBackend::updateAccessibilityState):
(WPEToolingBackends::addKeyEventListener): Deleted.
(WPEToolingBackends::removeKeyEventListener): Deleted.
(WPEToolingBackends::notifyAccessibilityKeyEventListeners): Deleted.
(WPEToolingBackends::ViewBackend::setAccessibleChild): Deleted.
* wpe/backends/ViewBackend.h:
* wpe/backends/atk/ViewBackendAtk.cpp: Copied from Tools/wpe/backends/ViewBackend.cpp.
(WPEToolingBackends::addKeyEventListener):
(WPEToolingBackends::removeKeyEventListener):
(WPEToolingBackends::ViewBackend::notifyAccessibilityKeyEventListeners):
(WPEToolingBackends::ViewBackend::initializeAccessibility):
(WPEToolingBackends::ViewBackend::updateAccessibilityState):
(WPEToolingBackends::ViewBackend::setAccessibleChild):
* wpe/backends/atk/WebKitAccessibleApplication.cpp: Renamed from Tools/wpe/backends/WebKitAccessibleApplication.cpp.
* wpe/backends/atk/WebKitAccessibleApplication.h: Renamed from Tools/wpe/backends/WebKitAccessibleApplication.h.
2021-12-15 Alex Christensen <achristensen@webkit.org>
Avoid unnecessary allocation and UTF-8 conversion when calling DFABytecodeInterpreter::interpret
https://bugs.webkit.org/show_bug.cgi?id=234351
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
2021-12-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add support for loading events when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234344
Reviewed by Joanmarie Diggs.
Add a test case to check loading events.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(AccessibilityTest::shouldProcessEvent): Helper to make the filters conditions easier to read.
(AccessibilityTest::startEventMonitor): Make it possible to use the monitor without filtering events.
(testDocumentLoadEvents):
(beforeAll):
2021-12-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Register the wrappers tree when there's an event listener registered
https://bugs.webkit.org/show_bug.cgi?id=234338
Reviewed by Joanmarie Diggs.
Add unit test to check the tree is created when there's a listener connected.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(AccessibilityTest::findTestApplication): Iterate the applications list backwards since the test program is
usually the last one in the list.
(AccessibilityTest::accessibleApplicationIsTestProgram): Helper to check if a given accessible belongs to the
test program.
(AccessibilityTest::startEventMonitor): Support for listening to events associated to the test program, not to a
particular accessible.
(testAccessibleEventListener):
(beforeAll):
2021-12-14 Don Olmstead <don.olmstead@sony.com>
[CMake] Modernize WPEToolingBackend
https://bugs.webkit.org/show_bug.cgi?id=234307
Reviewed by Adrian Perez de Castro.
Use WEBKIT_FRAMEWORK to build WPEToolingBackend and follow its conventions. Also support
different platform definitions so other ports using libwpe can also use this library.
Update includes to use <WPEToolingBackend/*.h>.
* MiniBrowser/wpe/CMakeLists.txt:
* MiniBrowser/wpe/main.cpp:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/glib/PlatformWPE.cmake:
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
* TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:
* WebKitTestRunner/PlatformWPE.cmake:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
* wpe/backends/CMakeLists.txt:
* wpe/backends/PlatformWPE.cmake: Added.
2021-12-14 Ryan Haddad <ryanhaddad@apple.com>
Bring up another iOS GPU Processes tester
https://bugs.webkit.org/show_bug.cgi?id=234016
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/config.json: Put the Catalina GPUP bot back and
use a different machine for the new iOS tester.
* CISupport/build-webkit-org/factories_unittest.py: Update unit tests.
(TestExpectedBuildSteps):
2021-12-14 Alex Christensen <achristensen@webkit.org>
Remove properties set by NSURLProtocol on NSURLRequest before serializing
https://bugs.webkit.org/show_bug.cgi?id=232332
<rdar://79227845>
Reviewed by Geoff Garen.
* TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:
(TestWebKitAPI::TEST):
2021-12-14 Jonathan Bedard <jbedard@apple.com>
[reporelaypy] Update checkout with hook instead of polling (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=234243
<rdar://problem/86413065>
Unreviewed follow-up fix.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Scripts/libraries/reporelaypy/reporelaypy/checkout.py:
(Checkout.update_for): `main` is not a recognized production branch, so handle
default branch first.
* Scripts/libraries/reporelaypy/setup.py: Bump version.
2021-12-14 Alex Christensen <achristensen@webkit.org>
Revert r284816
https://bugs.webkit.org/show_bug.cgi?id=234308
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
(TestWebKitAPI::TEST):
2021-12-13 Jonathan Bedard <jbedard@apple.com>
[reporelaypy] Update checkout with hook instead of polling
https://bugs.webkit.org/show_bug.cgi?id=234243
<rdar://problem/86413065>
Reviewed by Dewei Zhu.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version,
export HookProcessor and HookReceiver.
* Scripts/libraries/reporelaypy/reporelaypy/checkout.py:
(Checkout.update_for): If a branch is new, we need to track it.
* Scripts/libraries/reporelaypy/reporelaypy/database.py:
(Database.__init__): Use self.host and self.password.
* Scripts/libraries/reporelaypy/reporelaypy/hooks.py: Added.
(HookProcessor): Class to process received hooks.
(HookReceiver): Class to receive hooks and queue them for processing.
* Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py: Added.
(HooksUnittest):
(HooksUnittest.setUp):
(HooksUnittest.test_receive):
(HooksUnittest.test_invalid):
(HooksUnittest.test_process):
(HooksUnittest.test_hmac):
(HooksUnittest.test_invalid_hmac):
* Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Add hook routes,
if hooks are enabled.
* Scripts/libraries/reporelaypy/run: Allow caller to enable hooks.
* Scripts/libraries/reporelaypy/setup.py: Bump version.
2021-12-14 Alex Christensen <achristensen@webkit.org>
Add _WKContentRuleListAction.redirected and .modifiedHeaders
https://bugs.webkit.org/show_bug.cgi?id=234289
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:
(checkURLs):
(TEST_F):
* TestWebKitAPI/cocoa/TestNavigationDelegate.h:
* TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[TestNavigationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):
2021-12-14 Alex Christensen <achristensen@webkit.org>
Move FTP disabling from NetworkLoad::start to NetworkDataTask::NetworkDataTask
https://bugs.webkit.org/show_bug.cgi?id=234280
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
2021-12-11 Dean Jackson <dino@apple.com>
Allow override of system's preferred color scheme
https://bugs.webkit.org/show_bug.cgi?id=234199
<rdar://problem/86366044>
Reviewed by Tim Horton.
New API test that checks the color-scheme after
explicitly setting it.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/color-scheme.html: Added. Note: Xcode was
being difficult and wouldn't let me put this file in the right order
for the Copy Build Phase :(
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2021-12-14 Angelos Oikonomopoulos <angelos@igalia.com>
[JSC] Fix LocalJumpError in run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=234295
Reviewed by Michael Catanzaro.
Ruby code cannot return from a Proc; use an if/else instead. This fixes
the LocalJumpError reported in https://bugs.webkit.org/show_bug.cgi?id=233926.
* Scripts/run-jsc-stress-tests:
2021-12-14 Jean-Yves Avenard <jya@apple.com>
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900
Reviewed by Youenn Fablet.
SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.
* TestWebKitAPI/Tests/WTF/FileSystem.cpp:
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
* TestWebKitAPI/Tests/WebCore/SharedBufferTest.cpp:
* TestWebKitAPI/Tests/WebCore/SharedBufferTest.h:
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
* TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
* TestWebKitAPI/win/TestWebCoreStubs.cpp:
2021-12-13 John Wilander <wilander@apple.com>
PCM: Remove old DB update and migration code, and add a unit test for destination token DB columns
https://bugs.webkit.org/show_bug.cgi?id=234281
<rdar://86347439>
Reviewed by Alex Christensen and Kate Cheney.
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(addAttributedPCMv5):
(pollUntilPCMIsMigrated):
Now takes a parameter UsingDestinationToken and handles its expectation
accordingly.
(TEST):
New test PrivateClickMeasurement.MigrateWithDestinationToken.
2021-12-13 Alex Christensen <achristensen@webkit.org>
Allow WKContentRuleList to run regexes on current frame's URL, not just top frame's URL
https://bugs.webkit.org/show_bug.cgi?id=233889
Reviewed by Timothy Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::mainDocumentRequest):
(TestWebKitAPI::subResourceRequest):
(TestWebKitAPI::TEST_F):
2021-12-13 Brady Eidson <beidson@apple.com>
Teach webpushtool to register and "host" the daemon.
https://bugs.webkit.org/show_bug.cgi?id=234265
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::shouldSetupWebPushD): Add a command line argument to skip the "install the daemon" step,
so an engineer can handle that part themselves.
(TestWebKitAPI::setUpTestWebPushD):
(TestWebKitAPI::cleanUpTestWebPushD):
2021-12-13 Christopher Reid <chris.reid@sony.com>
[Curl] Improve curl's cookie conformance in WPT
https://bugs.webkit.org/show_bug.cgi?id=232722
Reviewed by Fujii Hironori.
* WebKitTestRunner/TestController.cpp: Use a unique cookie file for each test on windows
2021-12-13 Jean-Yves Avenard <jya@apple.com>
Add SharedBufferBuilder class
https://bugs.webkit.org/show_bug.cgi?id=233442
rdar://85693939
Reviewed by Youenn Fablet.
Update API tests.
* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
(TestWebKitAPI::TEST_F):
2021-12-13 Angelos Oikonomopoulos <angelos@igalia.com>
[JSC] Unify default/noisy tests definition
https://bugs.webkit.org/show_bug.cgi?id=233926
Reviewed by Yusuke Suzuki.
Currently, changing a test to be noisy (i.e. using
defaultRunNoisyTest) results in only a subset of the tests being
run.
Instead of manually changing the noisy test test handler, this
patch makes the mode definitions table-driven. However, for
compatibility with the existing code, it uses the table to define
the ruby methods that the testcase definitions (//@ comments,
yaml) and other callers in run-jsc-stress-tests (e.g. all
default*Run methods) expect.
Note that this slightly increases the number of tests executed (as
more test modes are enabled for the noisy tests).
This is an exploratory first step; other callers in
run-jsc-stress-tests could be simplified in the same way.
* Scripts/run-jsc-stress-tests:
2021-12-13 Youenn Fablet <youenn@apple.com>
Start websocket server for tests in http/tests that have websocket in their name
https://bugs.webkit.org/show_bug.cgi?id=234075
Reviewed by Jonathan Bedard.
Allows to run the websocket server for tests like LayoutTests/http/tests/workers/service/serviceworker-websocket.https.html.
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py:
2021-12-13 Youenn Fablet <youenn@apple.com>
Fix ServiceWorker downloads
https://bugs.webkit.org/show_bug.cgi?id=202142
<rdar://problem/55721934>
Reviewed by Alex Christensen.
Add test runner API to log the total download size.
This helps ensuring that service worker loads are correctly downloaded and do not rely on networking.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
2021-12-13 Kimmo Kinnunen <kkinnunen@apple.com>
Cocoa WebGL should support UI side compositing
https://bugs.webkit.org/show_bug.cgi?id=231009
<rdar://83437059>
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm:
Add a dummy override of the new member function layerContentsDisplayDelegate.
2021-12-13 Jean-Yves Avenard <jya@apple.com>
Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability
https://bugs.webkit.org/show_bug.cgi?id=233030
rdar://85333814
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
(TestWebKitAPI::TEST_F):
2021-12-12 Sam Weinig <weinig@apple.com>
Pipe ColorInterpolationMethod into Gradient
https://bugs.webkit.org/show_bug.cgi?id=234205
Reviewed by Antti Koivisto.
Update calls to Gradient::create() to pass the now required ColorInterpolationMethod.
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
(TestWebKitAPI::createGradient):
* TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
2021-12-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r286893.
https://bugs.webkit.org/show_bug.cgi?id=234197
Breaks the build
Reverted changeset:
"[macOS] Add new screen and window capture backend"
https://bugs.webkit.org/show_bug.cgi?id=234029
https://commits.webkit.org/r286893
2021-12-10 Eric Carlson <eric.carlson@apple.com>
[macOS] Add new screen and window capture backend
https://bugs.webkit.org/show_bug.cgi?id=234029
Reviewed by Jer Noble and Youenn Fablet.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMediaWindowAndScreen.mm: Added.
(-[WindowAndScreenCaptureTestView haveStream:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm:
* TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
* TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:
(-[UserMediaCaptureUIDelegate init]):
(-[UserMediaCaptureUIDelegate setGetDisplayMediaDecision:]):
(-[UserMediaCaptureUIDelegate _webView:requestDisplayCapturePermissionForOrigin:initiatedByFrame:decisionHandler:]):
2021-12-10 Don Olmstead <don.olmstead@sony.com>
Add FileSystem function to read a file at a path
https://bugs.webkit.org/show_bug.cgi?id=234103
Reviewed by Alex Christensen.
Add tests for readEntireFile.
* TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
2021-12-10 Alex Christensen <achristensen@webkit.org>
Move if-domain and unless-domain conversion to WKContentRuleList parsing
https://bugs.webkit.org/show_bug.cgi?id=234126
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testRequestImpl):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::testRequest): Deleted.
2021-12-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r286836.
https://bugs.webkit.org/show_bug.cgi?id=234153
some tests are flaky on iOS and some are crashing on macOS
Reverted changeset:
"[Model] Add load and error events to distinguish resource
load from model readiness"
https://bugs.webkit.org/show_bug.cgi?id=233706
https://commits.webkit.org/r286836
2021-12-10 Kimmo Kinnunen <kkinnunen@apple.com>
IOSurface memory attribution is hard to use in constructors
https://bugs.webkit.org/show_bug.cgi?id=232988
<rdar://problem/85541918>
Reviewed by Chris Dumez.
Update constructor calling base class constructor, add empty
ProcesseIdentity.
* TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm:
2021-12-09 Antoine Quint <graouts@webkit.org>
[Model] Add load and error events to distinguish resource load from model readiness
https://bugs.webkit.org/show_bug.cgi?id=233706
rdar://85922697
Reviewed by Chris Dumez and Dean Jackson.
Use the "load" event instead of the "ready" promise for this test which only requires monitoring
the <model> resource being loaded.
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(TestWebKitAPI::TEST):
2021-12-09 Aditya Keerthi <akeerthi@apple.com>
[iOS] Add SPI to enable find interactions on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=234017
rdar://86140542
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
(TEST):
Test that the new SPI installs a _UIFindInteraction on the web view.
2021-12-09 Lauro Moura <lmoura@igalia.com>
[webkitpy] Make check-webkit-style check WebDriverTests/TestExpectations.json
https://bugs.webkit.org/show_bug.cgi?id=213453
Reviewed by Adrian Perez de Castro.
While the WebDriver tests are imported and mostly ignored by
check-webkit-style, the script must check TestExpectations.json
to avoid commiting invalid json data and breaking the bots.
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checker_unittest.py:
(CheckerDispatcherSkipTest._assert_should_skip_without_warning): Pass
a valid error handler so the JSONChecker can be instantiated.
(CheckerDispatcherSkipTest.test_should_skip_without_warning__false):
2021-12-09 Alex Christensen <achristensen@webkit.org>
Prepare for transition to C++20
https://bugs.webkit.org/show_bug.cgi?id=234022
Reviewed by Yusuke Suzuki.
* DumpRenderTree/cg/PixelDumpSupportCG.cpp:
(createBitmapContext):
* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitLegacy/ios/SnapshotViaRenderInContext.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestPDFDocument.mm:
(TestWebKitAPI::TestPDFPage::colorAtPoint const):
* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::createCGContextFromCGImage):
2021-12-08 BJ Burg <bburg@apple.com>
[Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be to notified when an extension tab navigates
https://bugs.webkit.org/show_bug.cgi?id=233935
<rdar://86123899>
Reviewed by Patrick Angle.
Add API test coverage for -inspectorExtension:didNavigateTabWithIdentifier:newURL:
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:
(TEST):
Drive-by, fix an outdated completion handler type signature.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:
(-[InspectorExtensionDelegateForTesting inspectorExtension:didNavigateTabWithIdentifier:newURL:]):
(TEST):
Add a test case which exercises the new delegate method.
2021-12-09 Lauro Moura <lmoura@igalia.com>
[WebXR][WPE] Build fails without openxr installed
https://bugs.webkit.org/show_bug.cgi?id=220250
Reviewed by Adrian Perez de Castro.
Based on original patch by Yury Semikhatsky. Rebased and installed
only for WPE, as GTK's module set does not declare openxr.
* wpe/dependencies/apt: Install libxcb-glx0-dev
2021-12-09 Ryan Haddad <ryanhaddad@apple.com>
Bring up another iOS GPU Processes tester
https://bugs.webkit.org/show_bug.cgi?id=234016
Rubber-stamped by Alexey Proskuryakov.
* CISupport/build-webkit-org/config.json: Repurpose the Catalina GPU bot for this queue.
* CISupport/build-webkit-org/factories_unittest.py:
(TestExpectedBuildSteps): Update unit tests.
2021-12-09 Brady Eidson <beidson@apple.com>
Add ability to inject messages into webpushd
https://bugs.webkit.org/show_bug.cgi?id=233988
Reviewed by Alex Christensen.
* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements:
* TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
(messageDictionary):
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::createMessageDictionary):
(TestWebKitAPI::sendMessageToDaemon):
(TestWebKitAPI::sendMessageToDaemonWaitingForReply):
(TestWebKitAPI::sendConfigurationWithAuditToken):
(TestWebKitAPI::createAndConfigureConnectionToService):
(TestWebKitAPI::encodeString):
(TestWebKitAPI::TEST):
(TestWebKitAPI::function):
* TestWebKitAPI/cocoa/TestWKWebView.h:
2021-12-09 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Remove user gesture requirement for using platform authenticator on the web
https://bugs.webkit.org/show_bug.cgi?id=230893
<rdar://problem/79781342>
Reviewed by Brent Fulgham.
This patch removes the Quirks allowlist of the freebie web authentication use without a gesture and replaces it with one freebie, then a consent sheet.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelUIDelegate _webView:requestWebAuthenticationNoGestureForOrigin:completionHandler:]):
Test delegate
2021-12-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r286764.
https://bugs.webkit.org/show_bug.cgi?id=234081
broke the build
Reverted changeset:
"Add ability to inject messages into webpushd"
https://bugs.webkit.org/show_bug.cgi?id=233988
https://commits.webkit.org/r286764
2021-12-09 Myles C. Maxfield <mmaxfield@apple.com> and Don Olmstead <don.olmstead@sony.com>
Move TextCodec files from WebCore/platform/text to WebCore/PAL/text
https://bugs.webkit.org/show_bug.cgi?id=233683
Reviewed by Yusuke Suzuki.
Update to use the new PAL files.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):
* TestWebKitAPI/Tests/WebCore/TextCodec.cpp:
(TestWebKitAPI::testDecode):
* TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp:
(TestWebKitAPI::checkURL):
(TestWebKitAPI::TEST_F):
2021-12-09 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Ensure atspi wrappers have root set at construction time
https://bugs.webkit.org/show_bug.cgi?id=233804
Reviewed by Joanmarie Diggs.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
(WTR::AccessibilityController::axRunLoop):
2021-12-08 Brady Eidson <beidson@apple.com>
Add ability to inject messages into webpushd
https://bugs.webkit.org/show_bug.cgi?id=233988
Reviewed by Alex Christensen.
* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements:
* TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
(messageDictionary):
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::createMessageDictionary):
(TestWebKitAPI::sendMessageToDaemon):
(TestWebKitAPI::sendMessageToDaemonWaitingForReply):
(TestWebKitAPI::sendConfigurationWithAuditToken):
(TestWebKitAPI::createAndConfigureConnectionToService):
(TestWebKitAPI::encodeString):
(TestWebKitAPI::TEST):
(TestWebKitAPI::function):
* TestWebKitAPI/cocoa/TestWKWebView.h:
2021-12-08 Kyle Piddington <kpiddington@apple.com>
[MacCatalyst] Update header search paths for ANGLE Catalyst
https://bugs.webkit.org/show_bug.cgi?id=233996
For iOSMac builds, search for ANGLE public headers inside System/iOSSupport
Reviewed by Dean Jackson.
* TestWebKitAPI/Configurations/Base.xcconfig:
2021-12-08 Alex Christensen <achristensen@webkit.org>
Add SPI to load a resource in the context of a page
https://bugs.webkit.org/show_bug.cgi?id=233908
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST):
2021-12-08 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Consider support for the displayName for FIDO authenticator
https://bugs.webkit.org/show_bug.cgi?id=233389
rdar://84938707
Reviewed by Brent Fulgham.
Add test for new field stored with platform authenticator: displayName
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-12-08 Truitt Savell <tsavell@apple.com>
Unreviewed, reverting r286596.
broke 2 tests on iOS
Reverted changeset:
"Cocoa WebGL should support UI side compositing"
https://bugs.webkit.org/show_bug.cgi?id=231009
https://commits.webkit.org/r286596
2021-12-08 Chris Dumez <cdumez@apple.com>
Make KVO work for WKWebpagePreferences._captivePortalModeEnabled
https://bugs.webkit.org/show_bug.cgi?id=233954
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[CaptivePortalModeKVO observeValueForKeyPath:ofObject:change:context:]):
2021-12-08 Aditya Keerthi <akeerthi@apple.com>
[iOS] Add support for _UITextSearchOptions when finding a string
https://bugs.webkit.org/show_bug.cgi?id=233957
rdar://86140673
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
(testPerformTextSearchWithQueryStringInWebView):
(TEST):
Add additional test cases for search options.
2021-12-07 Aditya Keerthi <akeerthi@apple.com>
[iOS] Add initial support for find-in-page SPI
https://bugs.webkit.org/show_bug.cgi?id=233915
rdar://86140501
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
(-[TestSearchAggregator initWithCompletionHandler:]):
(-[TestSearchAggregator foundRange:forSearchString:inDocument:]):
(-[TestSearchAggregator finishedSearching]):
(TEST):
Added an API test to verify that search results are found correctly.
2021-12-07 Wenson Hsieh <wenson_hsieh@apple.com>
Add support for `navigator.requestCookieConsent()` behind a disabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=233890
rdar://86117718
Reviewed by Darin Adler.
Add several new API tests that enable the feature flag and exercise the API.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/CookieConsent.mm: Added.
(-[CookieConsentDelegate _webView:requestCookieConsentWithMoreInfoHandler:decisionHandler:]):
(TestWebKitAPI::createWebViewForTestingCookieConsent):
(TestWebKitAPI::checkForString):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/cookie-consent-basic.html: Added.
2021-12-07 Yousuke Kimoto <Yousuke.Kimoto@sony.com>
[webkitcorepy] Fail to install python module when a working directory is not on C drive on Windows
https://bugs.webkit.org/show_bug.cgi?id=233936
Reviewed by Jonathan Bedard.
On Windows, autoinstall.py installs python modules to C drive even if
your working directory is on other drive (e.g. D drive). To install
python modules correctly on Windows, a drive letter where your working
directory exists needs to be given to "--root" option of "setup.py"
in autoinstall.py.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Added root_location to detect a right drive letter to isntall modules on Windows.
2021-12-07 Devin Rousso <drousso@apple.com>
Add helper methods to `WebCore::FontShadow` for serializing to CSS and converting to `NSShadow`
https://bugs.webkit.org/show_bug.cgi?id=233938
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebCore/FontShadowTests.cpp: Added.
(TestWebKitAPI::TEST.FontShadow.InvalidColor):
(TestWebKitAPI::TEST.FontShadow.NoOffsetOrBlurRadius):
(TestWebKitAPI::TEST.FontShadow.NoOffset):
(TestWebKitAPI::TEST.FontShadow.NegativeOffset):
(TestWebKitAPI::TEST.FontShadow.NoBlurRadius):
(TestWebKitAPI::TEST.FontShadow.NegativeBlurRadius):
(TestWebKitAPI::TEST.FontShadow.AllNegative):
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2021-12-07 Jonathan Bedard <jbedard@apple.com>
[commits.webkit.org] Fallback to remote repository (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=233904
<rdar://problem/86131927>
Reviewed by Dewei Zhu.
* CISupport/ews-build/steps.py:
(PushCommitToWebKitRepo.evaluateCommand): Wait before querying commits.webkit.org
2021-12-06 Jonathan Bedard <jbedard@apple.com>
[commits.webkit.org] Fallback to remote repository (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=233904
<rdar://problem/86131927>
Reviewed by Dewei Zhu.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Scripts/libraries/reporelaypy/reporelaypy/checkout.py:
(Checkout.Encoder.default):
(Checkout.__init__): Allow user to specify a remote fallback repository.
* Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py:
(CheckoutRoute.commit): If no commit is found, query the fallback repository.
* Scripts/libraries/reporelaypy/run: Add --fallback option.
* Scripts/libraries/reporelaypy/setup.py: Bump version.
2021-12-07 Lauro Moura <lmoura@igalia.com>
[reporelaypy] Autoinstall missing lupa fakeredis dependency
https://bugs.webkit.org/show_bug.cgi?id=233934
Reviewed by Jonathan Bedard.
Using the same version as resultsdbpy. Avoids ImportErrors running the
webkitpy suite when they're not installed.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Add lupa and
bump version.
* Scripts/libraries/reporelaypy/setup.py: Bump version.
2021-12-07 Kyle Piddington <kpiddington@apple.com>
Roll ANGLE to include upstreamed Metal backend
https://bugs.webkit.org/show_bug.cgi?id=220896
<rdar://problem/73539682>
Reviewed by Ken Russell and Dean Jackson.
Update script to take sources from main, instead of master.
* Scripts/update-angle:
2021-12-07 Sihui Liu <sihui_liu@apple.com>
Fetch and remove file system data via WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=233567
<rdar://problem/86029185>
Reviewed by Youenn Fablet.
* TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
2021-12-07 Jonathan Bedard <jbedard@apple.com>
[reporelaypy] Add implementation of commits.webkit.org (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=233734
<rdar://problem/85945101>
Unreviewed follow-up fix.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version, add sortedcontainers dependency.
* Scripts/libraries/reporelaypy/setup.py: Bump version.
2021-12-07 Kimmo Kinnunen <kkinnunen@apple.com>
Cocoa WebGL should support UI side compositing
https://bugs.webkit.org/show_bug.cgi?id=231009
<rdar://83437059>
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm:
Add a dummy override of the new member function layerContentsDisplayDelegate.
2021-12-06 John Wilander <wilander@apple.com>
Add WebCore::RegistrableDomain tests for duplicate sub domains
https://bugs.webkit.org/show_bug.cgi?id=233902
<rdar://problem/86130326>
Unreviewed expansion of the RegistrableDomain.MatchesURLs API test.
https://bugs.webkit.org/show_bug.cgi?id=233330 claims that duplicate sub domains
such as news.news.example.com causes WebKit's RegistrableDomain matching to fail
and treat same-site content as cross-site. This patch add tests of such duplicate
sub domains.
* TestWebKitAPI/Tests/WebCore/RegistrableDomain.cpp:
(TestWebKitAPI::TEST):
2021-12-06 Brady Eidson <beidson@apple.com>
webpushd/webpushtool debugging additions
https://bugs.webkit.org/show_bug.cgi?id=233864
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::TEST): Adapt to debug message changes.
2021-12-04 Jonathan Bedard <jbedard@apple.com>
[reporelaypy] Add implementation of commits.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=233734
<rdar://problem/85945101>
Reviewed by Dewei Zhu.
As commits.webkit.org becomes more important to WebKit development, we need to apply
our normal robust testing and review to the code backing it.
* Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Add entrypoint to library.
* Scripts/libraries/reporelaypy/reporelaypy/checkout.py: Added.
(Checkout): Abstraction managing local repository checkout.
* Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py: Added.
(Redirector): Generates redirects for certain SCM services.
(CheckoutRoute): http routes returning information based on a checkout.
* Scripts/libraries/reporelaypy/reporelaypy/database.py: Added.
(Database): A connection to a true Redis or TinyRedis database.
* Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:
(CheckoutUnittest):
* Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py: Added.
(RedirectorUnittest):
(CheckoutRouteUnittest):
* Scripts/libraries/reporelaypy/reporelaypy/tests/database_unittest.py: Added.
(DatabaseUnittest):
* Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Copied from Tools/Scripts/libraries/webkitflaskpy/setup.py.
(health):
* Scripts/libraries/reporelaypy/run: Added.
* Scripts/libraries/reporelaypy/setup.py: Added.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/flask_support/flask_testcase.py:
(FlaskTestCase.run_with_mock_webserver.decorator.real_method):
(FlaskRequestsResponse): Moved to webkitflaskpy.
* Scripts/libraries/webkitflaskpy/setup.py: Bump version, update library description.
* Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: Bump version.
* Scripts/libraries/webkitflaskpy/webkitflaskpy/mock_app.py: Added.
(mock_app): Setup a flask app for testing.
* Scripts/libraries/webkitflaskpy/webkitflaskpy/response.py: Added.
(Response): Move FlaskRequestsResponse to more generic location.
* Scripts/webkitpy/__init__.py: Include reporelaypy for testing.
* Scripts/webkitpy/test/main.py:
(main): Include reporelaypy for testing.
(Tester._run_tests): Ditto.
2021-12-06 Ryan Haddad <ryanhaddad@apple.com>
REGRESSION (r286507): [macOS] Many file system access layout tests became flaky failures
https://bugs.webkit.org/show_bug.cgi?id=233892
Unreviewed, revert r286507.
* TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
2021-12-06 Jon Lee <jonlee@apple.com>
Update GPU Process feature flags
https://bugs.webkit.org/show_bug.cgi?id=232547
rdar://83905400
Reviewed by Wenson Hsieh.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args): Update features that are set when using `run-webkit-tests --use-gpu-process`.
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults): Turn off DOM Rendering on layout test bots for the time being.
2021-12-06 Matt Gilligan <matthew_gilligan@apple.com>
[iOS] Allow WKWebView clients to override undoManager
https://bugs.webkit.org/show_bug.cgi?id=233297
<rdar://problem/85526549>
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(-[CustomUndoManagerWebView undoManager]):
(TestWebKitAPI::TEST):
2021-12-06 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] AppHighlights.AppHighlightCreateAndRestoreAndScroll is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=233828
Reviewed by Tim Horton.
This test began to sometimes fail on iOS 15 API test runners in EWS after enabling `APP_HIGHLIGHTS` in non-
internal builds. Make this test more robust by waiting for scrolling to the restored highlight.
* TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:
(TestWebKitAPI::TEST):
2021-12-06 Alex Christensen <achristensen@webkit.org>
WKWebpagePreferences._activeContentRuleListActionPatterns should be an NSDictionary of identifier to allowed patterns
https://bugs.webkit.org/show_bug.cgi?id=233842
Reviewed by Timothy Hatcher.
* TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:
(navigationDelegateAllowingActiveActionsOnTestHost):
(TEST_F):
2021-12-05 Said Abou-Hallawa <said@apple.com>
[GPU Process] Add the encoding/decoding for Filter and FilterEffect
https://bugs.webkit.org/show_bug.cgi?id=232844
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
2021-12-05 Simon Fraser <simon.fraser@apple.com>
Add trace points for generated momentum events
https://bugs.webkit.org/show_bug.cgi?id=233857
Reviewed by Tim Horton.
Add start/end points for synthetic momentum, and a trace point for each generated event.
* Tracing/SystemTracePoints.plist:
2021-12-04 Andres Gonzalez <andresg_22@apple.com>
Change WTR::AccessibilityUIElement::descriptionOfValue(id) to return a RetainPtr.
https://bugs.webkit.org/show_bug.cgi?id=233815
<rdar://problem/86019373>
Reviewed by Chris Fleizach.
This fixes several tests in isolated tree mode, in particular:
accessibility/mac/focus-crash.html
accessibility/mac/search-predicate.html
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::descriptionOfValue const):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::embeddedImageDescription const):
2021-12-03 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Web content process sometimes crashes under WebPage::positionInformation()
https://bugs.webkit.org/show_bug.cgi?id=233841
rdar://85917212
Reviewed by Geoffrey Garen.
Add a test that exercises hit-testing for Live Text, but induces this crash by hit-testing outside of the bounds
of the web view (such that the hit-tested node ends up as null).
* TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:
(TestWebKitAPI::swizzledLocationInView):
(TestWebKitAPI::TEST):
2021-12-03 John Wilander <wilander@apple.com>
PCM: Unlinkable tokens for triggering event to prevent fraud
https://bugs.webkit.org/show_bug.cgi?id=233673
<rdar://79426347>
Reviewed by Alex Christensen.
New test PrivateClickMeasurement.DestinationClickFraudPrevention.
The other changes are a report version bump 2->3 and a name change
FraudPrevention–>SourceClickFraudPrevention.
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::runBasicPCMTest):
(TestWebKitAPI::triggerAttributionWithSubresourceRedirect):
Extracted shared code.
(TestWebKitAPI::runDestinationWebView):
Extracted shared code.
(TestWebKitAPI::signUnlinkableTokenAndSendSecretToken):
Extracted shared code.
(TestWebKitAPI::TEST):
New test PrivateClickMeasurement.DestinationClickFraudPrevention.
Extracted shared code from PrivateClickMeasurement.SourceClickFraudPrevention.
2021-12-03 Sihui Liu <sihui_liu@apple.com>
Fetch and remove file system data via WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=233567
Reviewed by Youenn Fablet.
* TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
2021-12-03 Chris Dumez <cdumez@apple.com>
Follow-up to r286479 to add API test and address issues found by the test
https://bugs.webkit.org/show_bug.cgi?id=233798
Reviewed by Darin Adler.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-12-03 Alex Christensen <achristensen@webkit.org>
Add room for more bytecode in WKContentRuleList file format
https://bugs.webkit.org/show_bug.cgi?id=233780
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
2021-12-03 Youenn Fablet <youenn@apple.com>
Persist NavigationPreloadState in service worker registration database
https://bugs.webkit.org/show_bug.cgi?id=233698
<rdar://problem/85963120>
Reviewed by Chris Dumez.
Increase counter from 7 to 8.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2021-12-02 Jean-Yves Avenard <jya@apple.com>
Compilation error on Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm
https://bugs.webkit.org/show_bug.cgi?id=233797
rdar://problem/86000569
Unreviewed API test build fix.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
2021-11-29 Jonathan Bedard <jbedard@apple.com>
[resultsdbpy] Make Python 3.10 compatible
https://bugs.webkit.org/show_bug.cgi?id=233771
<rdar://problem/85978234>
Reviewed by Dewei Zhu.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/configuration_context.py:
2021-12-02 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Handle ambiguous branch names in land
https://bugs.webkit.org/show_bug.cgi?id=233763
<rdar://problem/85973434>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.rebase): Be explicit about the name of the target branch when modifying timestamps.
2021-12-02 Devin Rousso <drousso@apple.com>
[css-values-4] Support `*vi` (inline) and `*vb` (block) viewport units
https://bugs.webkit.org/show_bug.cgi?id=232895
<rdar://problem/85179134>
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html:
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.svg: Added.
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm:
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SVGDocument): Added.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2021-12-02 Chris Dumez <cdumez@apple.com>
[WK2] Make Web Lock API work across multiple WebProcesses
https://bugs.webkit.org/show_bug.cgi?id=233719
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WebLocks.mm: Added.
(TestWebKitAPI::TEST):
2021-12-02 Wenson Hsieh <wenson_hsieh@apple.com>
[ Monterey ] fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html (layout-test) is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=233658
rdar://problem/85886424
Reviewed by Tim Horton.
Add a forward declaration for open source builds.
* TestWebKitAPI/ios/UIKitSPI.h:
2021-12-02 Brady Eidson <beidson@apple.com>
REGRESSION: r286075 [ Big Sur x86] 2 TestWebKitAPI.WebPushD (API-Tests) are constant failures
https://bugs.webkit.org/show_bug.cgi?id=233726
Unreviewed gardening.
- Disabling these tests on all Mac platforms until we can figure out the code signing/etc situation
- Fix the truly broken "basic" test everywhere by adapting to messaging changes
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::TEST):
2021-12-02 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. [GTK] Use nullptr instead of 0 in JSStringCreateWithCharacters()
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
(WTR::AccessibilityUIElement::attributesOfDocumentLinks):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::parameterizedAttributeNames):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::ariaDropEffects const):
(WTR::AccessibilityUIElement::rangeForLine):
(WTR::AccessibilityUIElement::rangeForPosition):
(WTR::AccessibilityUIElement::boundsForRange):
(WTR::AccessibilityUIElement::stringForRange):
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfColumns):
(WTR::AccessibilityUIElement::attributesOfRows):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::accessibilityValue const):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::stringForTextMarkerRange):
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
(WTR::AccessibilityUIElement::characterAtOffset):
2021-12-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of table and table cell interfaces when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=233694
Reviewed by Adrian Perez de Castro.
Add unit tests and WTR implementation for tables.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testTableBasic):
(beforeAll):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::rowAtIndex):
(WTR::elementsVector):
(WTR::attributesOfElements):
(WTR::AccessibilityUIElement::attributesOfChildren):
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::makeJSArray):
(WTR::AccessibilityUIElement::rowHeaders const):
(WTR::AccessibilityUIElement::columnHeaders const):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfRows):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):
(WTR::AccessibilityUIElement::rowCount):
(WTR::AccessibilityUIElement::columnCount):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
2021-12-01 Sihui Liu <sihui_liu@apple.com>
FileSystemSyncAccessHandle should be invalidated when network process crashes
https://bugs.webkit.org/show_bug.cgi?id=232605
<rdar://problem/85187706>
Reviewed by Youenn Fablet.
* TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
(test):
(keepAccessHandleActive):
2021-12-01 Carlos Alberto Lopez Perez <clopez@igalia.com>
[EWS][GTK][WPE] Add a new Class for running layout tests on the EWS for the GTK and WPE ports.
https://bugs.webkit.org/show_bug.cgi?id=231999
Reviewed by Jonathan Bedard.
This patch adds a new class to the EWS for running layout tests for the GTK and WPE ports.
It will be used initially for the GTK port and later for the WPE one.
Mac/iOS ports will continue to use the current default EWS, so no behaviour change for them.
This new class is specially designed to:
A. Work with a tree that is not always green (or even that is often quite red).
B. To not report any false positive to the patch author.
C. To allow patch authors to use this EWS to get new expectations for patches that need lot of new re-baselines (like a WPT import)
The very simplified logic of how this works is the following:
1. Run layout tests with patch (abort early at 500 unexpected failures)
2. Run layout tests with patch 10 times for each test that failed consistently (non-flaky) on step 1.
3. Run layout tests without patch 10 times for each test that failed consistently (non-flaky) on step 2.
Then report to the patch author only the new consistent failures (tests that failed always with the patch and passed always without the patch, retrying 10 times)
Any flaky test found is only reported to the bot watchers.
For an explainer about why this is needed, and more details about the flow diagram and several design considerations, please check:
https://people.igalia.com/clopez/wkbug/231999/explainer.html
The patch also add 3 new workers to the queue (to a total of 8) to speed up testing.
* CISupport/ews-build/config.json:
* CISupport/ews-build/factories.py:
(GTKTestsFactory):
* CISupport/ews-build/layout_test_failures.py:
(LayoutTestFailures.__init__):
(LayoutTestFailures.results_from_string):
(LayoutTestFailures.results_from_string.get_failing_tests):
* CISupport/ews-build/steps.py:
(BufferLogHeaderObserver):
(BufferLogHeaderObserver.__init__):
(BufferLogHeaderObserver.headerReceived):
(BufferLogHeaderObserver.getHeaders):
(BugzillaMixin.send_email_for_infrastructure_issue):
(Trigger.propertiesToPassToTriggers):
(RunWebKitTests.setLayoutTestCommand):
(RunWebKitTests.start):
(RunWebKitTests.commandComplete):
(ReRunWebKitTests.evaluateCommand):
(ReRunWebKitTests.commandComplete):
(RunWebKitTestsWithoutPatch.commandComplete):
(AnalyzeLayoutTestsResults.report_failure):
(AnalyzeLayoutTestsResults.send_email_for_flaky_failure):
(AnalyzeLayoutTestsResults.send_email_for_new_test_failures):
(AnalyzeLayoutTestsResults.start):
(RunWebKit1Tests.start):
(RunWebKitTestsRedTree):
(RunWebKitTestsRedTree._did_command_timed_out):
(RunWebKitTestsRedTree.evaluateCommand):
(RunWebKitTestsRepeatFailuresRedTree):
(RunWebKitTestsRepeatFailuresRedTree.__init__):
(RunWebKitTestsRepeatFailuresRedTree.setLayoutTestCommand):
(RunWebKitTestsRepeatFailuresRedTree.evaluateCommand):
(RunWebKitTestsRepeatFailuresRedTree.commandComplete):
(RunWebKitTestsRepeatFailuresRedTree.start):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree.__init__):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree.setLayoutTestCommand):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree.evaluateCommand):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree.commandComplete):
(RunWebKitTestsRepeatFailuresWithoutPatchRedTree.start):
(RunWebKitTestsWithoutPatchRedTree):
(RunWebKitTestsWithoutPatchRedTree.evaluateCommand):
(AnalyzeLayoutTestsResultsRedTree):
(AnalyzeLayoutTestsResultsRedTree.report_success):
(AnalyzeLayoutTestsResultsRedTree.report_warning):
(AnalyzeLayoutTestsResultsRedTree.report_infrastructure_issue_and_maybe_retry_build):
(AnalyzeLayoutTestsResultsRedTree.send_email_for_pre_existent_failures):
(AnalyzeLayoutTestsResultsRedTree.start):
* CISupport/ews-build/steps_unittest.py:
2021-12-01 Alex Christensen <achristensen@webkit.org>
Use Span instead of pointer/length in CompiledContentExtension
https://bugs.webkit.org/show_bug.cgi?id=233727
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
2021-12-01 Chris Dumez <cdumez@apple.com>
Unreviewed API test build fix.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
2021-12-01 Alex Christensen <achristensen@webkit.org>
Add csp-report resource type to WKContentRuleList
https://bugs.webkit.org/show_bug.cgi?id=233675
<rdar://71869893>
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::compareContents):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
2021-12-01 Ryan Haddad <ryanhaddad@apple.com>
[ iOS ] TestWebKitAPI.ApplicationManifest.IconCoding is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=233715
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:
(TestWebKitAPI::TEST): Remove a fragile assertion about the size of NSKeyedArchive that is causing the test to fail on iOS.
2021-12-01 W.D. Xiong <wdx@apple.com>
[macOS] run-benchmark should take diagnostic screenshots upon test timeout
https://bugs.webkit.org/show_bug.cgi?id=232736
Reviewed by Dewei Zhu.
Added defaults for the --diagnose-directory flag depending on platform.
Added diagnose_test_failure method to OSXBrowserDriver to take screenshots and save to diagnostic directory.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver._save_screenshot_to_path):
(OSXBrowserDriver):
(OSXBrowserDriver.diagnose_test_failure):
2021-12-01 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Do not query remotes when determining branches containing commit
https://bugs.webkit.org/show_bug.cgi?id=233700
<rdar://problem/85920569>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.branches_for): Remove -a from --contains check.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
2021-12-01 Tim Horton <timothy_horton@apple.com>
REGRESSION (r286346): ResourceLoadDelegate.LoadInfo fails
https://bugs.webkit.org/show_bug.cgi?id=233689
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm:
This test asserts that archiving a _WKResourceLoadInfo via NSKeyedArchiver
encodes to a particular size (607 bytes).
If you look at the resultant plist before r286346, the encoded frameID
and resourceLoadID have the same value, and because of NSKeyedArchiver
deduplication, share the same object.
If you look at the resultant plist *after* r286346, the encoded frameID
is one larger than the resourceLoadID, thus cannot be deduplicated, and
end up encoding as separate objects. This results in the encoded size
increasing to 612 bytes.
The reason that the encoded frameID is now one value larger is that
ObjectIdentifier uses a global identifier pool, and r286346 creates
one more ObjectIdentifier during EventHandler construction, destroying
our entirely coincidental ID overlap, and causing the aforementioned
encoded size change.
Remove this assertion from the test, since it is very aggressive and
seems unnecessary. We could instead just rebaseline the test, but it
seems insufficiently important to burden some future developer with
a repeat of this evening of exploration and discovery.
2021-12-01 Brady Eidson <beidson@apple.com>
Add WKWebsiteDataStore configuration option to enable Mock app bundle testing.
https://bugs.webkit.org/show_bug.cgi?id=233679
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
2021-11-30 Devin Rousso <drousso@apple.com>
[css-values-4] Dynamic `dv*` viewport units should not respect the page scale
https://bugs.webkit.org/show_bug.cgi?id=233291
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html:
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm:
(evaluateForNumber):
(dimensionOfElement): Added.
(widthOfElementWithID): Added.
(heightOfElementWithID): ADded.
(viewportUnitLength): Added.
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):
(getElementHeight): Deleted.
2021-11-30 BJ Burg <bburg@apple.com>
Web Inspector: add ExtensionTabActivation diagnostic event
https://bugs.webkit.org/show_bug.cgi?id=233101
<rdar://85264921>
Reviewed by Devin Rousso.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm:
(TEST):
Start using new method parameter 'extensionBundleIdentifier'.
2021-11-30 Brent Fulgham <bfulgham@apple.com>
Correct serialization error in _WKApplicationManifestIcon
https://bugs.webkit.org/show_bug.cgi?id=233602
<rdar://problem/85838843>
Reviewed by Devin Rousso.
This patch adds a new test "ApplicationManifest.IconCoding" to exercise the
NSCoder code paths.
* TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:
(TestWebKitAPI::TEST):
2021-11-30 Chris Dumez <cdumez@apple.com>
Scripting attributes are sometimes not properly stripped from elements when JS is disabled
https://bugs.webkit.org/show_bug.cgi?id=233642
<rdar://63180952>
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:
(TEST):
2021-11-30 Tyler Wilcock <tyler_w@apple.com>
AX: Reduce repetition in retrieving typed attribute values in AccessibilityUIElementMac
https://bugs.webkit.org/show_bug.cgi?id=233603
Reviewed by Chris Fleizach.
We have a lot of functions in both the WebKitTestRunner and DumpRenderTree versions of
AccessibilityUIElementMac that repeat the same logic for getting a typed attribute value.
We can make this simpler.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::stringAttributeValue):
Move core logic to new stringAttributeValue(NSString* attribute) function.
(AccessibilityUIElement::stringAttributeValue const): Added.
(AccessibilityUIElement::numberAttributeValue):
Move core logic to new numberAttributeValue(NSString* attribute) function.
(AccessibilityUIElement::numberAttributeValue const): Added.
(AccessibilityUIElement::boolAttributeValue const): Added.
(AccessibilityUIElement::boolAttributeValue):
Move core logic to new boolAttributeValue(NSString* attribute) function.
(AccessibilityUIElement::domIdentifier const):
(AccessibilityUIElement::intValue const):
(AccessibilityUIElement::minValue):
(AccessibilityUIElement::maxValue):
(AccessibilityUIElement::isEnabled):
(AccessibilityUIElement::isRequired const):
(AccessibilityUIElement::isFocused const):
(AccessibilityUIElement::isSelected const):
(AccessibilityUIElement::isExpanded const):
(AccessibilityUIElement::ariaIsGrabbed const):
(AccessibilityUIElement::documentEncoding):
(AccessibilityUIElement::documentURI):
(AccessibilityUIElement::isOnScreen const):
(AccessibilityUIElement::hasPopup const):
(AccessibilityUIElement::popupValue const):
(AccessibilityUIElement::hasDocumentRoleAncestor const):
(AccessibilityUIElement::hasWebApplicationAncestor const):
(AccessibilityUIElement::isInDescriptionListDetail const):
(AccessibilityUIElement::isInDescriptionListTerm const):
(AccessibilityUIElement::isInCell const):
Refactor to use new `NSString *attribute` convenience functions.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::stringAttributeValue):
Move core logic to new stringAttributeValue(NSString* attribute) function.
(WTR::AccessibilityUIElement::stringAttributeValue const): Added.
(WTR::AccessibilityUIElement::numberAttributeValue):
Move core logic to new numberAttributeValue(NSString* attribute) function.
(WTR::AccessibilityUIElement::numberAttributeValue const): Added.
(WTR::AccessibilityUIElement::boolAttributeValue const): Added.
(WTR::AccessibilityUIElement::boolAttributeValue):
Move core logic to new boolAttributeValue(NSString* attribute) function.
(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::intValue const):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::isEnabled):
(WTR::AccessibilityUIElement::isRequired const):
(WTR::AccessibilityUIElement::isFocused const):
(WTR::AccessibilityUIElement::isExpanded const):
(WTR::AccessibilityUIElement::currentStateValue const):
(WTR::AccessibilityUIElement::sortDirection const):
(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::hasPopup const):
(WTR::AccessibilityUIElement::popupValue const):
(WTR::AccessibilityUIElement::hasDocumentRoleAncestor const):
(WTR::AccessibilityUIElement::hasWebApplicationAncestor const):
(WTR::AccessibilityUIElement::isInDescriptionListDetail const):
(WTR::AccessibilityUIElement::isInDescriptionListTerm const):
(WTR::AccessibilityUIElement::isInCell const):
Refactor to use new `NSString *attribute` convenience functions.
2021-11-29 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Use info log level instead of warning
https://bugs.webkit.org/show_bug.cgi?id=233607
<rdar://problem/85840831>
Reviewed by Ryan Haddad.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.branch_point): Log to info instead of warning.
(Branch.main): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/checkout.py:
(Checkout.main): Log to info instead of warning.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
(Land.main): Log to info instead of warning.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_commit): Log to info instead of warning.
(PullRequest.main): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github): Log to info instead of warning.
(Setup.git): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
(TestBranch.test_basic_git):
(TestBranch.test_prompt_git):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py:
(TestLand.test_non_editable):
(TestLand.test_with_oops):
(TestLand.test_default):
(TestLand.test_canonicalize):
(TestLand.test_no_svn_canonical_svn):
(TestLand.test_svn):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
(TestSetup.test_svn):
(TestSetup.test_github):
2021-11-29 Simon Fraser <simon.fraser@apple.com>
Store image resolution in layout test snapshots, and have ImageDiff read it
https://bugs.webkit.org/show_bug.cgi?id=233609
Reviewed by Darin Adler.
On the way to fixing bug 232525, we need to communicate to ImageDiff the resolution of
layout test snapshots so that it can account for the resolution when computing pixel
tolerance values, which should be reported in CSS pixels.
So have DumpRenderTree and WebKitTestRunner, on Cocoa platforms, add image resolution
metadata, where a 2x snapshot (i.e. a hidpi test) reports a horizontal and vertical
resolution of 144dpi.
Change ImageDiff to read these values and store them in PlatformImage; a future patch will
make use of the data.
* DumpRenderTree/cg/PixelDumpSupportCG.cpp:
(printPNG):
(dumpBitmap):
* DumpRenderTree/cg/PixelDumpSupportCG.h:
(BitmapContext::scaleFactor const):
(BitmapContext::setScaleFactor):
* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(createBitmapContextFromWebView):
* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContextFromWebView):
* ImageDiff/ImageDiff.cpp:
(main):
* ImageDiff/PlatformImage.h:
(ImageDiff::PlatformImage::scaleFactor const):
* ImageDiff/cg/PlatformImageCG.cpp:
(ImageDiff::createImageFromDataProvider):
(ImageDiff::PlatformImage::createFromFile):
(ImageDiff::PlatformImage::createFromStdin):
(ImageDiff::PlatformImage::PlatformImage):
* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::dumpBitmap):
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
2021-11-29 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Guard git-webkit with __name__
https://bugs.webkit.org/show_bug.cgi?id=233278
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/git-webkit:
2021-11-29 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Delete unused environment variables
https://bugs.webkit.org/show_bug.cgi?id=233565
<rdar://problem/85820306>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/environment.py:
(Environment.__init__): Keep track of sure environment files.
(Environment.load): Ditto.
(Environment.secure): Delete all unused environment files, since they may contain credentials.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py:
(TestEnvironment.test_secure):
2021-11-29 Lauro Moura <lmoura@igalia.com>
[webkitcorepy] Environment: Sort values before comparing in unittest
https://bugs.webkit.org/show_bug.cgi?id=233582
Reviewed by Jonathan Bedard.
While Python3.6+'s dicts happen to keep insertion order, `os.listdir`
does not guarantee the order of the listed items[1]. This may cause
the Environment unittest to fail when comparing to the fixed expected
data, as it has been happending in some GTK/WPE bots.
[1] https://docs.python.org/3/library/os.html#os.listdir
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py:
(TestEnvironment.test_list):
2021-11-29 Wenson Hsieh <wenson_hsieh@apple.com>
WKContentView should allow -captureTextFromCamera: with a caret selection unless the sender is the callout bar
https://bugs.webkit.org/show_bug.cgi?id=233378
rdar://85478344
Reviewed by Tim Horton.
Adjust an API test to exercise the changes. See WebKit/ChangeLog for more details.
* TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:
2021-11-29 Yusuke Suzuki <ysuzuki@apple.com>
[JSC] Move m_incomingPolymorphicCalls out of CodeBlock::JITData
https://bugs.webkit.org/show_bug.cgi?id=233415
Reviewed by Mark Lam and Darin Adler.
Add tests for SentinelLinkedList.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp: Added.
(TestWebKitAPI::TestNode::TestNode):
(TestWebKitAPI::TestNode::value const):
(TestWebKitAPI::TEST):
2021-11-29 Lauro Moura <lmoura@igalia.com>
[webkitflaskpy] Make sure flask is registered before importing webkitflaskpy
https://bugs.webkit.org/show_bug.cgi?id=233561
Reviewed by Jonathan Bedard.
bug233339 moved AuthedBlueprint to webkitflaskpy, but flask needs to
be registered before being imported to make sure AutoInstall takes
care of it. This avoids `ModuleNotFound: flask` errors running the
tests from a clean tree.
* Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py:
2021-11-29 Angelos Oikonomopoulos <angelos@igalia.com>
Consider Source/cmake relevant for JSC
https://bugs.webkit.org/show_bug.cgi?id=233552
Reviewed by Aakash Jain.
Changes in Source/cmake may well be relevant for JSC.
* CISupport/ews-build/steps.py:
(CheckPatchRelevance):
2021-11-29 Nikolas Zimmermann <nzimmermann@igalia.com>
[LBSE] Add runtime flag for Layer-based SVG engine (LBSE)
https://bugs.webkit.org/show_bug.cgi?id=233211
<rdar://problem/85711597>
Reviewed by Sam Weinig.
Add build option ('build-webkit --(no-)layer-based-svg-engine') and
runtime flag ('LayerBasedSVGEngineEnabled' in LBSE enabled builds) to
switch between the SVG engines.
The actual SVG code changes will follow in subsequent patches,
this just adds the infrastructure for LBSE.
* Scripts/webkitperl/FeatureList.pm: Add mapping from 'layer-based-svg-engine' -> 'ENABLE_LAYER_BASED_SVG_ENGINE'.
2021-11-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Signal state-changed:selected is not emitted for listbox elements when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=233521
Reviewed by Adrian Perez de Castro.
Add test cases to check that the signal is now emitted as expected.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(AccessibilityTest::isSelected):
(testAccessibleStateChanged):
(testSelectionListBox):
(testSelectionMenuList):
2021-11-26 Lauro Moura <lmoura@igalia.com>
[GTK] Gardening API test WebKit.OnDeviceChangedCrash as flaky timeout
Unreviewed test gardening.
Flakiness seems to have been introduced between 243131@main and
243249@main.
* TestWebKitAPI/glib/TestExpectations.json:
2021-11-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] MenuListPopup elements should implement selection interface too when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=233519
Reviewed by Adrian Perez de Castro.
Add a test case for menu list.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testSelectionListBox):
(testSelectionMenuList):
(beforeAll):
2021-11-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of selection interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=233494
Reviewed by Adrian Perez de Castro.
Add tests case for selection interface and WTR implementation.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testSelectionListBox):
(beforeAll):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::selectedChildAtIndex const):
(WTR::AccessibilityUIElement::selectedChildrenCount const):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const):
(WTR::AccessibilityUIElement::removeSelectionAtIndex const):
(WTR::AccessibilityUIElement::clearSelectedChildren const):
2021-11-25 Jean-Yves Avenard <jya@apple.com>
Avoid flattening a SharedBuffer when reading reading it through SharedBufferChunkReader.
https://bugs.webkit.org/show_bug.cgi?id=233481
rdar://problem/85733358
Reviewed by Cameron McCormack.
Add API tests.
API tests original data come from the original bug that added
SharedBufferChunkReader (bug 59946) and then expanded.
* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::readAllChunks):
(TestWebKitAPI::checkChunks):
(TestWebKitAPI::checkDataInRange):
* TestWebKitAPI/Tests/WebCore/SharedBufferTest.h:
2021-11-25 Lauro Moura <lmoura@igalia.com>
[GTK] Gardening API test authentication-success flaky timeout
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-11-25 Kimmo Kinnunen <kkinnunen@apple.com>
GraphicsContextGL implementations should have separate class definitions
https://bugs.webkit.org/show_bug.cgi?id=233491
Reviewed by Antti Koivisto.
Adjust TestGraphicsContextGLOpenGLCocoa to
TestGraphicsContextGLCocoa after GraphicsContextGLOpenGL
Cocoa variant rename to GraphicsContextGLCocoa.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm: Renamed from Tools/TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm.
(TestWebKitAPI::createDefaultTestContext):
(TestWebKitAPI::changeContextContents):
(TestWebKitAPI::TEST_F):
2021-11-25 Kimmo Kinnunen <kkinnunen@apple.com>
ANGLE Metal: The memory backing IOSurfaces of former client buffer pbuffers is leaked
https://bugs.webkit.org/show_bug.cgi?id=233328
<rdar://problem/85563187>
Reviewed by Antti Koivisto.
Add tests testing Cocoa GraphicsContextGLOpenGL drawing buffer
recycling behavior.
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* TestWebKitAPI/Sources.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp:
(TestWebKitAPI::imageBufferPixelIs):
(TestWebKitAPI::memoryFootprintChangedBy): Deleted.
* TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm:
(TestWebKitAPI::createDefaultTestContext):
(TestWebKitAPI::changeContextContents):
(TestWebKitAPI::TEST):
* TestWebKitAPI/TestUtilities.h: Added.
* TestWebKitAPI/TestUtilities.cpp: Added.
Add few useful functions to TestUtilities.h so that different
tests can use them.
2021-11-23 Lauro Moura <lmoura@igalia.com>
[GTK] GdkRGBA expects colors to be in the 0.0 to 1.0 range
https://bugs.webkit.org/show_bug.cgi?id=233452
Reviewed by Michael Catanzaro.
GTK4 debug was hitting assertInRange inside ColorTypes.h due to 255
being used as the max value, while GdkRGBA expects the value to be
between 0.0 and 1.0, per the official docs [1][2].
[1] https://docs.gtk.org/gdk3/struct.RGBA.html
[2] https://docs.gtk.org/gdk4/struct.RGBA.html
* MiniBrowser/gtk/BrowserWindow.c:
2021-11-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Change hardware-acceleration-policy setting default value to always
https://bugs.webkit.org/show_bug.cgi?id=233418
Reviewed by Michael Catanzaro.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings):
2021-11-23 Angelos Oikonomopoulos <angelos@igalia.com>
Fix buildbot command timeout issue for remote tests
https://bugs.webkit.org/show_bug.cgi?id=233309
Reviewed by Adrian Perez de Castro.
Occasionally, buildbots that execute the JSC tests on remote devices
would stop producing any output and eventually get killed due to a timeout.
The issue is that run-jsc-stress-tests would start an ssh command
(overwhelmingly likely, the command to copy over the payload), then the remote
board would stop responding.
Introduce a timeout option to forEachRemote and bound the waiting time.
Could also do this for each command individually (and this would make it
straightforward to GC zombie processes) but seems way more fragile than
doing it at the thread level.
* Scripts/run-jsc-stress-tests:
2021-11-22 Wenson Hsieh <wenson_hsieh@apple.com>
Remove old concurrent display list logic that's no longer necessary
https://bugs.webkit.org/show_bug.cgi?id=233433
Reviewed by Sam Weinig.
See WebCore ChangeLog for more details.
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
(TestWebKitAPI::TEST):
2021-11-22 Geza Lore <glore@igalia.com>
[JSC] Make sharing of unlinked baseline code possible on JSVALUE32_64
https://bugs.webkit.org/show_bug.cgi?id=232624
Reviewed by Yusuke Suzuki.
Add extra SunSpider run on 32-bit platforms exerciseing baseline JIT
code sharing.
* Scripts/run-javascriptcore-tests:
(runJSCStressTests):
2021-11-22 Angelos Oikonomopoulos <angelos@igalia.com>
Move detection of flaky JSC tests to run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=232529
Reviewed by Jonathan Bedard.
Currently, flaky detection happens by
ReRunJavaScriptCoreTests. Unfortunately, this means that we end up
rerunning all JSC tests when there's even a single failure. Even
worse, when the tree is broken (as sometimes happens on ARM32 and
MIPS) we end up
1. running the tests once (they fail)
2. running all tests again
3. running all tests again without the patch
This means the queue slows down a lot, since it runs all JSC
stress tests 3 times.
This patch attempts to eliminate step 2, while also being more
reliable about handling flaky tests. Since we no longer need to
rerun the whole test suite, we can spend more CPU time on
identifying tests that might be flaky. The user can pass in
--treat-failing-as-flaky=passPercentage,maxTries,maxFailing. If
less than maxFailing tests failed, we run them again (up to
maxTries) until we can tell whether they pass more than
passPercentage of the time. This should result in less false
positives compared to ReRunJavaScriptCoreTests, as we'll no longer
declare a flaky test a failure if it happens to fail two times in
a row. In order to remove ReRunJavaScriptCoreTests, the patch
unconditionally enables --treat-failing-as-flaky by default in the
JSC EWS queues.
Implementation-wise, the patch generalizes the existing retry loop in
run-jsc-stress-tests (for dealing with flaky remote hosts) to (a) work
with any runner and (b) also retry flaky tests. As flaky handling is
impractical to test manually, it also abstracts-out the retry logic so
that we can test with predetermined results. This means we need to
e.g. pass the runlist around instead of treating it as a global,
capturing the main logic in classes and having a subclass provide
methods to be called back and so on. The patch does not shy away from
refactoring code when it makes sense but also doesn't go out of its
way to refactor (e.g. there's still a lot of duplication between the
default and ruby writers).
Downsides: we can no longer detect flakiness in the binary tests
(testair, testb3, ...). However, I'm not aware of any instance of
flakiness in those tests. The retry loop is now being used for all
runners, which means the results analysis path for e.g. the make
runner is now a bit more complicated. Detecting flaky tests needs
code somewhere, but this moves the detection code before the
result reporting, so is a bit riskier. The self tests should
counterbalance this.
* CISupport/ews-build/steps.py:
Kill ReRunJavaScriptCoreTests and enable --treat-failing-as-flaky.
Defaults to 60% pass percentage, 10 maxTries and a limit of 200
failing tests.
(RunJavaScriptCoreTests):
(RunJavaScriptCoreTests.__init__):
(RunJavaScriptCoreTests.start):
(RunJavaScriptCoreTests.evaluateCommand):
(RunJavaScriptCoreTests.commandComplete):
(RunJavaScriptCoreTests.getResultSummary):
(RunJavaScriptCoreTests._addToLog):
(AnalyzeJSCTestsResults.start):
(ReRunJavaScriptCoreTests): Deleted.
(ReRunJavaScriptCoreTests.evaluateCommand): Deleted.
* CISupport/ews-build/steps_unittest.py:
Update to match the changes in steps.py. Some testcases no longer
apply.
* Scripts/jsc-stress-test-helpers/shell-runner.sh:
Don't deduce the test list manually, expect it as an argument instead.
* Scripts/run-javascriptcore-tests:
Propagate info on test flakiness.
(runJSCStressTests):
* Scripts/run-jsc-stress-tests:
Refactor the execution logic to use the abstracted-out code in
executor.rb. Use the retry loop on every runner.
* Scripts/webkitruby/jsc-stress-test-writer-default.rb:
Update the test-writer files for the changes to run-jsc-stress-tests.
Move prepareFooRunner and testRunnerCommand to a class so that we can
keep state (for the new argument to the shell runner).
* Scripts/webkitruby/jsc-stress-test-writer-playstation.rb:
* Scripts/webkitruby/jsc-stress-test-writer-ruby.rb:
* Scripts/webkitruby/jsc-stress-test/executor.rb: Added.
Implement a generic retry loop and define an array of virtual
tests (using predefined test results for each iteration).
* Scripts/webkitruby/jsc-stress-test/test-result-evaluator.rb: Added.
Encapsulate the logic on whether a test has passed or not
(Did we get any results? Were those results enough to declare a
flaky/non-flaky test a pass?) and add a number of tests.
2021-11-21 Wenson Hsieh <wenson_hsieh@apple.com>
Add an API test for batch image analysis (-[WKWebView _startImageAnalysis:])
https://bugs.webkit.org/show_bug.cgi?id=233331
Reviewed by Sam Weinig.
Add a new API teset to exercise the `-_startImageAnalysis:` SPI introduced in r285949, along with helper
functions to simulate `VKImageAnalysis` results from VisionKitCore. See below for more details.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:
(-[TestWKWebView waitForImageAnalysisRequests:]):
(TestWebKitAPI::createWebViewWithTextRecognitionEnhancements):
(TestWebKitAPI::swizzledProcessRequestWithResults):
(TestWebKitAPI::swizzledProcessRequestWithError):
(TestWebKitAPI::TEST):
(TestWebKitAPI::swizzledProcessRequest): Deleted.
Add an API test that uses `-_startImageAnalysis:` to perform batch image analysis over 5 image elements on the
page, and verify that the text results are injected back into the page.
* TestWebKitAPI/Tests/WebKitCocoa/multiple-images.html: Added.
* TestWebKitAPI/cocoa/ImageAnalysisTestingUtilities.h: Added.
* TestWebKitAPI/cocoa/ImageAnalysisTestingUtilities.mm: Added.
(-[TestVKQuad initWithTopLeft:topRight:bottomLeft:bottomRight:]):
(-[TestVKWKTextInfo initWithString:quad:]):
(-[TestVKWKTextInfo string]):
(-[TestVKWKTextInfo quad]):
(-[TestVKWKLineInfo initWithString:quad:children:]):
(-[TestVKWKLineInfo children]):
(-[TestVKImageAnalysis initWithLines:]):
(-[TestVKImageAnalysis allLines]):
(TestWebKitAPI::createQuad):
(TestWebKitAPI::createTextInfo):
(TestWebKitAPI::createLineInfo):
(TestWebKitAPI::createImageAnalysis):
(TestWebKitAPI::createImageAnalysisWithSimpleFixedResults):
Add helper functions to create and return mock objects that represent VKImageAnalysis, VKWKLineInfo,
VKWKTextInfo and VKQuad.
2021-11-21 Andres Gonzalez <andresg_22@apple.com>
Dispatch all AccessibilityUIElement parameterized attribute requests to the AX thread for isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=233377
<rdar://problem/85613334>
Reviewed by Chris Fleizach.
To simulate AT client requests in isolated tree mode, all parameterized
attribute requests should be dispatched to the AX thread.
This patch adds AccessibilityUIElement::attributeValueForParameter that
does the appropriate dispatch to the AX thread.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::attributeValue):
(WTR::AccessibilityUIElement::attributeValue const):
(WTR::AccessibilityUIElement::attributeValueForParameter const):
(WTR::AccessibilityUIElement::lineForIndex):
(WTR::AccessibilityUIElement::rangeForLine):
(WTR::AccessibilityUIElement::rangeForPosition):
(WTR::AccessibilityUIElement::boundsForRange):
(WTR::AccessibilityUIElement::stringForRange):
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::selectTextWithCriteria):
(WTR::AccessibilityUIElement::searchTextWithCriteria):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::lineIndexForTextMarker const):
(WTR::AccessibilityUIElement::misspellingTextMarkerRange):
(WTR::AccessibilityUIElement::textMarkerRangeForElement):
(WTR::AccessibilityUIElement::textMarkerRangeLength):
(WTR::AccessibilityUIElement::previousTextMarker):
(WTR::AccessibilityUIElement::nextTextMarker):
(WTR::AccessibilityUIElement::stringForTextMarkerRange):
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
(WTR::AccessibilityUIElement::textMarkerRangeForRange):
(WTR::AccessibilityUIElement::resetSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForBounds):
(WTR::AccessibilityUIElement::startTextMarkerForBounds):
(WTR::AccessibilityUIElement::textMarkerForPoint):
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute):
(WTR::AccessibilityUIElement::indexForTextMarker):
(WTR::AccessibilityUIElement::isTextMarkerValid):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(WTR::_convertMathMultiscriptPairsToString):
2021-11-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of image interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232782
Reviewed by Adrian Perez de Castro.
Add unit tests for the image interface.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testImageBasic):
(beforeAll):
2021-11-19 Alex Christensen <achristensen@webkit.org>
Implement extension-path variant of redirect action in WKContentRuleList
https://bugs.webkit.org/show_bug.cgi?id=233351
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::makeBackend):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:
(TEST_F):
2021-11-19 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Add headers for [_WKWebAuthenticationPanel makeCredentialWithClientDataHash] and [_WKWebAuthenticationPanel getAssertionWithClientDataHash]
https://bugs.webkit.org/show_bug.cgi?id=233371
<rdar://problem/85607248>
Reviewed by Brent Fulgham.
Add tests for [_WKWebAuthenticationPanel makeCredentialWithClientDataHash] and
[_WKWebAuthenticationPanel getAssertionWithClientDataHash].
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-11-19 Robert Jenner <Jenner@apple.com>
[ Monterey ] TestWebKitAPI.WebSocket.PageWithAttributedBundleIdentifierDestroyed (API-test) is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=233224
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):
2021-11-18 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Indicate to user the default option
https://bugs.webkit.org/show_bug.cgi?id=233342
<rdar://problem/85573383>
Reviewed by Ryan Haddad.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:
(Terminal.choose): Surround the default option with square brackets.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py:
(TerminalTests.test_choose_triple):
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github): We should construct a user owned mirror by default.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py:
(TestLand.test_default):
(TestLand.test_canonicalize):
(TestLand.test_svn):
(TestLandGitHub):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
(TestSetup.test_github):
2021-11-19 Brady Eidson <beidson@apple.com>
More webpushd architecture work
https://bugs.webkit.org/show_bug.cgi?id=233295
Reviewed by Alex Christensen.
* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements:
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::TEST):
2021-11-18 Jonathan Bedard <jbedard@apple.com>
[resultsdbpy] Move AuthedBlueprint to webkitflaskpy
https://bugs.webkit.org/show_bug.cgi?id=233339
<rdar://problem/85571604>
Reviewed by Ryan Haddad.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py: Import
AuthedBlueprint from webkitflaskpy.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/view_routes.py: Ditto.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.
* Scripts/libraries/webkitflaskpy/setup.py: Ditto.
* Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: Bump Export object.
* Scripts/libraries/webkitflaskpy/webkitflaskpy/authed_blueprint.py: Renamed from
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/flask_support/authed_blueprint.py.
2021-11-19 Brent Fulgham <bfulgham@apple.com>
Add support for web app manifest icons in WebKit/UI Process layer
https://bugs.webkit.org/show_bug.cgi?id=233350
<rdar://problem/84311569>
Reviewed by Chris Dumez.
Add a new API test to exercise the _WKApplicationManifestIcon API.
* TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:
(ApplicationManifestParserTest::testIconsSizes):
(TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:
(TestWebKitAPI::TEST):
2021-11-19 Robert Jenner <Jenner@apple.com>
[ Monterey ]TestWebKitAPI.PrivateClickMeasurement.EphemeralWithAttributedBundleIdentifier (API-test) is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=233345
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-11-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of document interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232755
Reviewed by Adrian Perez de Castro.
Add unit test for the document interface and WTR implementation.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testDocumentBasic):
(beforeAll):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
2021-11-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of action interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232749
Reviewed by Adrian Perez de Castro.
Add a unit test for the action interface and WTR implementation.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testActionBasic):
(beforeAll):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::isPressActionSupported):
(WTR::AccessibilityUIElement::press):
2021-11-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of hypertext interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232708
Reviewed by Adrian Perez de Castro.
Add unit tests to check hypertext interface.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testHypertextBasic):
(beforeAll):
2021-11-19 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. [GLIB] Add new test case to /jsc/class
Add a test case to check using JSC_TYPE_VALUE for a JSCClass property.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(setFooValue):
(getFooValue):
(testJSCClass):
2021-11-19 Arcady Goldmints-Orlov <agoldmints@igalia.com>
REGRESSION(r285859) [GTK][WPE] a number of accessibility/* tests crash on GTK and WPE
https://bugs.webkit.org/show_bug.cgi?id=233221
Reviewed by Carlos Garcia Campos.
Add null checks in the ATK code to ensure AccessibilityUIElement::create()
is not passed a NULL pointer.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::focusedElement):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::getChildren):
(WTR::AccessibilityUIElement::getChildrenWithRange):
2021-11-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of hyperlink interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232707
Reviewed by Adrian Perez de Castro.
Add unit tests to check hyperlink interface and implement AccessibilityUIElement::url() in WTR.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testTextReplacedObjects):
(testHyperlinkBasic):
(beforeAll):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::url):
2021-11-18 Alex Christensen <achristensen@webkit.org>
Allow all redirect schemes when compiling a content rule list
https://bugs.webkit.org/show_bug.cgi?id=233338
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::checkCompilerError):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:
(compileContentRuleList):
2021-11-18 Robert Jenner <Jenner@apple.com>
[ Monterey ] TestWebKitAPI.WebpagePreferences.WebsitePoliciesDuringRedirect is a constant timeout
<rdar://80476146>
Uneviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(TEST):
2021-11-18 Robert Jenner <Jenner@apple.com>
[ Monterey ] 2 TestWebKitAPI.WebKit.DisplayName (api-tests) are constantly failing
<rdar://80353834>
Uneviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm:
(TestWebKitAPI::TEST):
2021-11-18 Robert Jenner <Jenner@apple.com>
[ Monterey ] 2 TestWebKitAPI.WebKit.DisplayName (api-tests) are constantly failing
<rdar://80353834>
Uneviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm:
(TestWebKitAPI::TEST):
2021-11-18 Jonathan Bedard <jbedard@apple.com>
Link Python packages to GitHub
https://bugs.webkit.org/show_bug.cgi?id=233318
<rdar://problem/85551201>
Reviewed by Stephanie Lewis.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/setup.py: Bump version, link to GitHub.
* Scripts/libraries/webkitcorepy/setup.py: Bump version, link to GitHub.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version.
* Scripts/libraries/webkitflaskpy/setup.py: Bump version, link to GitHub.
* Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: Bump version.
* Scripts/libraries/webkitscmpy/setup.py: Bump version, link to GitHub.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
2021-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of value interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232300
Reviewed by Adrian Perez de Castro.
Add new unit test for the value interface and implement WTR value support.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testValueBasic):
(beforeAll):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::isAttributeSettable):
(WTR::AccessibilityUIElement::intValue const):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::increment):
(WTR::AccessibilityUIElement::decrement):
2021-10-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add initial WTR accessibility support when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230259
Reviewed by Adrian Perez de Castro.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:
(WTR::findAccessibleObjectById):
(WTR::AccessibilityController::accessibleElementById):
(WTR::AccessibilityController::platformName):
(WTR::AccessibilityController::axRunLoop):
(WTR::AccessibilityController::executeOnAXThreadAndWait):
(WTR::AccessibilityController::executeOnAXThread):
(WTR::AccessibilityController::executeOnMainThread):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::AccessibilityUIElement):
(WTR::AccessibilityUIElement::isEqual):
(WTR::AccessibilityUIElement::childrenCount):
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::childAtIndex):
(WTR::elementForRelationAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::parentElement):
(WTR::attributesOfElement):
(WTR::attributesOfElements):
(WTR::AccessibilityUIElement::attributesOfChildren):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::checkElementState):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSupported):
(WTR::roleValueToString):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::y):
(WTR::AccessibilityUIElement::width):
(WTR::AccessibilityUIElement::height):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::isEnabled):
(WTR::AccessibilityUIElement::isRequired const):
(WTR::AccessibilityUIElement::isFocused const):
(WTR::AccessibilityUIElement::isSelected const):
(WTR::AccessibilityUIElement::isSelectedOptionActive const):
(WTR::AccessibilityUIElement::isExpanded const):
(WTR::AccessibilityUIElement::isChecked const):
(WTR::AccessibilityUIElement::isIndeterminate const):
(WTR::AccessibilityUIElement::hierarchicalLevel const):
(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::ariaDropEffects const):
(WTR::AccessibilityUIElement::lineForIndex):
(WTR::AccessibilityUIElement::rangeForLine):
(WTR::AccessibilityUIElement::boundsForRange):
(WTR::AccessibilityUIElement::stringForRange):
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::setSelectedTextRange):
(WTR::AccessibilityUIElement::isFocusable const):
(WTR::AccessibilityUIElement::isSelectable const):
(WTR::AccessibilityUIElement::isMultiSelectable const):
(WTR::AccessibilityUIElement::isVisible const):
(WTR::AccessibilityUIElement::isOffScreen const):
(WTR::AccessibilityUIElement::isCollapsed const):
(WTR::AccessibilityUIElement::isSingleLine const):
(WTR::AccessibilityUIElement::isMultiLine const):
(WTR::AccessibilityUIElement::hasPopup const):
(WTR::AccessibilityUIElement::scrollToMakeVisible):
(WTR::AccessibilityUIElement::scrollToGlobalPoint):
(WTR::stringAtOffset):
(WTR::AccessibilityUIElement::characterAtOffset):
(WTR::AccessibilityUIElement::wordAtOffset):
(WTR::AccessibilityUIElement::lineAtOffset):
(WTR::AccessibilityUIElement::sentenceAtOffset):
* WebKitTestRunner/gtk/main.cpp:
(main):
2021-11-18 Youenn Fablet <youenn@apple.com>
MediaPlayerAVFoundation should support rvfc
https://bugs.webkit.org/show_bug.cgi?id=231945
Reviewed by Eric Carlson.
Enable rvfc by default in test runner.
* DumpRenderTree/mac/DumpRenderTree.mm:
* WebKitTestRunner/TestController.cpp:
2021-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] jsc_value_object_define_property_accessor() throws an exception when called on a value without a wrapper instance
https://bugs.webkit.org/show_bug.cgi?id=233253
Reviewed by Michael Catanzaro.
Add unit tests to check jsc_value_object_define_property_accessor().
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(getIntProperty):
(setIntProperty):
(testJSCObject):
2021-11-17 Alex Christensen <achristensen@webkit.org>
Implement most of redirect and modify-headers action types
https://bugs.webkit.org/show_bug.cgi?id=233268
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::checkCompilerError):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:
(compileContentRuleList):
(navigationDelegateAllowingActiveActionsOnTestHost):
(TEST_F):
2021-11-17 John Wilander <wilander@apple.com>
PCM: Add capability for click destination to fire triggering event without cross-site requests to the click source
https://bugs.webkit.org/show_bug.cgi?id=233173
<rdar://79426605>
Reviewed by Alex Christensen.
These changes are just a correction of a function name:
sourceUnlinkableToken() to sourceSecretToken()
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:
(TestWebKitAPI::TEST):
2021-11-17 Ryan Haddad <ryanhaddad@apple.com>
ASSERT NOT REACHED under WebKit::Daemon::ConnectionToMachService seen with TestWebKitAPI.WebPushD.BasicCommunication and PermissionManagement
https://bugs.webkit.org/show_bug.cgi?id=232857
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: Fix number in version check.
2021-11-17 Ryan Haddad <ryanhaddad@apple.com>
[Monterey] TestWebKitAPI.PrivateClickMeasurement.Daemon* tests timing out: Failed to connect to mach service org.webkit.pcmtestdaemon.service
https://bugs.webkit.org/show_bug.cgi?id=232890
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST): Disable tests for Monterey.
2021-11-17 Alex Christensen <achristensen@webkit.org>
Enable adattributiond testing on iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=233285
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::cleanUpDaemon):
(TestWebKitAPI::TEST):
2021-11-17 Ryan Haddad <ryanhaddad@apple.com>
ASSERT NOT REACHED under WebKit::Daemon::ConnectionToMachService seen with TestWebKitAPI.WebPushD.BasicCommunication and PermissionManagement
https://bugs.webkit.org/show_bug.cgi?id=232857
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::TEST): Disable the tests for Monterey.
2021-11-16 Ryan Haddad <ryanhaddad@apple.com>
[macOS Debug] TestWebKitAPI.WKInspectorExtensionDelegate.InspectedPageNavigatedCallbacks is timing out
https://bugs.webkit.org/show_bug.cgi?id=231847
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: Disable test in the debug configuration.
2021-11-17 Zixing Liu <liushuyu011@gmail.com>
[GTK][WPE] Support getting and setting HTTP headers in custom URI scheme handlers
https://bugs.webkit.org/show_bug.cgi?id=203273
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testWebContextURIScheme): Added a new test to test getting and setting HTTP headers in custom URI scheme handlers
2021-11-16 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Load secrets in kubernetes
https://bugs.webkit.org/show_bug.cgi?id=233158
<rdar://problem/85433499>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Environment.
* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): Use Environment instead of os.environ.
* Scripts/libraries/webkitcorepy/webkitcorepy/environment.py: Added.
(Environment):
(Environment.instance): Construct a shared Environmant intance.
(Environment.__init__):
(Environment.load): Load secrets in file directory.
(Environment.get): Check environment variable and then secret store.
(Environment.__getitem__):
(Environment.__setitem__):
(Environment.keys): Iterate through secret store and environment variables.
(Environment.values): Ditto.
(Environment.items): Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py: Added.
(TestEnvironment):
(TestEnvironment.test_basic):
(TestEnvironment.test_scoped):
(TestEnvironment.test_list):
2021-11-12 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Mark landed changes as merged
https://bugs.webkit.org/show_bug.cgi?id=233056
<rdar://problem/85351564>
Reviewed by Dewei Zhu.
For BitBucket and GitHub to recognize a pull-request as merged, the target
branch must be updated with the exact commit to be merged as the merge occurs.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
(Land.main): Update source branch when merging commits to target branch.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.update): Only delete values if they exist.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py:
(TestLand):
(TestLandGitHub):
(TestLandBitBucket):
2021-11-16 Chris Dumez <cdumez@apple.com>
Crash under WebKit::WebPageProxy::commitProvisionalPage()
https://bugs.webkit.org/show_bug.cgi?id=233199
<rdar://57659921>
Reviewed by Youenn Fablet.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-16 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser][WK2] Show a message box for a provisional navigation failure
https://bugs.webkit.org/show_bug.cgi?id=233170
Reviewed by Don Olmstead.
Show a MessageBox if a provisional navigation failed.
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::didFailProvisionalNavigation):
* MiniBrowser/win/WebKitBrowserWindow.h:
2021-11-16 Zhifei Fang <zhifei_fang@apple.com>
Make run-javascript-core-test and run-jsc-stress-tests support a customized identity file
https://bugs.webkit.org/show_bug.cgi?id=232453
Reviewed by Ryan Haddad.
* Scripts/run-javascriptcore-tests: Add idFilePath field for remote config.
* Scripts/run-jsc-stress-tests: Add idFilePath field for remote config.
* Scripts/webkitdirs.pm:
(determineNativeArchitecture): Provide -i option to ssh
2021-11-16 Chris Dumez <cdumez@apple.com>
[iOS] Do not require the web browser entitlement to opt into captive portal mode
https://bugs.webkit.org/show_bug.cgi?id=233191
Reviewed by Brent Fulgham.
Update API test coverage accordingly.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-16 Andres Gonzalez <andresg_22@apple.com>
Fix for accessibility/mac/replace-text-with-range-on-webarea-element.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=233160
<rdar://problem/85436385>
Reviewed by Chris Fleizach.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::replaceTextInRange):
Dispatches to the AX thread the call to the wrapper's
[accessibilityReplaceRange withText:] method.
2021-11-16 Brady Eidson <beidson@apple.com>
Enable webpushd tests in the iOS simulator.
https://bugs.webkit.org/show_bug.cgi?id=233149
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::testWebPushDaemonPList): Add a key to allow an OSLaunchdJob executable to break out of the simulator runtime root.
2021-11-16 Tyler Wilcock <tyler_w@apple.com>
AX: Stop returning AccessibilityUIElements backed by a null pointer
https://bugs.webkit.org/show_bug.cgi?id=233138
Reviewed by Andres Gonzalez.
Prior to this patch, some callers of AccessibilityUIElement::create
passed null `id`s, resulting in a seemingly valid AccessibilityUIElement
that is actually backed by a null pointer. This makes writing tests harder,
since you can't rely on common operations like `!myElement` to do the right thing.
With this patch, we add a RELEASE_ASSERT to
AccessibilityUIElement::create requiring the passed pointer to be
valid. This patch also fixes up some callsites where we could (and did) pass null pointers.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::focusedElement):
* WebKitTestRunner/InjectedBundle/win/AccessibilityControllerWin.cpp:
(WTR::AccessibilityController::focusedElement):
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::focusedElement):
Return RefPtr instead of Ref, since it's possible that no element is
focused.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::create):
Add RELEASE_ASSERT() to verify passed pointer is valid.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::focusedElement const):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler _notificationReceived:]):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::uiElementAttributeValue const):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar const):
(WTR::AccessibilityUIElement::verticalScrollbar const):
Don't call AccessibilityUIElement::create with null pointers.
2021-11-15 Michael Catanzaro <mcatanzaro@gnome.org>
Make valgrind work properly without extra environment variables
https://bugs.webkit.org/show_bug.cgi?id=230460
Reviewed by Carlos Garcia Campos.
Exempt valgrind.h from the style checker.
* Scripts/webkitpy/style/checker.py:
2021-11-14 Brady Eidson <beidson@apple.com>
Get daemon API ready to work in the iOS simulator (starting with WebPushD)
https://bugs.webkit.org/show_bug.cgi?id=232982
Reviewed by Geoff Garen.
To get this working we needed to:
- Have the Daemons installed in a simulator-runtime-root-visible path
- Point the OSLaunchDJob plist to the simulator-relative path, not Mac-relative
- Solve the "How do I kill existing instances to run a clean test?" problem within the simulator.
This patch does those things.
* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::setUpTestWebPushD):
(TestWebKitAPI::cleanUpTestWebPushD):
* TestWebKitAPI/cocoa/DaemonTestUtilities.h:
* TestWebKitAPI/cocoa/DaemonTestUtilities.mm:
(TestWebKitAPI::registerPlistWithLaunchD):
(TestWebKitAPI::pidOfFirstDaemonInstance):
(TestWebKitAPI::killFirstInstanceOfDaemon):
2021-11-13 Simon Fraser <simon.fraser@apple.com>
Implement UIScriptController.sendEventStream() for DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=233090
Reviewed by Wenson Hsieh.
Implement UIScriptControllerMac::sendEventStream(), sharing some event dispatching code from
EventSendingController.
* DumpRenderTree/mac/EventSendingController.h:
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):
(-[EventSendingController sendScrollEventAt:deltaX:deltaY:units:wheelPhase:momentumPhase:timestamp:]):
* DumpRenderTree/mac/UIScriptControllerMac.h:
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::gesturePhaseFromString):
(WTR::momentumPhaseFromString):
(WTR::eventSenderFromView):
(WTR::UIScriptControllerMac::sendEventStream):
2021-11-13 Jonathan Bedard <jbedard@apple.com>
Unreviewed, reverting r285772.
Ownership issues in some XCode installs
Reverted changeset:
"[webkitpy] Symlink daemons into simulator runtime root"
https://bugs.webkit.org/show_bug.cgi?id=233080
https://commits.webkit.org/r285772
2021-11-13 Tyler Wilcock <tyler_w@apple.com>
AX: Make accessibility/mac/header.html test async to fix it for isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=233017
Reviewed by Andres Gonzalez.
This patch implements the `domIdentifier` attribute for DumpRenderTree
elements. When making this test async, I wanted to use this attribute,
hence the implementation in this patch.
* DumpRenderTree/AccessibilityUIElement.cpp:
(domIdentifierCallback): Added.
(AccessibilityUIElement::getJSClass):
Add "domIdentifer" entry to `staticValues[]`.
* DumpRenderTree/AccessibilityUIElement.h:
Add AccessibilityUIElement::domIdentifier const definition.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::domIdentifier const): Added.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::domIdentifier const): Added.
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::domIdentifier const):Added.
2021-11-12 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Symlink daemons into simulator runtime root
https://bugs.webkit.org/show_bug.cgi?id=233080
<rdar://problem/85362551>
Reviewed by Brady Eidson.
* Scripts/webkitpy/api_tests/manager.py:
(Manager._initialize_devices): Symlink daemons in the WebKit.framework into
simulator runtime root.
* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.symlink):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.symlink):
* Scripts/webkitpy/port/darwin.py:
(DarwinPort.path_to_daemons):
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager.Runtime.__init__): Add root.
(SimulatedDeviceManager._create_device_with_runtime): Pass runtime.
(SimulatedDevice.__init__): Link to runtime.
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
2021-11-12 Darin Adler <darin@apple.com>
Make sort-Xcode-project-file idempotent
https://bugs.webkit.org/show_bug.cgi?id=233077
Reviewed by Wenson Hsieh.
* Scripts/sort-Xcode-project-file:
(sortChildrenByFileName): Fix the "directories first" rule to work in a straightforward
way that is symmetric, and make the rest of the rules fall through when two files are
equal for the same reason. Also remove almost all names from the special list of filenames
to treat as files even though they have no extension. For example, "jsc" is a directory
in WebCore and it's not needed to sort products correctly in JavaScriptCore. And
"minidom" is both a product and a directory.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Sorted.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Ditto.
2021-11-12 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Checkout pull-requests
https://bugs.webkit.org/show_bug.cgi?id=233042
<rdar://problem/85343364>
Reviewed by Dewei Zhu.
In GitHub, pull-requests are somewhat difficult to checkout because they're
attached to a specific user's mirror of WebKit. Automate this process.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init.py__: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): Add username:branch regex.
(Git.checkout): Allow checking out of branches by username:branch.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add `git checkout -B`.
(Git.checkout): `-B` will force checkout a branch, even if one already exists.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub): Embed error message in 404 response.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/checkout.py:
(Checkout.main): Allow direct checkout of pull-request instead of relying
exclusively on branches.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py:
(Clean.main): Add newline.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py:
(TestCheckout.test_no_pr_github):
(TestCheckout.test_no_pr_bitbucket):
(TestCheckout.test_pr_github):
(TestCheckout.test_pr_bitbucket):
2021-11-12 Sihui Liu <sihui_liu@apple.com>
Set default general storage directory to websiteDataDirectory
https://bugs.webkit.org/show_bug.cgi?id=232985
Reviewed by Geoffrey Garen.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
* TestWebKitAPI/Tests/WebKitCocoa/file-system-access.salt: Added.
2021-11-12 Peng Liu <peng.liu6@apple.com>
Promote WKPreferences._fullScreenEnabled to API
https://bugs.webkit.org/show_bug.cgi?id=230784
<rdar://83255308>
Reviewed by Jer Noble.
* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate defaultConfiguration]):
2021-11-12 Chris Dumez <cdumez@apple.com>
Demote WKWebpagePreferences.captivePortalModeEnabled API to SPI
https://bugs.webkit.org/show_bug.cgi?id=233059
Reviewed by Geoffrey Garen.
Update API test accordingly.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-05 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Open closed pull-request when running pr
https://bugs.webkit.org/show_bug.cgi?id=232765
<rdar://problem/85084318>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:
(BitBucket.request): Ensure displayId is set when updating PR.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.request): Make sure that new pull-requests are open.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Open closed pull-requests.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.update): Only set head if user specifies head.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
2021-11-12 Chris Dumez <cdumez@apple.com>
Disable MathML when in Captive Portal Mode
https://bugs.webkit.org/show_bug.cgi?id=233013
<rdar://84567129>
Reviewed by Brent Fulgham.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-12 Chris Dumez <cdumez@apple.com>
WebKit is unable to recover if a WebProcess gets terminated while it is launching
https://bugs.webkit.org/show_bug.cgi?id=233001
<rdar://85302938>
Reviewed by Brent Fulgham.
Add API test coverage, this test was timing out before the fix.
* TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm:
(TEST):
2021-11-12 Chris Dumez <cdumez@apple.com>
Disable getUserMedia() when in Captive Portal Mode
https://bugs.webkit.org/show_bug.cgi?id=233021
Reviewed by Brent Fulgham.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-11 Brent Fulgham <bfulgham@apple.com>
[WebAuthn] Stop serializing BufferSource and Vector<uint8_t> duplicates of identifiers
https://bugs.webkit.org/show_bug.cgi?id=233011
<rdar://problem/85313807>
Reviewed by Chris Dumez.
The original WebAuthn logic converted WebCore::BufferSource objects to Vector<uint8_t>
during serialization, which created a weird design where some code dealt with BufferSource
objects, and other with Vectors, and lots of converting to and from these types. It also caused
WebAuthn data structures to have two places where this information might live, with the
UIProcess using one representation, and the WebContent process using another.
This patch revises the code as follows:
1. The identifiers are always stored as BufferSource, and the same member is used in UIProcess
and WebContent process when accessing this information.
2. We now serialize BufferSource directly.
Tested by existing WebAuthn test cases (API and Layout tests)
* TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:
(TestWebKitAPI::getTestCredentialRawIdBytes):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/U2fCommandConstructorTest.cpp:
(TestWebKitAPI::constructMakeCredentialRequest):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-11-11 Andres Gonzalez <andresg_22@apple.com>
Fix for crash in LayoutTests in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=233014
Reviewed by Chris Fleizach.
This fixes the following tests in isolated tree mode:
accessibility/image-link-inline-cont.html [ Crash ]
accessibility/image-link.html [ Crash ]
accessibility/internal-link-anchors2.html [ Crash ]
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::allAttributes):
Need to retain the pointer returned by
AccessibilityUIElement::descriptionOfValue.
2021-11-11 Chris Dumez <cdumez@apple.com>
REGRESSION: 26 InAppBrowserPrivacy API failures on iOS
https://bugs.webkit.org/show_bug.cgi?id=233016
<rdar://problem/85315536>
Reviewed by Brent Fulgham.
In r285594, I have the browser entitlement to TestWebKit API to make my new API test work
on iOS. However, it turns out that 26 InAppBrowserPrivacy API tests rely on the browser
entitlement not being present. I am therefore reverting this part of my change.
* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-11 Andres Gonzalez <andresg_22@apple.com>
Fix for thread deadlocks during layout tests in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=232999
<rdar://problem/85300861>
Reviewed by Chris Fleizach.
In isolated tree mode, AccessibilityUIElement calls into the AX API are
dispatched to a secondary, mocked thread created by the
AccessibilityController to simulate AT requests off of the main thread.
The main thread, in which all AccessibilityUIElement methods are run,
is blocked to wait for the results from the AX thread, to then continue
execution of JS layout tests.
The deadlocks arise when the AX API call cannot be fulfilled on the
secondary thread and needs to be dispatched to the main thread that is
now blocked. The main thread is waitng for the AccessibilityController's
secondary mocked thread, and that thread is waitng for the main thread
to compute results for the AX API request.
This patch introduces a workaround by spinning the main thread run loop
right after the API calls are dispatched to the AX thread.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::executeOnAXThreadAndWait):
(WTR::AccessibilityController::spinMainRunLoop const):
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
2021-11-11 Rachel Ginsberg <rginsberg@apple.com>
Add support in WebCore for web app manifest icons
https://bugs.webkit.org/show_bug.cgi?id=231339
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:
(ApplicationManifestParserTest::parseIconFirstTopLevelProperty):
Function to create JSON for icon attributes. This is
necessary because icons are in a list, whereas all other
attributes in app manifest are not.
(ApplicationManifestParserTest::parseIconFirstTopLevelPropertyForSrc):
Needed to make a slightly different version to add a src URL, since
it is required for a given icon to be added to the vector.
(ApplicationManifestParserTest::testIconsSrc):
(ApplicationManifestParserTest::testIconsType):
(ApplicationManifestParserTest::testIconsSizes):
(ApplicationManifestParserTest::testIconsPurposes):
Functions for each of the icon attributes.
(TEST_F):
Calls the various icon test functions with different input
2021-11-11 Kimmo Kinnunen <kkinnunen@apple.com>
REGRESSION (iOS 15, GPU Process): Fails to load texture map
https://bugs.webkit.org/show_bug.cgi?id=231471
<rdar://problem/84328146>
Reviewed by Tim Horton.
Add a test that tries to assert that GraphicsContext::drawImageBuffer() does not increase
memory footprint of the process. However, leave the test disabled as currently
it seems that the WTF::memoryFootprint() measurement does not see all the
memory releases the CG does.
* TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp:
(TestWebKitAPI::memoryFootprintChangedBy):
(TestWebKitAPI::imageBufferPixelIs):
(TestWebKitAPI::TEST):
2021-11-11 Jer Noble <jer.noble@apple.com>
Infinite recursion under InjectedBundlePage::exitFullScreenForElement()
https://bugs.webkit.org/show_bug.cgi?id=232948
<rdar://80588375>
Reviewed by Eric Carlson.
When WebCore indicates an error in exiting fullscreen, WebKit will respond by attempting to
close any outstanding fullscreen sessions by calling WebFullScreenManager::close(). If this
occurs in the InjectedBundlePage client during a call into WKBundlePageWillExitFullScreen()
or WKBundlePageWillDidFullScreen(), this call will recurse into
InjectedBundlePage::exitFullScreenForElement(), and cause a stack overflow.
Track the current state of fullscreen on a per-InjectedBundlePage basis, and bail out if
the state has been modified due to recursion.
Add a HashMap to map WKBundlePageRef onto InjectedBundlePages. Use that map to find the
particular InjectedBundlePage being requested to enter fullscreen. Add an enumerated
set of Fullscreen states and a private ivar for tracking that state.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::~InjectedBundlePage):
(WTR::InjectedBundlePage::enterFullScreenForElement):
(WTR::InjectedBundlePage::exitFullScreenForElement):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
2021-11-11 Chris Dumez <cdumez@apple.com>
Turn off various preferences when in captive portal mode
https://bugs.webkit.org/show_bug.cgi?id=232958
<rdar://84622396>
Reviewed by Brent Fulgham.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-11 Philippe Normand <pnormand@igalia.com>
[Flatpak] http server is not properly tear down
https://bugs.webkit.org/show_bug.cgi?id=221554
Reviewed by Adrian Perez de Castro.
In Linux when the layout tests are manually interrupted it might lead to Apache not being
cleanly stopped. On the next run it would then fail to start, usually failing to setup its
'scoreboard' with SHM. The proposed solution is to look for stale SHM segments, eg. segments
allocated but not attached to any process, and remove them, before starting the Apache
process.
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd._remove_stale_shm_segments):
(LayoutTestApacheHttpd._spawn_process):
2021-11-11 Philippe Normand <pnormand@igalia.com>
[GTK][WPE] webkit-flatpak-run-nightly infinite self-call loop
https://bugs.webkit.org/show_bug.cgi?id=230400
Reviewed by Adrian Perez de Castro.
Port the changes landed in r272712 for the webkit-bwrap script, which we can't directly use
within webkit-flatpak-run-nightly because it's nice to keep it as standalone as possible.
* Scripts/webkit-flatpak-run-nightly:
2021-11-10 Chris Dumez <cdumez@apple.com>
We should not kill all WebContent processes whenever the WebAuthn process crashes
https://bugs.webkit.org/show_bug.cgi?id=232970
<rdar://83941760>
Reviewed by Geoff Garen.
Update API test coverage to reflect behavior change.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-11-10 J Pascoe <j_pascoe@apple.com>
[WebAuthn] Unify _WKWebAuthenticationPanel SPI and AuthenticatorCoordinator's ClientDataJson generation
https://bugs.webkit.org/show_bug.cgi?id=232965
<rdar://problem/85268216>
Reviewed by Brent Fulgham.
Update api tests to reflect different clientDataJson format from WebAuthenticationUtils
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-11-10 Tim Nguyen <ntim@apple.com>
Remove non-standard -webkit-border-fit CSS property
https://bugs.webkit.org/show_bug.cgi?id=229564
Reviewed by Simon Fraser.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2021-11-10 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Build WebGPU on our bots
https://bugs.webkit.org/show_bug.cgi?id=232924
Reviewed by Dean Jackson and Alex Christensen.
Simply tell the build script about the existence of WebGPU.
* Scripts/build-webkit:
2021-11-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r285603.
https://bugs.webkit.org/show_bug.cgi?id=232963
broke the watchOS build
Reverted changeset:
"[Cocoa] Build WebGPU on our bots"
https://bugs.webkit.org/show_bug.cgi?id=232924
https://commits.webkit.org/r285603
2021-11-10 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Build WebGPU on our bots
https://bugs.webkit.org/show_bug.cgi?id=232924
Reviewed by Dean Jackson.
Simply tell the build script about the existence of WebGPU.
* Scripts/build-webkit:
2021-11-10 Alex Christensen <achristensen@webkit.org>
Implement serialization and deserialization of redirect and modify headers actions for WKContentRuleList
https://bugs.webkit.org/show_bug.cgi?id=232901
Reviewed by Timothy Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
2021-11-10 Chris Dumez <cdumez@apple.com>
Add basic support for launching CaptivePortalMode WebProcesses
https://bugs.webkit.org/show_bug.cgi?id=232737
<rdar://84473037>
Reviewed by Brent Fulgham.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-11-10 Tyler Wilcock <tyler_w@apple.com>
AX: Make ancestor computation cheaper by setting flags upon child insertion
https://bugs.webkit.org/show_bug.cgi?id=232466
Reviewed by Andres Gonzalez.
This patch adds bit-flags (named AXAncestorFlags) to our accessibility objects,
and sets these flags upon child insertion to enable cheap
determination of whether any object has ancestors of certain types
(e.g. a document role ancestor). Some AX clients need this
information, and WebKit can compute it more efficiently than they can.
The following flags are added in this patch:
- HasDocumentRoleAncestor
- HasWebApplicationAncestor
- IsInDescriptionListDetail
- IsInDescriptionListTerm
- IsInCell
* DumpRenderTree/AccessibilityUIElement.cpp:
(hasDocumentRoleAncestorCallback):
(hasWebApplicationAncestorCallback):
(isInDescriptionListDetailCallback):
(isInDescriptionListTermCallback):
(isInCellCallback):
Added all of the above.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::hasDocumentRoleAncestor const):
(AccessibilityUIElement::hasWebApplicationAncestor const):
(AccessibilityUIElement::isInCell const):
Added all of the above.
(AccessibilityUIElement::isInDescriptionListDetail const): Added.
(AccessibilityUIElement::isInDescriptionListTerm const): Added.
(WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted.
(WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::hasDocumentRoleAncestor const):
(AccessibilityUIElement::hasWebApplicationAncestor const):
(AccessibilityUIElement::isInDescriptionListDetail const):
(AccessibilityUIElement::isInDescriptionListTerm const):
(AccessibilityUIElement::isInCell const):
Added all of the above.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::hasDocumentRoleAncestor const):
(WTR::AccessibilityUIElement::hasWebApplicationAncestor const):
(WTR::AccessibilityUIElement::isInCell const):
Added all of the above.
(WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted.
(WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted.
(WTR::AccessibilityUIElement::isInDescriptionListDetail const): Added.
(WTR::AccessibilityUIElement::isInDescriptionListTerm const): Added.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
Add new attributes hasDocumentRoleAncestor, hasWebApplicationAncestor,
isInDescriptionListDetail, and isInDescriptionListTerm. Change
isInTableCell() to be an attribute named isInCell.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::hasDocumentRoleAncestor const): Added.
(WTR::AccessibilityUIElement::hasWebApplicationAncestor const): Added.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::hasDocumentRoleAncestor const):
(WTR::AccessibilityUIElement::hasWebApplicationAncestor const):
(WTR::AccessibilityUIElement::isInDescriptionListDetail const):
(WTR::AccessibilityUIElement::isInDescriptionListTerm const):
(WTR::AccessibilityUIElement::isInCell const):
Added all of the above.
2021-11-10 Darin Adler <darin@apple.com>
[CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions
https://bugs.webkit.org/show_bug.cgi?id=232220
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST): Removed extra argument to URLWithUserTypedString/Deprecated.
2021-11-10 Philippe Normand <pnormand@igalia.com>
[GLib] apply-build-revision fails when git-svn is not installed
https://bugs.webkit.org/show_bug.cgi?id=232929
Reviewed by Michael Catanzaro.
Attempt to get the build revision from the git log if the git-svn call failed, either
because git-svn is not installed or the metadata in .git/svn is incomplete.
* glib/apply-build-revision-to-files.py:
(get_revision_from_most_recent_git_commit):
(get_build_revision):
2021-11-10 Antti Koivisto <antti@apple.com>
Hasher should be able to hash pointers
https://bugs.webkit.org/show_bug.cgi?id=232927
Reviewed by Kimmo Kinnunen.
* TestWebKitAPI/Tests/WTF/Hasher.cpp:
(TestWebKitAPI::TEST):
2021-11-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r285536.
https://bugs.webkit.org/show_bug.cgi?id=232915
causes API test crashes
Reverted changeset:
"[CF] Reduce duplication and unneeded buffer allocations and
copying in URL code, also remove unused methods and functions"
https://bugs.webkit.org/show_bug.cgi?id=232220
https://commits.webkit.org/r285536
2021-11-09 Alex Christensen <achristensen@webkit.org>
Unify build of TestWebKitAPI/Tests/WebKitCocoa
https://bugs.webkit.org/show_bug.cgi?id=232768
Reviewed by Tim Horton.
I found that the Fullscreen.LayoutConstraints was not being built because FullscreenLayoutConstraints.mm was not being built.
Now that it is being built it times out, so I disabled it.
* TestWebKitAPI/DeprecatedGlobalValues.cpp: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.
(resetGlobalState):
* TestWebKitAPI/DeprecatedGlobalValues.h: Copied from Tools/TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp.
* TestWebKitAPI/DeprecatedGlobalValues.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.
* TestWebKitAPI/Scripts/generate-unified-sources.sh:
* TestWebKitAPI/Sources.txt:
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm:
* TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLs.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm:
* TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm:
(-[TestAsyncNavigationDelegate webView:didFinishNavigation:]):
(-[TestAsyncNavigationDelegate webView:didFailNavigation:withError:]):
(-[TestAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
* TestWebKitAPI/Tests/WebKitCocoa/BundleParameters.mm:
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(-[ChallengeDelegate webView:didFinishNavigation:]):
(-[ClientCertificateDelegate webView:didFinishNavigation:]):
(-[ProposedCredentialDelegate webView:didFinishNavigation:]):
(-[ServerTrustDelegate webView:didFailProvisionalNavigation:withError:]):
(-[ServerTrustDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
(WebKit2_CommandBackForwardTestWKView::SetUp):
(WebKit2_CommandBackForwardTestWKView::loadFiles):
(TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
(-[TestContextMenuUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuAPIBeforeSPIUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuImageUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]):
(-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm:
* TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
(createWebViewWithCustomPasteboardDataEnabled): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
(createWebViewWithCustomPasteboardDataEnabled): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm:
* TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
(-[DecidePolicyForNavigationActionController webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm:
* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
* TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm:
(-[DuplicateCompletionHandlerCallsDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm:
* TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
* TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IDBObjectStoreInfoUpgradeToV2.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
(-[IPCTestingAPIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
(-[DatabaseProcessKillMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBInPageCache.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBUserDelete.mm:
* TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm:
(-[JSNavigationDelegate webView:didFinishNavigation:]):
* TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
(-[LoadAlternateHTMLStringFromProvisionalLoadErrorController webView:didStartProvisionalNavigation:]):
* TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStorageNullEntries.mm:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
(-[LocalStorageNavigationDelegate webView:didFinishNavigation:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/LocalStorageQuirkTest.mm:
* TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm:
* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(-[BroadcastChannelMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm:
* TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm:
* TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:
* TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:
(emptyReleaseInfoCallback):
* TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:
(createWebViewWithCustomPasteboardDataEnabled): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(createWebViewWithCustomPasteboardDataEnabled): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.
* TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm.
(createWebViewWithCustomPasteboardDataEnabled):
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
* TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[PSONNavigationDelegate webView:didStartProvisionalNavigation:]):
(-[PSONNavigationDelegate webView:didCommitNavigation:]):
(-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
* TestWebKitAPI/Tests/WebKitCocoa/ProvisionalURLNotChange.mm:
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(-[ProxyDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
* TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
(-[QuickLookDelegate navigationError]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/RequiresUserActionForPlayback.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm:
* TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm:
(-[RunOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(-[SafeBrowsingNavigationDelegate webView:didCommitNavigation:]):
(-[WKWebViewGoBackNavigationDelegate webView:didFinishNavigation:]):
* TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(-[TestSWAsyncNavigationDelegate webView:didFinishNavigation:]):
(-[TestSWAsyncNavigationDelegate webView:didFailNavigation:withError:]):
(-[TestSWAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
* TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm:
(-[ShouldOpenExternalURLsInNewWindowActionsController webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:
(-[SpeechRecognitionNavigationDelegate webView:didFinishNavigation:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
* TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm:
* TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm:
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[UITestDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[ModalDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
* TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm:
(-[UploadDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
* TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm:
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:
(resetInspectorGlobalState):
(-[UIDelegateForTesting _webView:configurationForLocalInspector:]):
(TEST):
(resetGlobalState): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:
(resetGlobalState): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:
(resetGlobalState): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm:
(resetGlobalState): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:
(-[NavigationResponseTestDelegate webView:didFinishNavigation:]):
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
(-[RedirectSchemeHandler webView:didReceiveServerRedirectForProvisionalNavigation:]):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
(-[BasicNavigationDelegateWithoutCrashHandler webView:didStartProvisionalNavigation:]):
* TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebSQLBasics.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[PopUpPoliciesDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
* TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
* TestWebKitAPI/Tests/WebKitLegacy/ios/DateTimeInputsAccessoryViewTests.mm:
* TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm:
* TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:
* TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLPrepareDisplayOnWebThread.mm:
* TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:
* TestWebKitAPI/Tests/WebKitLegacy/mac/ClosingWebView.mm:
* TestWebKitAPI/Tests/WebKitLegacy/mac/DeallocWebViewInEventListener.mm:
* TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm:
* TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm:
* TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
(-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):
* TestWebKitAPI/Tests/mac/ContentFiltering.mm:
2021-11-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r285246.
https://bugs.webkit.org/show_bug.cgi?id=232907
Broke FixedVector
Reverted changeset:
"[JSC] Clean up StructureStubInfo initialization"
https://bugs.webkit.org/show_bug.cgi?id=232652
https://commits.webkit.org/r285246
2021-10-28 Darin Adler <darin@apple.com>
[CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions
https://bugs.webkit.org/show_bug.cgi?id=232220
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST): Removed extra argument to URLWithUserTypedString/Deprecated.
2021-11-09 Myles C. Maxfield <mmaxfield@apple.com>
[WebGPU] Stub out methods in WebGPU.framework
https://bugs.webkit.org/show_bug.cgi?id=232872
Reviewed by Dean Jackson.
* Scripts/webkitpy/style/checker.py:
2021-11-09 Stephan Szabo <stephan.szabo@sony.com>
[Windows] Non-find based status file finding in run-jsc-stress-tests needs to release status files
https://bugs.webkit.org/show_bug.cgi?id=232851
Reviewed by Don Olmstead.
Change the reading of status files in the non-find search
to properly scope the file access to release the status
files.
* Scripts/run-jsc-stress-tests:
2021-11-09 Chris Dumez <cdumez@apple.com>
New spec: Block external protocol handler in sandboxed frames
https://bugs.webkit.org/show_bug.cgi?id=231727
<rdar://problem/84498192>
Reviewed by Brent Fulgham.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(TEST):
2021-11-09 Carlos Alberto Lopez Perez <clopez@igalia.com>
[EWS] Allow the optimization of running only the subset of failed tests on run-layout-tests-without-patch also for patches modifying the TestExpectations files
https://bugs.webkit.org/show_bug.cgi?id=231265
Reviewed by Alexey Proskuryakov.
On r274475 an optimization was applied to run-layout-tests-without-patch to only
run the subset of tests that failed with patch instead of the whole layout tests.
But this optimization had a corner case where it couldn't be applied.
It seems that we can still apply this optimization in this corner case if we pass
'--skipped=always' to run-webkit-tests so that Skipped tests are not run even if
those are specified as arguments on the command-line.
* CISupport/ews-build/steps.py:
(RunWebKitTests.setLayoutTestCommand):
(RunWebKitTestsWithoutPatch.setLayoutTestCommand):
* CISupport/ews-build/steps_unittest.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_ews_corner_case_failing_test):
(RunTest):
(RunTest.test_ews_corner_case_failing_directory):
(RunTest.test_ews_corner_case_skipped_test):
(RunTest.test_ews_corner_case_skipped_directory):
* Scripts/webkitpy/port/test.py:
2021-11-08 Myles C. Maxfield <mmaxfield@apple.com>
Make WebGPU.xcodeproj and WebGPU.framework
https://bugs.webkit.org/show_bug.cgi?id=231661
Reviewed by Dean Jackson and Robin Morisset.
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checkers/sdkvariant.py:
2021-11-08 J Pascoe <j_pascoe@apple.com>
[WebAuthn] challenge does not get passed to -[_WKWebAuthenticationPanel getAssertionWithChallenge:origin:options:completionHandler:]
https://bugs.webkit.org/show_bug.cgi?id=232836
rdar://85163927
Reviewed by Brent Fulgham.
-[_WKWebAuthenticationPanel getAssertionWithChallenge:origin:options:completionHandler:] receives
an empty challenge, causing _WKWebAuthenticationPanel to immediately close when using the new UNIFIED_ASC_AUTH_UI.
This change encodes/decodes challenge in PublicKeyCredentialRequestOptions. Before this
field was not used after xpc, but with the new UNIFIED_ASC_AUTH_UI it is.
This change also adds an empty value for tests.
* TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:
(TestWebKitAPI::TEST):
2021-11-08 Alex Christensen <achristensen@webkit.org>
Parse redirect and modify-headers actions for WKContentRuleList
https://bugs.webkit.org/show_bug.cgi?id=232838
Reviewed by Tim Hatcher.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
2021-11-08 Devin Rousso <drousso@apple.com>
webView.scrollView.indicatorStyle does not work on iOS 15
https://bugs.webkit.org/show_bug.cgi?id=232295
<rdar://problem/82816423>
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/ios/WKScrollViewTests.mm:
(TEST.WKScrollViewTests.IndicatorStyleSetByClient): Added.
(TEST.WKScrollViewTests.BackgroundColorSetByClient): Added.
2021-11-08 Manuel Rego Casasnovas <rego@igalia.com>
WPT test importer imports rel="mismatch" as the reference
https://bugs.webkit.org/show_bug.cgi?id=207175
<rdar://problem/69332102>
Reviewed by Jonathan Bedard.
Setting "-expected-mismatch" suffix for <meta rel="mismatch"> references from WPT.
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.find_importable_tests): Adding "-mismatch" suffix as needed.
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test): Store the reference type in test_info["type"].
* Scripts/webkitpy/w3c/test_parser_unittest.py:
(test_analyze_test_reftest_one_mismatch): Add new test cases for the reference type.
2021-11-08 Kate Cheney <katherine_cheney@apple.com>
[ iOS15 EWS ] TestWebKitAPI.AppPrivacyReport.LoadSimulatedRequest tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=232166
<rdar://problem/84560948>
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-11-07 Simon Fraser <simon.fraser@apple.com>
Fix the CGEvent types used for wheel event generation from streams
https://bugs.webkit.org/show_bug.cgi?id=232805
Reviewed by Sam Weinig.
The set of enum values for wheel event types are confusing, and I used the wrong ones in
r285390, so fix that. Values are all the same other than kCGMomentumScrollPhaseEnd which is
now correct.
Also relax parsing of event steam JSON to allow "continue" for momentumPhase; this is the
name of the CG-level enum, but AppKit calls this "changed". This will ease conversion from
eventSender in tests.
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::cgScrollPhaseFromPhase):
(WTR::cgMomentumPhaseFromPhase):
(WTR::EventSenderProxy::sendWheelEvent):
(WTR::cgGesturePhaseFromString): Deleted.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::eventPhaseFromString):
(WTR::UIScriptControllerMac::sendEventStream):
2021-11-08 Andres Gonzalez <andresg_22@apple.com>
WTR::AccessibilityController::focusedElement() cannot get the focused object via WKAccessibilityFocusedObject in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=232756
<rdar://problem/85069882>
Reviewed by Chris Fleizach.
WTR::AccessibilityController::focusedElement() was getting the focused
object from WKAccessibilityFocusedObject, which has to run on the main
thread. WKAccessibilityFocusedObject was in turn calling AXObjectCache::
focusedUIElementForPage that tried to return the isolated focused
object. The problem with this is that the isolated focused object can
only be retrieved on the secondary thread.
The solution in this patch is to retrieve the focused object from the
root object as an AT client would do.
Added AccessibilityUIElement::focusedElement in order to retrieve the
focused object from the root object.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::focusedElement):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::focusedElement const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::focusedElement const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::focusedElement const):
2021-11-07 Simon Fraser <simon.fraser@apple.com>
Implement UIScriptController.sendEventStream() on macOS for wheel events
https://bugs.webkit.org/show_bug.cgi?id=232794
Reviewed by Tim Horton.
eventSender.mouseScrollByWithWheelAndMomentumPhases() is problematic for timing-sensitive
scrolling behaviors because the timestamps used are not under script control. It's also
a rather unwieldy API.
To make wheel event testing easier, implement enough of UIScriptController.sendEventStream()
on macOS that it can generate a series of wheel events with predicable timestamps
(currently hardcoded to be 16.6ms apart).
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::cgScrollPhaseFromPhase):
(WTR::cgGesturePhaseFromString):
(WTR::EventSenderProxy::sendWheelEvent):
* WebKitTestRunner/mac/UIScriptControllerMac.h:
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::eventPhaseFromString):
(WTR::UIScriptControllerMac::sendEventStream):
2021-11-06 David Kilzer <ddkilzer@apple.com>
Remove empty directories from from svn.webkit.org repository as of r285357
<https://webkit.org/b/232773>
Unreviewed clean up.
* WebKitTestRunner/WebKitTestRunnerApp/en.lproj: Removed.
2021-11-06 Tyler Wilcock <tyler_w@apple.com>
AX: Rename usages DefinitionList to DescriptionList and DescriptionListDefinition to DescriptionListDetail
https://bugs.webkit.org/show_bug.cgi?id=232775
Reviewed by Chris Fleizach.
Rename usages of "definition list" to "description list" and
DescriptionListDefinition to DescriptionListDetail, as the latter
versions of each pair are what the corresponding HTML elements are
actually called.
https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element
https://html.spec.whatwg.org/multipage/grouping-content.html#the-dd-element
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isInDescriptionListDetail const): Added.
(WTR::AccessibilityUIElement::isInDescriptionListTerm const): Added.
(WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted.
(WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
Rename isInDefinitionListDefinition to isInDescriptionListDetail and
isInDefinitionListTerm to isInDescriptionListTerm.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::isInDescriptionListDetail const): Added.
(WTR::AccessibilityUIElement::isInDescriptionListTerm const): Added.
(WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted.
(WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted.
2021-11-05 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Mail compose becomes unresponsive after pasting in text and attempting to type
https://bugs.webkit.org/show_bug.cgi?id=232764
rdar://84669661
Reviewed by Geoff Garen.
Add an API test that exercises the hang (and also verifies that we don't hit any debug assertions in the
process).
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/InsertTextAlternatives.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/simple-editor.html: Added.
* TestWebKitAPI/ios/UIKitSPI.h:
Drive-by fixes: remove some old staging declarations for UIKit SPI that has long been in the internal iOS 15
SDK. Remove the staging categories and definitions, and move them to the non-internal SDK section instead.
2021-11-05 Ryan Haddad <ryanhaddad@apple.com>
[steps.py] Update macOS versions in build_to_name_mapping
https://bugs.webkit.org/show_bug.cgi?id=232732
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(PrintConfiguration.convert_build_to_os_name):
* CISupport/ews-build/steps_unittest.py:
* CISupport/build-webkit-org/steps.py:
(PrintConfiguration.convert_build_to_os_name):
* CISupport/build-webkit-org/steps_unittest.py:
2021-11-05 Lauro Moura <lmoura@igalia.com>
[Flatpak SDK] Print SDK version after update
https://bugs.webkit.org/show_bug.cgi?id=232725
Reviewed by Adrian Perez de Castro.
Print the actual installed version after the update step, even if
nothing was updated. This should help tracking the SDK versions across
builds on the bots.
* flatpak/flatpakutils.py:
(WebkitFlatpak.main):
2021-11-05 Ryan Haddad <ryanhaddad@apple.com>
Bring up queues for Monterey
https://bugs.webkit.org/show_bug.cgi?id=232186
Unreviewed follow-up fix.
* CISupport/build-webkit-org/config.json: Should have used bot185, not bot186.
2021-11-05 Alex Christensen <achristensen@webkit.org>
Restructure WKContentRuleList Action storage during compilation and interpretation
https://bugs.webkit.org/show_bug.cgi?id=232692
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testRequest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::actionsEqual):
(WebCore::ContentExtensions::operator<<): Deleted.
2021-11-05 Tim Horton <timothy_horton@apple.com>
generate-xcfilelists doesn't work if build path contains a `+`
https://bugs.webkit.org/show_bug.cgi?id=232493
Reviewed by Simon Fraser.
* Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
(BaseGenerator._generate_derived):
(BaseGenerator._replaceSinglePrefix):
(BaseGenerator._replacePrefix):
(BaseGenerator._unexpand._try_unexpand):
(BaseGenerator._replace): Deleted.
The xcfilelist generator had a regex injection issue that resulted in
paths with not-very-special characters causing it to infinitely
regenerate the xcfilelists; we can just use simple string prefix
replacement instead.
2021-11-05 Devin Rousso <drousso@apple.com>
[css-values-4] viewport units should be floats
https://bugs.webkit.org/show_bug.cgi?id=231644
<rdar://problem/84172685>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm:
(evaluateForNumber):
(getElementHeight):
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):
* TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm:
(TEST.WebKit.ViewportSizeForViewportUnits):
2021-11-05 Jonathan Bedard <jbedard@apple.com>
[ic-stats.py] Change shebang to Python 3
https://bugs.webkit.org/show_bug.cgi?id=232721
<rdar://problem/85030782>
Reviewed by Alexey Proskuryakov.
* Scripts/ic-stats.py:
2021-11-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Embedded objects are not correctly handled by text interface with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232622
Reviewed by Andres Gonzalez.
Add a test case to check handling of embedded objects by text interface.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testTextReplacedObjects):
(beforeAll):
2021-11-03 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add land command
https://bugs.webkit.org/show_bug.cgi?id=231821
<rdar://problem/84309339>
Reviewed by Dewei Zhu.
* Scripts/git-webkit: WebKit still uses Svn as it's canonical source of truth.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git._to_git_ref): Convert identifiers or revisions to git refs.
(Git.checkout): Use shared _to_git_ref function.
(Git.rebase): Support rebasing identifiers.
(Git.pull): Generalize computation of the gmtoffset.
(Git.diff_lines): Output diff between two refs.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add branch, push and diff commands.
(Git.filter_branch): Support sed.
(Git.pull): Mock `git pull`
(Git.move_branch): Mock `git rebase`.
(Git.push): Mock `git push`.
(Git.reset): Mock `git reset HEAD~#`.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Add land command.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py: Added.
(Land.parser):
(Land.main): Rebase the current branch against it's root, assign the reviewer, check for 'oops' messages,
rebase against target branch, update target branch ref, optionally canonicalize, push (or svn dcommit) and
update and close pull-request with information on the landed commit.
* Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:
(ScmBase.gmtoffset): Add shared computation of GMT offset.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_commits): `git log` should exclude base ref.
(TestGit.test_commits_branch): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py: Added.
(repository):
(TestLand):
(TestLandGitHub):
(TestLandBitBucket):
2021-11-04 Jonathan Bedard <jbedard@apple.com>
[generate-webkit-css-docs] Change shebang to Python 3
https://bugs.webkit.org/show_bug.cgi?id=232714
<rdar://problem/85019719>
Reviewed by Ryan Haddad.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/generate-webkit-css-docs: Use Python 3 shebang.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.
2021-11-04 Jonathan Bedard <jbedard@apple.com>
[run-webkit-websocketserver] Replace `/usr/bin/python` with `/usr/bin/env python`
https://bugs.webkit.org/show_bug.cgi?id=232713
<rdar://problem/85019074>
Reviewed by Ryan Haddad.
* Scripts/run-webkit-websocketserver:
(openWebSocketServer):
(closeWebSocketServer):
2021-11-04 Andres Gonzalez <andresg_22@apple.com>
Fix for crashes in layout tests in AX isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=232680
<rdar://problem/84987971>
Reviewed by Chris Fleizach.
Changed the return value of WTR::AccessibilityUIElement::attributeValue
to be a RetainPtr<id> instead of id. This guaranties that the ObjC
object pointed by it is not freed when the value is computed on the AX
thread and utilized on the main thread.
The following tests were crashing before and now pass:
accessibility/mac/internal-link-when-document-has-fragment.html
accessibility/svg-remote-element.html
accessibility/url-test.html
accessibility/video-element-url-attribute.html
The following tests were failing before and now pass:
accessibility/add-children-pseudo-element.html
accessibility/aria-selected.html
accessibility/aria-table-with-presentational-elements.html
accessibility/mac/aria-columnrowheaders.html
accessibility/mac/aria-details.html
accessibility/mac/children-in-navigation-order-returns-children.html
accessibility/mac/descriptionlist-not-ignored.html
accessibility/mac/id-class-attributes.html
accessibility/mac/landmark-not-ignored.html
accessibility/mac/line-index-for-textmarker.html
accessibility/mac/table-visible-rows.html
accessibility/mac/treeitem-row-delegation.html
accessibility/math-has-non-presentational-children.html
accessibility/math-multiscript-attributes.html
accessibility/radio-button-group-members.html
accessibility/table-column-headers-with-captions.html
accessibility/table-header-calculation-for-header-rows.html
accessibility/table-roles-hierarchy.html
accessibility/treeitem-child-exposed.html
The following tests were timing out and now pass:
accessibility/aria-combobox-control-owns-elements.html
accessibility/loading-iframe-sends-notification.html
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::attributeValue):
(WTR::AccessibilityUIElement::descriptionOfValue const):
(WTR::AccessibilityUIElement::attributeValue const):
(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::getLinkedUIElements):
(WTR::AccessibilityUIElement::getDocumentLinks):
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const):
(WTR::AccessibilityUIElement::children const):
(WTR::AccessibilityUIElement::getChildren):
(WTR::AccessibilityUIElement::rowHeaders const):
(WTR::AccessibilityUIElement::columnHeaders const):
(WTR::AccessibilityUIElement::elementForAttribute const):
(WTR::AccessibilityUIElement::elementForAttributeAtIndex const):
(WTR::AccessibilityUIElement::detailsElements const):
(WTR::AccessibilityUIElement::errorMessageElements const):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::AccessibilityUIElement::uiElementAttributeValue const):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::y):
(WTR::AccessibilityUIElement::width):
(WTR::AccessibilityUIElement::height):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::lineRectsAndText const):
(WTR::AccessibilityUIElement::intValue const):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::insertionPointLineNumber):
(WTR::AccessibilityUIElement::isEnabled):
(WTR::AccessibilityUIElement::isRequired const):
(WTR::AccessibilityUIElement::isFocused const):
(WTR::AccessibilityUIElement::isSelected const):
(WTR::AccessibilityUIElement::isIndeterminate const):
(WTR::AccessibilityUIElement::isExpanded const):
(WTR::AccessibilityUIElement::currentStateValue const):
(WTR::AccessibilityUIElement::sortDirection const):
(WTR::AccessibilityUIElement::hierarchicalLevel const):
(WTR::AccessibilityUIElement::classList const):
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::ariaDropEffects const):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfColumns):
(WTR::AccessibilityUIElement::attributesOfRows):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::indexInTable):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::horizontalScrollbar const):
(WTR::AccessibilityUIElement::verticalScrollbar const):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const):
(WTR::AccessibilityUIElement::removeSelectionAtIndex const):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::isMultiSelectable const):
(WTR::AccessibilityUIElement::isOnScreen const):
(WTR::AccessibilityUIElement::embeddedImageDescription const):
(WTR::AccessibilityUIElement::imageOverlayElements const):
(WTR::AccessibilityUIElement::hasPopup const):
(WTR::AccessibilityUIElement::popupValue const):
(WTR::AccessibilityUIElement::selectedTextMarkerRange):
(WTR::AccessibilityUIElement::resetSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::mathPostscriptsDescription const):
(WTR::AccessibilityUIElement::mathPrescriptsDescription const):
(WTR::AccessibilityUIElement::mathRootRadicand const):
(WTR::AccessibilityUIElement::pathDescription const):
2021-11-03 Alex Christensen <achristensen@webkit.org>
Remove QuickTimePluginReplacement and YouTubePluginReplacement
https://bugs.webkit.org/show_bug.cgi?id=232400
Reviewed by Chris Dumez.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: Removed.
2021-11-03 Yousuke Kimoto <Yousuke.Kimoto@sony.com>
Use 0.0.0.0 when "--all-interfaces" is given for websocket_server
https://bugs.webkit.org/show_bug.cgi?id=231798
<rdar://problem/84540538>
Reviewed by Jonathan Bedard.
When run-webkit-tests runs with "--all-interfaces", servers running
on the host PC should use "0.0.0.0". It will help situations where
host and target systems are discrete so that test programs can
connect to test servers on the host PC.
* Scripts/webkitpy/layout_tests/servers/websocket_server.py:
(PyWebSocket.__init__): Fixed a style check error.
(PyWebSocket._prepare_config): Added "0.0.0.0" for --all-interfaces.
2021-11-03 Yusuke Suzuki <ysuzuki@apple.com>
[JSC] Clean up StructureStubInfo initialization
https://bugs.webkit.org/show_bug.cgi?id=232652
Reviewed by Saam Barati.
* TestWebKitAPI/Tests/WTF/FixedVector.cpp:
(TestWebKitAPI::TEST):
2021-11-03 Alex Christensen <achristensen@webkit.org>
[ iOS Debug ] TestWebKitAPI.ResourceLoadStatistics.GrandfatherCallback is failing
https://bugs.webkit.org/show_bug.cgi?id=232675
Reviewed by Kate Cheney.
Clearing website data attempts a connection with the daemon.
For now, just tell it not to connect to the daemon.
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):
2021-11-03 Chris Dumez <cdumez@apple.com>
_pasteboardWithName should be thread-safe
https://bugs.webkit.org/show_bug.cgi?id=232670
Reviewed by Tim Horton.
_pasteboardWithName should be thread-safe, to match [NSPasteboard _pasteboardWithName].
This was leading to flaky crashes in _pasteboardWithName getting called off the main
thread from ShareKit code.
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(+[DumpRenderTreePasteboard _pasteboardWithName:]):
(+[DumpRenderTreePasteboard releaseLocalPasteboards]):
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(+[WebKitTestRunnerPasteboard _pasteboardWithName:]):
(+[WebKitTestRunnerPasteboard releaseLocalPasteboards]):
2021-11-03 Ryan Haddad <ryanhaddad@apple.com>
[EWS] Add more bots to iOS layout and API test queues
https://bugs.webkit.org/show_bug.cgi?id=232678
Reviewed by Aakash Jain.
* CISupport/ews-build/config.json:
2021-11-03 Simon Fraser <simon.fraser@apple.com>
Expose fuzzy match data in layout test results
https://bugs.webkit.org/show_bug.cgi?id=232523
Reviewed by Jonathan Bedard.
For a failing ref (or image) test, include the fuzzy matching data in full_results.json
in the form "image_difference": { "max_difference": 13, "total_pixels": 167 }, and
show that in the image comparison page that's written out for each test result.
Fix some tests that relied on JSON property serialization ordering (we don't serialize
with `sort_keys=True`).
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._save_json_files):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.write_image_diff_files):
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGenerator.generate_times_ms_file):
* Scripts/webkitpy/layout_tests/models/test_failures.py:
(FailureImageHashMismatch.formatted_diff_percent):
(FailureImageHashMismatch):
(FailureImageHashMismatch.formatted_fuzzy_data):
(FailureImageHashMismatch.write_failure):
(FailureReftestMismatch.message):
(FailureReftestMismatch.formatted_diff_percent):
(FailureReftestMismatch):
(FailureReftestMismatch.formatted_fuzzy_data):
(FailureReftestMismatch.write_failure):
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(_interpret_test_failures):
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(InterpretTestFailuresTest.test_interpret_test_failures):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_retrying_force_pixel_tests):
2021-11-03 Kate Cheney <katherine_cheney@apple.com>
[iOS] Need API for marking file requests as non-app-initiated
https://bugs.webkit.org/show_bug.cgi?id=232506
<rdar://problem/84824703>
Reviewed by Brent Fulgham.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
* TestWebKitAPI/Tests/WebKitCocoa/file-with-iframe.html: Added.
2021-11-03 Brady Eidson <beidson@apple.com>
Fix iOS API tests after r285199
https://bugs.webkit.org/show_bug.cgi?id=232649
Unreviewed.
* TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: Definitely not ready for these tests to start running.
2021-11-02 Tim Horton <timothy_horton@apple.com>
UnicodeDecodeError in write_reftest copying a non-UTF8 expected result file
https://bugs.webkit.org/show_bug.cgi?id=232643
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.write_reftest):
If a reftest's -expected.html file is not valid UTF-8, and the test fails,
when we copy the expected file from the layout tests directory to the
test results directory, we attempt to parse it as UTF-8, resulting in
an exception being thrown.
Instead of needlessly reading in the file as a string and immediately
writing it back out, just copy the file...
I'm not sure there are any not-valid-UTF-8 *ref* tests in the tree, but
there is at least one not-valid-UTF-8 *text* test, which can be run
as a ref-test in some scenarios (see r285132), in which case this problem
occurs: fast/css/line-height-determined-by-primary-font.html.
Also, explicitly ensure the output directory exists before copying
to avoid regressing r122505. Previously this was done inside _write_text_file.
2021-11-02 Per Arne <pvollan@apple.com>
REGRESSION (r268421): TestWebKitAPI.WebKit.PreferenceChanges* tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=221848
<rdar://problem/70966379>
Reviewed by Brent Fulgham.
After r268421, the preferences are set asynchronously in the WebContent process, which introduced this flakiness.
This patch addresses this by modifying the flaky tests to loop until the preference value is equal to the expected
value.
* TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:
(TEST):
2021-11-02 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Reduce autoinstalls on import
https://bugs.webkit.org/show_bug.cgi?id=232574
<rdar://problem/84894275>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Remove whichcraft (webkitcorepy registers it).
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: Remove unused webkitscmpy imports.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py: Remote unused webkitcorepy import.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py: Move whichcraft to function.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: Move jinja2 to function.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py: Move fasteners, xmltodict import to functions.
2021-11-02 Kate Cheney <katherine_cheney@apple.com>
PCM: Safari on iOS and macOS are not sending ad click attribution reports for Private Click Measurement
https://bugs.webkit.org/show_bug.cgi?id=228104
<rdar://problem/80991209>
Reviewed by John Wilander.
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
2021-11-02 Tim Horton <timothy_horton@apple.com>
dumpAsText() tests don't get the ref-test treatment when using --self-compare-with-header
https://bugs.webkit.org/show_bug.cgi?id=232611
Reviewed by Jonathan Bedard.
One oversight in r285132: a test can disable pixel dumping by calling
dumpAsText(). This causes --self-compare-with-header to fall over because
it expects every test to have pixel results (and that is the whole point).
Add an un-overrideable `--force-dump-pixels` TestCommand argument,
and adopt it for self-comparison tests.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._run_self_comparison_test):
* Scripts/webkitpy/port/driver.py:
(DriverInput.__init__):
(DriverInput.__repr__):
(Driver._command_from_driver_input):
* TestRunnerShared/TestCommand.cpp:
(WTR::parseInputLine):
* TestRunnerShared/TestCommand.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::runTest):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h:
2021-11-02 Kate Cheney <katherine_cheney@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=232593
Remove isAppInitiated from _WKSessionState
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-11-02 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Generalize pull-request title generation.
https://bugs.webkit.org/show_bug.cgi?id=232463
<rdar://problem/84784354>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.title_for): Compute pull-request title for a set of commits.
(PullRequest.main): Generalize pull-request title generation.
2021-11-02 Zixing Liu <liushuyu011@gmail.com>
[GTK][WPE] Support setting status code and getting HTTP method in custom URI scheme handlers
https://bugs.webkit.org/show_bug.cgi?id=231880
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testWebContextURIScheme): Added tests to test new public APIs for WebKitGtk
2021-11-01 Fujii Hironori <Hironori.Fujii@sony.com>
ImageDiff.cpp(74): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t'
https://bugs.webkit.org/show_bug.cgi?id=232596
Reviewed by Don Olmstead.
Since r284764, MSVC reports the following warning and a suggestion.
> Tools\ImageDiff\ImageDiff.cpp(74): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t'
> Tools\ImageDiff\ImageDiff.cpp(74): note: consider using '%zu' in the format string
* ImageDiff/ImageDiff.cpp:
(processImages): Use %zu for size_t.
2021-11-01 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Only respect the latest review
https://bugs.webkit.org/show_bug.cgi?id=231987
<rdar://problem/84434991>
Reviewed by Dewei Zhu.
GitHub will report the entire history of a review, we should only
respect the latest review state.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.reviewers):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestNetworkPullRequestGitHub.test_approved_edits):
2021-11-01 Sam Sneddon <gsnedders@apple.com>
Improve LayoutTestFinder test coverage
https://bugs.webkit.org/show_bug.cgi?id=232576
Reviewed by Jonathan Bedard.
Some of these are largely copied from layout_tests/run_webkit_tests_integrationtest.py, but
in unit test form for the test finder.
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:
(LayoutTestFinderTests.__init__):
(LayoutTestFinderTests):
(LayoutTestFinderTests.setUp):
(LayoutTestFinderTests.tearDown):
(LayoutTestFinderTests.test_find_no_paths_specified):
(LayoutTestFinderTests.test_find_no_paths_sorted):
(LayoutTestFinderTests.test_find_all_no_paths):
(LayoutTestFinderTests.test_includes_other_platforms):
(LayoutTestFinderTests.test_find_one_test):
(LayoutTestFinderTests.test_find_platform):
(LayoutTestFinderTests.test_find_platform_self):
(LayoutTestFinderTests.test_find_platform_other):
(LayoutTestFinderTests.test_find_platform_specific):
(LayoutTestFinderTests.test_find_platform_specific_directory):
(LayoutTestFinderTests.test_find_directory_includes_platform_specific):
(LayoutTestFinderTests.test_find_glob):
(LayoutTestFinderTests.test_find_glob_mixed_file_type_sorted):
(LayoutTestFinderTests.test_find_glob_directory):
(LayoutTestFinderTests.test_find_glob_directory_b):
(LayoutTestFinderTests.test_find_glob_directory_e):
(LayoutTestFinderTests.test_find_directory):
(LayoutTestFinderTests.test_find_directory_trailing_slash):
(LayoutTestFinderTests.test_find_directory_star):
(LayoutTestFinderTests.test_preserves_order):
(LayoutTestFinderTests.test_preserves_order_multiple_times):
(LayoutTestFinderTests.test_preserves_order_directories):
(LayoutTestFinderTests.test_preserves_order_mixed_file_type):
(LayoutTestFinderTests.test_preserves_order_mixed_file_type_b):
(LayoutTestFinderTests.test_find_directory_multiple_times):
(LayoutTestFinderTests.test_no_reference):
(LayoutTestFinderTests.test_glob_no_references):
(LayoutTestFinderTests.test_find_with_skipped_directories):
(LayoutTestFinderTests.test_find_with_skipped_directories_2):
(LayoutTestFinderTests.test_is_test_file):
(LayoutTestFinderTests.test_is_w3c_resource_file):
(LayoutTestFinderTests.make_finder): Deleted.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.setUp): Re-enable tests on Python 3, as this now works
(RunTest.test_child_processes_min): Also ignore tests in platform/
* Scripts/webkitpy/port/test.py:
2021-11-01 Tim Horton <timothy_horton@apple.com>
Add a run-webkit-tests mode to A/B test a given feature
https://bugs.webkit.org/show_bug.cgi?id=232553
Reviewed by Jonathan Bedard.
Add the argument --self-compare-with-header to run-webkit-tests, which
can be used to test the impact of a given feature (or set of features;
it accepts the standard test features header format).
When tests are run in this mode, all tests are run in the ref-test
style, but with the `expected` and `actual` results loading the same
test file (ignoring the usual -expected.html or whatever); they differ
only in the set of features/preferences enabled.
This is especially useful for testing the impact of e.g. platform
graphics features, where the difference between the shipping behavior
and in-development behavior is more interesting than whether or not
it actually makes the tests, as written, fail.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner):
(SingleTestRunner._run_comparison_test):
Add the comparison test runner, and prefer it if requested.
One note here: the run with the options derived from the given header is
considered the "actual" result and the default configuration the "expected".
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/driver.py:
(DriverInput.__init__):
(DriverInput.__repr__):
(Driver._command_from_driver_input):
Pass the comparison test header along to the test runner.
Also, fix a longstanding error where --dump-jsconsolelog-in-stderr
could get inserted immediately after --pixel-test, causing the test runner
to consume it as the expected image hash! And leave a comment so nobody
else has to debug this again...
* TestRunnerShared/TestCommand.cpp:
(WTR::parseInputLine):
* TestRunnerShared/TestCommand.h:
* TestRunnerShared/TestFeatures.cpp:
(WTR::parseTestHeaderString):
(WTR::parseTestHeader):
(WTR::featureDefaultsFromComparisonTestHeader):
Factor out the parsing of the part of the test header inside the [ ],
since we use this format for the value of --self-compare-with-header as well.
* TestRunnerShared/TestFeatures.h:
* WebKitTestRunner/Options.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::testOptionsForTest const):
Merge the comparison header's options in to the test options before
the test's own header, so that the comparison header wins.
2021-11-01 Jonathan Bedard <jbedard@apple.com>
webkitpy: Remove obsolete port name
https://bugs.webkit.org/show_bug.cgi?id=169302
<rdar://problem/30953024>
Reviewed by Alex Christensen.
Removing a temporary workaround from r213654.
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port): Remove mapping from 'ios' to 'ios-device.'
2021-11-01 Fujii Hironori <Hironori.Fujii@sony.com>
TestWTF.WTF_CompactUniquePtrTuple.Subclassing is randomly failing on WinCairo tester bots
https://bugs.webkit.org/show_bug.cgi?id=232556
Reviewed by Yusuke Suzuki.
"EXPECT_NE(oldPointer, a.pointer())" of line 241 was randomly
failing on WinCairo tester bots. This seems a simple mistake of
the test case. 'oldPointer' should be updated before destructing
the old value.
* TestWebKitAPI/Tests/WTF/CompactUniquePtrTuple.cpp:
(WTF_CompactUniquePtrTuple::Subclassing):
2021-11-01 Brady Eidson <beidson@apple.com>
webpushd: Add mock in-memory registration, and the WKWebsiteDataStore SPI to manage them
https://bugs.webkit.org/show_bug.cgi?id=232539
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(-[NotificationPermissionDelegate _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]):
(-[NotificationPermissionDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::then):
2021-11-01 Devin Rousso <drousso@apple.com>
[ iOS15 EWS ] TestWebKitAPI.CSSViewportUnits.SameUnobscuredSizeOverrides flaky fails on EWS
https://bugs.webkit.org/show_bug.cgi?id=232158
<rdar://problem/84555218>
Reviewed by Megan Gardner.
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm:
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):
2021-11-01 Simon Fraser <simon.fraser@apple.com>
ImageDiff no longer needs a --tolerance argument, and fix sometimes-black diff images
https://bugs.webkit.org/show_bug.cgi?id=232522
Reviewed by Martin Robinson.
ImageDiff no longer deals with tolerance, so remove `--tolerance` handling code in ImageDiff
and the driving script.
Also fix an issue where the diff image could be all black pixels even when there was a diff;
we need to ensure that a pixel with any diff is non-zero before scaling, and we need to
ensure that scaling by legacyDistanceMax doesn't overflow.
* ImageDiff/ImageDiff.cpp:
(processImages):
(main):
* ImageDiff/PlatformImage.cpp:
(ImageDiff::PlatformImage::difference):
* ImageDiff/PlatformImage.h:
* ImageDiff/cg/PlatformImageCG.cpp:
(ImageDiff::PlatformImage::createFromFile):
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer.diff_image):
(ImageDiffer._start): No need to restart ImageDiff if the tolerance changed, since
ImageDiff doesn't consult it. Tolerance in the python here just feeds into
the ImageDiffResult.
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_diff_image):
2021-11-01 Aakash Jain <aakash_jain@apple.com>
Fix a typo in EWS emails
Unreviewed minor fix.
* CISupport/ews-build/steps.py:
(AnalyzeCompileWebKitResults.send_email_for_new_build_failure):
(AnalyzeLayoutTestsResults.send_email_for_new_test_failures):
* CISupport/ews-build/steps_unittest.py: Unit-test fix after 243670@main.
2021-10-30 Wenson Hsieh <wenson_hsieh@apple.com>
Layer tree should not be stuck in frozen state after explicitly stopping a page load
https://bugs.webkit.org/show_bug.cgi?id=232532
rdar://84522357
Reviewed by Tim Horton.
Add support for `TestRunner.stopLoading()`, which immediately stops the page load, emulating what would normally
happen if the user taps or clicks the "x" button to cancel loading in Safari. See the layout test for more
details.
* DumpRenderTree/TestRunner.cpp:
(stopLoadingCallback):
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::stopLoading):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::stopLoading):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::stopLoading):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
2021-10-30 Chris Dumez <cdumez@apple.com>
Improve error handling in sendWithAsyncReply()
https://bugs.webkit.org/show_bug.cgi?id=232508
Reviewed by Darin Adler.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm:
(TEST):
2021-10-30 Sam Sneddon <gsnedders@apple.com>
Ensure we stop LayoutTest servers without them becoming zombies
https://bugs.webkit.org/show_bug.cgi?id=225189
<rdar://problem/77604119>
Reviewed by Jonathan Bedard.
Also increase the polling frequency in HttpServerBase._wait_for_action, as this is a major
source of delay when running run-webkit-tests --dry-run due to the number of servers we're
starting nowadays.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockProcess.__init__): Rename self.returncode to _returncode
(MockProcess.returncode): returncode should be None if process is still running
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._spawn_process): Store Popen object
(Lighttpd._check_and_kill): Skip "kill" if process has returned
(Lighttpd._is_server_running_on_all_ports): Correctly raise ServerError if it has returned
* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase.start): Change polling frequency for cygwin from 0.1Hz to default
(HttpServerBase._wait_for_action): Increase default polling frequency to 10Hz from 1Hz
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._stop_running_server): Poll first so we don't have zombies keeping references to pipes
2021-10-30 Kate Cheney <katherine_cheney@apple.com>
[iOS 15] Loads after WKWebView session restore are marked as app-initiated
https://bugs.webkit.org/show_bug.cgi?id=232486
<rdar://problem/84811692>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-10-29 Stephan Szabo <stephan.szabo@sony.com>
[PlayStation] Build fix after r285020
https://bugs.webkit.org/show_bug.cgi?id=232494
Unreviewed temporary Build Fix
Remove test that requires unsupported WTF::FileSystem functions.
* TestWebKitAPI/PlatformPlayStation.cmake:
2021-10-29 Alex Christensen <achristensen@webkit.org>
Revert r285034
webkit.org/b/232166
The test still times out in EWS.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-10-29 Alex Christensen <achristensen@webkit.org>
Unreviewed, reverting r284917.
Likely caused significant performance regression
Reverted changeset:
"Remove properties set by NSURLProtocol on NSURLRequest before
serializing"
https://bugs.webkit.org/show_bug.cgi?id=232332
https://commits.webkit.org/r284917
2021-10-29 Alex Christensen <achristensen@webkit.org>
Fix AppleWin build after r285051
​https://bugs.webkit.org/show_bug.cgi?id=232462
* DumpRenderTree/CMakeLists.txt:
2021-10-29 Alex Christensen <achristensen@webkit.org>
[ Monterey iOS15 ] TestWebKitAPI.URLSchemeHandler.Ranges is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=231394
Reviewed by Jer Noble.
For some reason, AVFoundation used to play videos from custom schemes when you respond to range requests with 1 fewer byte than requested.
They stopped successfully playing videos in such circumstances, which is fine. I had accidentally done that in my test.
When I respond properly, the test starts passing again.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
2021-10-29 John Pascoe <j_pascoe@apple.com>
Add last modified and creation time to +[_WKWebAuthenticationPanel getAllLocalAuthenticatorCredentials]
https://bugs.webkit.org/show_bug.cgi?id=232390
<rdar://problem/84689277>
Reviewed by Darin Adler.
These fields (creation time and last modified) are useful for providing context about credentials.
The modifications to the tests verify they are properly added.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-10-29 Alex Christensen <achristensen@webkit.org>
Fix macOS clean build after r285047
https://bugs.webkit.org/show_bug.cgi?id=232462
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestNetscapePlugIn: Removed.
2021-10-29 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Assign PR to author
https://bugs.webkit.org/show_bug.cgi?id=232348
<rdar://problem/84685313>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.request): Add assignees.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.create): Assign created PR to it's author.
(GitHub.PRGenerator.update): Assign modified PR to it's editor.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: Add assignees.
2021-10-29 Alex Christensen <achristensen@webkit.org>
Re-enable two AppPrivacyReport tests
webkit.org/b/232166
I ran them locally on iOS simulator and they ran fine.
They were disabled during a tumultuous time, and the cause of their timeouts is likely resolved.
I'll watch the bots and see if they agree.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-10-29 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Add fetch and rebase
https://bugs.webkit.org/show_bug.cgi?id=232447
<rdar://problem/84770221>
Reviewed by Dewei Zhu.
To land commits, we need to be able to rebase a branch against another.
Additionally, when rebasing, we need to discard stale cache bits. This
is also true when pulling and rebasing against main.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.clear): Clear cache of a specific branch.
(Git.rebase): Rebase a branch on top of another.
(Git.fetch): Fetch specific branch ref.
(Git.pull): Use generalized fetch command, clear cache for updated branch
if that branch is not the default branch.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add rebase mock.
(Git.rebase):
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Recompute branch-point after rebase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(test_rebase):
2021-10-29 Takashi Komori <Takashi.Komori@sony.com>
WKAPI does not have any APIs to set cookie path to WKWebsiteDataStoreConfigurationRef
https://bugs.webkit.org/show_bug.cgi?id=232336
Reviewed by Alex Christensen.
Add cookie-path setting API for WKWebasiteDataStoreConfigurationRef.
* TestWebKitAPI/PlatformPlayStation.cmake:
* TestWebKitAPI/PlatformWin.cmake:
* TestWebKitAPI/Tests/WebKit/CookieStorageFile.cpp: Added.
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST_F):
2021-10-28 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Fix commits set on branch
https://bugs.webkit.org/show_bug.cgi?id=232443
<rdar://problem/84763432>
Reviewed by Darin Adler.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.commits): We are appending to list of commits, not pre-pending.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGitHub.test_commits_branch_ref):
2021-10-28 Andres Gonzalez <andresg_22@apple.com>
Isolated tree mode: Dispatch all calls to [WebAccessibilityObjectWrapper accessibilityAttributeValue] in WTR::AccessibilityUIElement to the AX thread.
https://bugs.webkit.org/show_bug.cgi?id=232415
<rdar://problem/84738483>
Reviewed by Chris Fleizach.
This is necessary to simulate running accessibility layout tests on the
secondary AX thread.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::descriptionOfValue const):
(WTR::descriptionOfElements):
(WTR::AccessibilityUIElement::attributeValue const):
(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::getLinkedUIElements):
(WTR::AccessibilityUIElement::getDocumentLinks):
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const):
(WTR::AccessibilityUIElement::children const):
(WTR::AccessibilityUIElement::getChildren):
(WTR::AccessibilityUIElement::rowHeaders const):
(WTR::AccessibilityUIElement::columnHeaders const):
(WTR::AccessibilityUIElement::elementForAttribute const):
(WTR::AccessibilityUIElement::elementForAttributeAtIndex const):
(WTR::AccessibilityUIElement::detailsElements const):
(WTR::AccessibilityUIElement::errorMessageElements const):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::AccessibilityUIElement::uiElementAttributeValue const):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::y):
(WTR::AccessibilityUIElement::width):
(WTR::AccessibilityUIElement::height):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::lineRectsAndText const):
(WTR::AccessibilityUIElement::intValue const):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::insertionPointLineNumber):
(WTR::AccessibilityUIElement::isEnabled):
(WTR::AccessibilityUIElement::isRequired const):
(WTR::AccessibilityUIElement::isFocused const):
(WTR::AccessibilityUIElement::isSelected const):
(WTR::AccessibilityUIElement::isIndeterminate const):
(WTR::AccessibilityUIElement::isExpanded const):
(WTR::AccessibilityUIElement::currentStateValue const):
(WTR::AccessibilityUIElement::sortDirection const):
(WTR::AccessibilityUIElement::hierarchicalLevel const):
(WTR::AccessibilityUIElement::classList const):
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::ariaDropEffects const):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfColumns):
(WTR::AccessibilityUIElement::attributesOfRows):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::indexInTable):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::horizontalScrollbar const):
(WTR::AccessibilityUIElement::verticalScrollbar const):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const):
(WTR::AccessibilityUIElement::removeSelectionAtIndex const):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::isMultiSelectable const):
(WTR::AccessibilityUIElement::isOnScreen const):
(WTR::AccessibilityUIElement::embeddedImageDescription const):
(WTR::AccessibilityUIElement::imageOverlayElements const):
(WTR::AccessibilityUIElement::hasPopup const):
(WTR::AccessibilityUIElement::popupValue const):
(WTR::AccessibilityUIElement::selectedTextMarkerRange):
(WTR::AccessibilityUIElement::resetSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::_convertMathMultiscriptPairsToString):
(WTR::AccessibilityUIElement::mathPostscriptsDescription const):
(WTR::AccessibilityUIElement::mathPrescriptsDescription const):
(WTR::AccessibilityUIElement::mathRootRadicand const):
(WTR::AccessibilityUIElement::pathDescription const):
(WTR::descriptionOfValue): Deleted.
(WTR::attributesOfElement): Deleted.
2021-10-28 Simon Fraser <simon.fraser@apple.com>
Prepare SingleTestRunnerTest to read fuzzy pixel matching data
https://bugs.webkit.org/show_bug.cgi?id=232410
Reviewed by Martin Robinson.
Add code to SingleTestRunnerTest to get fuzzy pixel matching data from the <meta name=fuzzy>
tag in a test in the case of a hash match failure[1]. In future this will be used to
determine if the test can pass with acceptable fuzziness.
[1] Strictly speaking this can result in wrong behavior; a test with <meta name=fuzzy> is
supposed to fail if the differences are below the minimum specified values, so for correct
WPT behavior we would need to always look for the meta tag. But to avoid the perf impact of
always parsing tests, for now only look for the tag in the case of hash failure.
Add unit tests for the new functionality in SingleTestRunner.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner):
(SingleTestRunner._relative_reference_path):
(SingleTestRunner._fuzzy_matching_values):
(SingleTestRunner._test_passes_fuzzy_matching):
(SingleTestRunner._compare_output_with_reference):
* Scripts/webkitpy/layout_tests/controllers/single_test_runner_unittest.py: Added.
(TestDriver):
(TestDriver.run_test):
(TestDriver.start):
(TestDriver.stop):
(SingleTestRunnerTest):
(SingleTestRunnerTest._add_file):
(SingleTestRunnerTest._make_test_runner):
(SingleTestRunnerTest.test_fuzzy_matching_values):
(SingleTestRunnerTest.test_fuzzy_matching_values_for_ref):
2021-10-28 Youenn Fablet <youenn@apple.com>
Fix CARingBuffer mix mode
https://bugs.webkit.org/show_bug.cgi?id=232427
<rdar://problem/84747657>
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp:
2021-10-28 Simon Fraser <simon.fraser@apple.com>
Enhance test_parser.py to find fuzzy matching metadata
https://bugs.webkit.org/show_bug.cgi?id=232399
Reviewed by Martin Robinson.
w3c/test_parser is used by wpt import code, and it knows how to parse a file for various
meta tags. Enhance it to find <meta name=fuzzy> and return the data in test_info for future
use by layout tests, using code copied from wpt/tools/manifest/sourcefile.py.
Tested by new unit tests in test_parser_unittest.py
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test):
(TestParser.has_fuzzy_metadata):
(TestParser):
(TestParser.fuzzy_metadata):
* Scripts/webkitpy/w3c/test_parser_unittest.py:
(_test_info_from_test_with_contents):
(test_simple_fuzzy_data):
(test_nameless_fuzzy_data):
(test_range_fuzzy_data):
(test_nameless_range_fuzzy_data):
(test_per_ref_fuzzy_data):
2021-10-28 David Kilzer <ddkilzer@apple.com>
[Tools] Enable -Wformat=2 warnings
<https://webkit.org/b/232404>
<rdar://problem/84728058>
Reviewed by Darin Adler.
* DumpRenderTree/mac/Configurations/Base.xcconfig:
(WARNINGS_CFLAGS):
* ImageDiff/cg/Configurations/Base.xcconfig:
(WARNINGS_CFLAGS):
* MiniBrowser/Configurations/Base.xcconfig:
(WARNINGS_CFLAGS):
* MobileMiniBrowser/Configurations/Base.xcconfig:
(WARNINGS_CFLAGS):
* TestWebKitAPI/Configurations/Base.xcconfig:
(WARNINGS_CFLAGS):
- Add -Wformat=2 switch, which includes -Wformat-nonliteral.
* TestWebKitAPI/PlatformUtilities.h:
(TestWebKitAPI::Util::waitForConditionWithLogging):
- Add NS_FORMAT_FUNCTION() attribute.
* TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:
(TEST):
- Change type of format string to `NSString *const`.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h:
(ServiceWorkerTCPServer::request):
(ServiceWorkerTCPServer::requestWithLocalhost):
(ServiceWorkerTCPServer::requestWithFragment):
- Call -[NSString initWithFormat:] in each method so the format
string is used directly in the method call.
(ServiceWorkerTCPServer::respondToRequests):
- Change type of format string to `NSString *const`, and fix
placeholder for strlen() return value.
(ServiceWorkerTCPServer::requestWithFormat): Delete.
(ServiceWorkerTCPServer::requestWithURLString):
- Rename from requestWithFormat() and take a `url` parameter
instead of a `format` parameter.
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::HTTPServer::request const):
- Change switch statement to set the scheme for the URL, and
move the format string into +[NSString stringWithFormat:].
* WebEditingTester/Configurations/Base.xcconfig:
(WARNINGS_CFLAGS):
* WebKitTestRunner/Configurations/Base.xcconfig:
(WARNINGS_CFLAGS):
- Add -Wformat=2 switch, which includes -Wformat-nonliteral.
2021-10-27 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Generate commit message template
https://bugs.webkit.org/show_bug.cgi?id=231023
<rdar://problem/83722871>
Unreviewed follow-up fix.
* Scripts/git-webkit: Match repository base, not folder containing repository.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Mark hook as executable.
2021-10-27 Alexey Proskuryakov <ap@apple.com>
AutoInstall should have separate install directories per CPU architecture
https://bugs.webkit.org/show_bug.cgi?id=232403
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/__init__.py:
2021-10-27 Alex Christensen <achristensen@webkit.org>
Use correct String constructor in PrivateClickMeasurement.FraudPrevention API test
https://bugs.webkit.org/show_bug.cgi?id=232362
Reviewed by Darin Adler.
The Vector<char> received in the CompletionHandler given to Connection::receiveHTTPRequest is not null terminated,
so we need to call the String constructor that takes a length instead of assuming the byte after the Vector buffer is 0.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-10-27 Kate Cheney <katherine_cheney@apple.com>
REGRESSION: [iOS] TestWebKitAPI.InAppBrowserPrivacy.AppBoundDomainAllowsServiceWorkers is failing
https://bugs.webkit.org/show_bug.cgi?id=227918
Unreviewed fix to unskip failing test that was fixed by
https://commits.webkit.org/239967@main.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
2021-10-27 Simon Fraser <simon.fraser@apple.com>
Preserve image diff precision until display time
https://bugs.webkit.org/show_bug.cgi?id=232365
Reviewed by Martin Robinson.
Keep the precise image diff percentage value, saving it in full_results.json, and
only round it at presentation time in results.html.
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer._read):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_diff_image_failed_with_rounded_diff):
2021-10-27 Dmitry Bezhetskov <dbezhetskov@igalia.com>
[WASM-Function-References] Add call_ref spec tests
https://bugs.webkit.org/show_bug.cgi?id=229710
Reviewed by Yusuke Suzuki.
Add a new routine to run typed function references spec tests.
* Scripts/run-jsc-stress-tests:
2021-10-27 Simon Fraser <simon.fraser@apple.com>
Store WPT-style fuzzy pixel matching data in ImageDiffResult
https://bugs.webkit.org/show_bug.cgi?id=232352
Reviewed by Martin Robinson.
Always run ImageDiff with `--difference` so that it prints the "maxDifference=; totalPixels="
output, and parse and store this output in ImageDiffResult.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_tolerance.ImageDiffTestPort.diff_image):
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffResult.__init__):
(ImageDiffResult.__eq__):
(ImageDiffResult.__repr__):
(ImageDiffer._start):
(ImageDiffer._read):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_diff_image.make_proc):
(PortTestCase.test_diff_image):
(PortTestCase.test_diff_image_passed):
(PortTestCase.test_diff_image_passed_with_tolerance):
(PortTestCase.test_diff_image_failed_with_rounded_diff):
(PortTestCase.test_diff_image_failed):
* Scripts/webkitpy/port/test.py:
2021-10-27 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Ensure empty line before canonicalization
https://bugs.webkit.org/show_bug.cgi?id=232103
<rdar://problem/84521382>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/message.py:
(main): Handle empty lines around identifier links, add empty line before identifier links.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
(TestCanonicalize.test_formated_identifier):
(TestCanonicalize.test_existing_identifier):
(TestCanonicalize.test_git_svn):
(TestCanonicalize.test_git_svn_existing):
(TestCanonicalize.test_branch_commits):
(TestCanonicalize.test_number):
2021-10-27 Alexey Proskuryakov <ap@apple.com>
webkitdirs.pm should use JSON::XS when available
https://bugs.webkit.org/show_bug.cgi?id=232354
Reviewed by Dewei Zhu.
JSON::XS is faster than JSON::PP. While it doesn't matter for webkitdirs' own use,
where JSONs are tiny, other scripts that import webkitdirs.pm do care.
* Scripts/webkitdirs.pm:
2021-10-26 Alex Christensen <achristensen@webkit.org>
Remove properties set by NSURLProtocol on NSURLRequest before serializing
https://bugs.webkit.org/show_bug.cgi?id=232332
<rdar://79227845>
Reviewed by Geoff Garen.
* TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:
(TestWebKitAPI::TEST):
2021-10-26 Roy Reapor <rreapor@apple.com>
webkitpy/autoinstalled/pyobjc_frameworks.py should not autoinstall frameworks if they can be imported without exceptions
https://bugs.webkit.org/show_bug.cgi?id=232331
Reviewed by Jonathan Bedard.
Avoid autointalling pyobjc frameworks if the installed frameworks can be imported without generating an exception.
* Scripts/webkitpy/autoinstalled/pyobjc_frameworks.py:
(_import_modules):
2021-10-26 Tim Horton <timothy_horton@apple.com>
[GPU Process] `DisplayList::Recorder::getCTM` should include the device scale factor
https://bugs.webkit.org/show_bug.cgi?id=230647
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
Add a test that getCTM returns the correct scale after applyDeviceScaleFactor is called.
2021-10-26 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Comment and close pull-requests
https://bugs.webkit.org/show_bug.cgi?id=232095
<rdar://problem/84515738>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:
(BitBucket.request): Add support for activities, opening and closing pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.__init__): Add issues.
(GitHub.request): Access issue underlying pull-request (which includes global comments).
* Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest.Exception): Added.
(PullRequest.Comment): Added.
(PullRequest.__init__): Add list of pull-request comments, metadata used by generator.
(PullRequest.open): Re-open the pull-request.
(PullRequest.close): Close the pull-request.
(PullRequest.comment): Make a comment on the pull-request.
(PullRequest.comments): List all comments on a pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.update): Handle closing and opening of the pull-request.
(BitBucket.PRGenerator.comment): Make a comment on a pull-request.
(BitBucket.PRGenerator.comments): List all comments on a pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.update): Handle closing and opening of the pull-request.
(GitHub.PRGenerator.comment): Make a comment on a issue underpinning a pull-request.
(GitHub.PRGenerator.comments): List all comments on the pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
(Scm.PRGenerator.update): Add support for opening and closing a pull-request.
(Scm.PRGenerator.comment): Make a comment on a pull-request.
(Scm.PRGenerator.comments): List all comments for a pull-request
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
2021-10-26 Simon Fraser <simon.fraser@apple.com>
The script should decide when an image diff cases, not ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=232225
Unreviewed; respond to review feedback.
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer._read):
2021-10-26 Alex Christensen <achristensen@webkit.org>
Update PCM test public key to one with RSA-PSS OID
https://bugs.webkit.org/show_bug.cgi?id=231048
Reviewed by John Wilander.
In rdar://79069615 support for public keys with rsaEncryption OIDs was removed as stated on the blog at
https://webkit.org/blog/11940/pcm-click-fraud-prevention-and-attribution-sent-to-advertiser/
This implements enough ASN1 serialization to serialize a public key in the form accepted by WebKit now,
which is described at https://datatracker.ietf.org/doc/html/rfc8017#appendix-A.2.3
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ASN1Utilities.cpp: Added.
(ASN1::Object::sizeSerializedSize const):
(ASN1::Object::serializeSize const):
(ASN1::ObjectIdentifier::ObjectIdentifier):
(ASN1::ObjectIdentifier::bytes const):
(ASN1::Sequence::create):
(ASN1::Sequence::Sequence):
(ASN1::Sequence::elementEncodedLengthBytes const):
(ASN1::IndexWrapper::IndexWrapper):
(ASN1::Integer::Integer):
(ASN1::BitString::BitString):
(TestWebKitAPI::wrapPublicKeyWithRSAPSSOID):
* TestWebKitAPI/Tests/WebCore/ASN1Utilities.h: Added.
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-10-26 Tim Horton <timothy_horton@apple.com>
DisplayList::Recorder's clipBounds() becomes empty if a flip is applied to the CTM
https://bugs.webkit.org/show_bug.cgi?id=232134
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
Add a test ensuring that our clipBounds and CG's match through a series
of simple transforms.
2021-10-26 Brady Eidson <beidson@apple.com>
Add helper classes and messaging infrastructure to launch webpushd and round trip a message to it
https://bugs.webkit.org/show_bug.cgi?id=232262
Reviewed by Alex Christensen.
* MiniBrowser/mac/AppDelegate.m:
(persistentDataStore):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]):
2021-10-26 Simon Fraser <simon.fraser@apple.com>
The script should decide when an image diff cases, not ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=232225
Reviewed by Martin Robinson.
Rather than have ImageDiff decide if the comparison passes or fails (with some built-in
tolerance), have it just print the percentage difference, and have the script compare it
against the tolerance.
Code to prettify diff_percent is moved into the script (but should eventually
move closer to display time).
* ImageDiff/ImageDiff.cpp:
(processImages):
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer._read):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_diff_image.make_proc):
(PortTestCase.test_diff_image_passed):
(PortTestCase):
(PortTestCase.test_diff_image_passed_with_tolerance):
(PortTestCase.test_diff_image_failed_with_rounded_diff):
(PortTestCase.test_diff_image_failed):
2021-10-26 Kate Cheney <katherine_cheney@apple.com>
[ App Privacy Report ] Restoring a session after clearing the cache results in app initiated loads in Safari
https://bugs.webkit.org/show_bug.cgi?id=232292
<rdar://problem/84597422>
Reviewed by Brent Fulgham.
Update API test in 2 ways. First, close the original WebView to
destroy the page's document loader as if the application was being
quit. Second, clear history to make sure there are no cached loads.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-10-26 Simon Fraser <simon.fraser@apple.com>
Have ImageDiff print the diff image when any pixel is different
https://bugs.webkit.org/show_bug.cgi?id=232294
Reviewed by Martin Robinson.
ImageDiff currently only outputs the diff image when any pixel exceeds its built-in
tolerance.
To prepare for moving the "pass/fail" decision to script, have ImageDiff output the diff
image when any pixel is different. Also have it write "#EOF" so that we're not reliant on
the "diff:" line to terminate reading the output.
Fix up webkitpy unit tests for #EOF parsing, presence of image when the test passes via
tolerance, and to actually test which image data is present in the ImageDiffResult.
* ImageDiff/ImageDiff.cpp:
(processImages):
(main):
* ImageDiff/PlatformImage.cpp:
(ImageDiff::PlatformImage::difference): Track legacyDistanceMax if any pixel diff is non-zero,
since it's needed to scale the diff image.
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer._read): Look for "#EOF" to terminate the output. Save the diff image, even
if the test passed.
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_diff_image.make_proc):
(PortTestCase.test_diff_image):
(PortTestCase.test_diff_image_passed):
(PortTestCase.test_diff_image_failed):
(PortTestCase.test_diff_image_crashed):
2021-10-26 Simon Fraser <simon.fraser@apple.com>
Don't run ImageDiff a second time to generate diff images
https://bugs.webkit.org/show_bug.cgi?id=232288
Reviewed by Martin Robinson.
Currently, for a ref test failure (which is always run with tolerance=0), we run ImageDiff a
second time in FailureReftestMismatch.write_failure() with the intent of generating a diff
image with zero tolerance.
Fix by storing the ImageDiffResult in FailureReftestMismatch and FailureImageHashMismatch so
we already have the diff image. We only regenerate it when the first diff was run with a
non-zero tolerance (only relevant for pixel tests). To faciliate this, store the tolerance
that was used inside ImageDiffResult too.
* ImageDiff/ImageDiff.cpp:
(main): Show tolerance in verbose logging.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._compare_image):
(SingleTestRunner._compare_output_with_reference):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
(TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image):
(TestResultWriterTest):
(TestResultWriterTest.test_reftest_diff_image):
* Scripts/webkitpy/layout_tests/models/test_failures.py:
(FailureImageHashMismatch.__init__):
(FailureReftestMismatch.__init__):
(FailureReftestMismatch.write_failure):
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(_interpret_test_failures):
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(InterpretTestFailuresTest.test_interpret_test_failures):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_tolerance.ImageDiffTestPort.diff_image):
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffResult.__init__):
(ImageDiffResult.__repr__):
(ImageDiffer._read):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_diff_image):
2021-10-25 Ryan Haddad <ryanhaddad@apple.com>
Change default iOS simulator to one with a larger screen size
https://bugs.webkit.org/show_bug.cgi?id=231844
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_device_type_specific_listing):
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort):
(IPhoneSimulatorPort):
2021-10-25 Alexey Proskuryakov <ap@apple.com>
Add perl 5.30 to kill-old-processes
https://bugs.webkit.org/show_bug.cgi?id=232290
Reviewed by Ryan Haddad.
* CISupport/kill-old-processes:
2021-10-25 Kate Cheney <katherine_cheney@apple.com>
Clean up App Bound Domains tests
https://bugs.webkit.org/show_bug.cgi?id=232278
Reviewed by John Wilander.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TEST):
2021-10-25 Simon Fraser <simon.fraser@apple.com>
webkitpy: Add an explicit ImageDiffResult.passed rather than relying on diff_image being non-None
https://bugs.webkit.org/show_bug.cgi?id=232266
Reviewed by Jonathan Bedard.
A ref test was considered failing if it ImageDiffResult.diff_image was not None, allowing
for confusing unit tests that used a value of True for diff_image.
Fix by giving ImageDiffResult an explicit 'passes' field, and testing it rather than
diff_image.
Also used named arguments when creating ImageDiffResults for readability.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._compare_image): Use `diff_result.passed` as truth for whether the test passed,
and only store the error_string in failure cases (which allows ImageDiff to spew diagnostic errors
without triggering failures).
(SingleTestRunner._compare_output_with_reference):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
(TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image):
(TestResultWriterTest):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_tolerance.ImageDiffTestPort.diff_image):
* Scripts/webkitpy/port/base.py:
(Port.diff_image):
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffResult.__init__):
(ImageDiffResult.__eq__):
(ImageDiffResult.__repr__):
(ImageDiffer._read):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.integration_test_image_diff):
(PortTestCase.test_diff_image__missing_both):
(PortTestCase.test_diff_image__missing_actual):
(PortTestCase.test_diff_image__missing_expected):
(PortTestCase.test_diff_image):
(PortTestCase.test_diff_image_passed):
(PortTestCase.test_diff_image_failed):
(PortTestCase.test_diff_image_crashed):
* Scripts/webkitpy/port/test.py:
2021-10-25 Alex Christensen <achristensen@webkit.org>
WebKit ought to be able to play videos without Content-Length HTTP header fields and without range support
https://bugs.webkit.org/show_bug.cgi?id=232174
Reviewed by Geoff Garen.
* TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
(TestWebKitAPI::TEST):
2021-10-25 Ryan Haddad <ryanhaddad@apple.com>
Bring up queues for Monterey
https://bugs.webkit.org/show_bug.cgi?id=232186
Reviewed by Alexey Proskuryakov.
* CISupport/build-webkit-org/config.json:
* CISupport/build-webkit-org/factories_unittest.py:
(TestExpectedBuildSteps):
* CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* CISupport/build-webkit-org/wkbuild.py:
(_should_file_trigger_build):
2021-10-25 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Log based tests fail in different timezones
https://bugs.webkit.org/show_bug.cgi?id=232197
<rdar://problem/84615646>
Reviewed by Dewei Zhu.
Tests based on `git log` need to be timezone aware.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py:
2021-10-25 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION (r284079): Audio continues playing on hulu.com in private browsing mode after closing the tab
https://bugs.webkit.org/show_bug.cgi?id=232113
rdar://84399283
Reviewed by Chris Dumez.
Add a new API test to verify that the GPU to web prcoess connection isn't leaked in the GPU process. See WebKit
ChangeLog for more details.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
* TestWebKitAPI/Tests/WebKitCocoa/canvas-image-data.html: Added.
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[WKWebView gpuToWebProcessConnectionCount]):
2021-10-25 Simon Fraser <simon.fraser@apple.com>
webkitpy: have diff_image() return a ImageDiffResult
https://bugs.webkit.org/show_bug.cgi?id=232222
Reviewed by Jonathan Bedard.
diff_image() returned a list which resulted in hard to read code. In addition, the
presence of a diff_image is used to indicate failure; future patches will change this,
so having diff_image() return a class makes that easier.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._compare_image):
(SingleTestRunner._compare_output_with_reference):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
(TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image):
(TestResultWriterTest):
* Scripts/webkitpy/layout_tests/models/test_failures.py:
(FailureReftestMismatch.write_failure):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_tolerance.ImageDiffTestPort.diff_image):
* Scripts/webkitpy/port/base.py:
(Port.diff_image):
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffResult):
(ImageDiffResult.__init__):
(ImageDiffResult.__eq__):
(ImageDiffResult.__ne__):
(ImageDiffResult.__repr__):
(ImageDiffer._read):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.integration_test_image_diff):
(PortTestCase.test_diff_image__missing_both):
(PortTestCase.test_diff_image__missing_actual):
(PortTestCase.test_diff_image__missing_expected):
(PortTestCase.test_diff_image):
(PortTestCase.test_diff_image_passed):
(PortTestCase.test_diff_image_failed):
(PortTestCase.test_diff_image_crashed):
* Scripts/webkitpy/port/test.py:
2021-10-25 Carlos Alberto Lopez Perez <clopez@igalia.com>
[webkitpy] webkit-test-runner doesn't report all results when a test is run several times
https://bugs.webkit.org/show_bug.cgi?id=231790
Reviewed by Jonathan Bedard.
WTR was only picking one of the failure results when a test was run more than once
(for example with the flag --repeat-each=X), so it was not reporting all the values
that the test generated. This is a major issue when searching for flaky tests.
This patch adds a dictionary to store all the results of a given test on the repeated
repeats and then it ensures those values are taken into account when reporting the
final results for the test. It marks the test as flaky if more than one different value
was generated.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.__init__):
(TestRunResults.add):
(TestRunResults.merge):
(summarize_results):
2021-10-25 Aakash Jain <aakash_jain@apple.com>
Add support for fast-cq mode to webkit-patch land-safely command
https://bugs.webkit.org/show_bug.cgi?id=232196
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/tool/steps/postdiffforcommit.py:
(PostDiffForCommit):
(PostDiffForCommit.run):
* Scripts/webkitpy/tool/commands/upload_unittest.py: Added unit-test.
(test_land_safely_with_fast_cq):
2021-10-25 Sam Sneddon <gsnedders@apple.com>
[Python] rename assertEquals/assertNotEquals
https://bugs.webkit.org/show_bug.cgi?id=232214
Reviewed by Alexey Proskuryakov.
This is assert(Not)?Equals -> assert(\1)Equal
Python 3.11 (currently CPython main branch) removes the deprecated
aliases assertEquals/assertNotEquals. These have long been deprecated,
and the modern names exist all the way back to Python 2.7, hence there's
no reason not to switch.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest.test_multiple):
* Scripts/webkitpy/common/attribute_saver_unittest.py:
(AttributeSaverTest.test_class):
(AttributeSaverTest.test_normal_default):
(AttributeSaverTest.test_normal_value):
(AttributeSaverTest.test_normal_value_on_exception):
(AttributeSaverTest.test_normal_value_on_normal_exit):
(AttributeSaverTest.test_normal_value_with_finally_on_exception):
(AttributeSaverTest.test_normal_value_with_finally_on_normal_exit):
(AttributeSaverTest.test_normal_value_with_else_on_exception):
(AttributeSaverTest.test_normal_value_with_else_on_normal_exit):
* Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py:
(StubRepositoryTest.test_find_checkout_root):
* Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py:
(TestConfigurationTest.test_eq):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(MiscTests.test_parse_warnings_are_logged_if_not_in_lint_mode):
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(SummarizedResultsTest.test_svn_revision_exists):
(SummarizedResultsTest.test_svn_revision):
(SummarizedResultsTest.test_svn_revision_git):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_tests_options):
* Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
(TestHttpServer.test_win32_start_and_stop):
* Scripts/webkitpy/port/driver_unittest.py:
* Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest.test_gtk4_expectations_binary_only):
(GtkPortTest.test_gtk3_expectations_binary_only):
(GtkPortTest.test_gtk_expectations_both_binaries):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.assert_lines_lint):
* Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
* Scripts/webkitpy/w3c/test_converter_unittest.py:
(verify_test_harness_paths):
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):
* Scripts/webkitpy/w3c/test_importer_unittest.py:
* Scripts/webkitpy/w3c/test_parser_unittest.py:
* Scripts/webkitpy/w3c/wpt_runner_unittest.py:
(WPTRunnerTest.MockSpawnWPT.__call__):
(WPTRunnerTest.test_prepare_wpt_checkout):
(WPTRunnerTest.test_prepare_wpt_checkout_specified_path):
* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest.test_iphone_initialization):
(DeviceTypeTest.test_ipad_initialization):
(DeviceTypeTest.test_generic_ios_device):
(DeviceTypeTest.test_watch_initialization):
(DeviceTypeTest.test_tv_initialization):
* Scripts/webkitpy/xcode/sdk_unittest.py:
(SDKTest.test_iphoneos):
(SDKTest.test_iphonesim):
(SDKTest.test_macos):
(SDKTest.test_appletvos):
(SDKTest.test_appletvsim):
(SDKTest.test_watchos):
(SDKTest.test_watchsimulator):
(SDKTest.test_prodos):
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
2021-10-24 Arcady Goldmints-Orlov <agoldmints@igalia.com>
REGRESSION(r282686) [GTK] Tests are flaky due to spurious "MainFrameView: mouseEnteredContentArea" messages in the log
https://bugs.webkit.org/show_bug.cgi?id=232142
Add MockScrollAnimatorEnabled to the list of preferences to reset
between tests in TestOptions.cpp.
Reviewed by Carlos Garcia Campos.
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
2021-10-23 Simon Fraser <simon.fraser@apple.com>
Add an ImageDiff option to print out WPT-style pixel differences
https://bugs.webkit.org/show_bug.cgi?id=232212
Reviewed by Darin Adler.
When passed `--difference`, ImageDiff will compute and print out the "maxDifference=;totalPixels="
values documented at https://web-platform-tests.org/writing-tests/reftests.html. With these values,
there is no built-in tolerance as there is with the legacy difference computation.
Rename variables related to the legacy computation.
* ImageDiff/ImageDiff.cpp:
(processImages):
(main):
* ImageDiff/PlatformImage.cpp:
(ImageDiff::PlatformImage::difference):
* ImageDiff/PlatformImage.h:
2021-10-24 Simon Fraser <simon.fraser@apple.com>
Allow ImageDiff to read from files
https://bugs.webkit.org/show_bug.cgi?id=232201
Reviewed by Darin Adler.
For improved hackability when working on pixel tolerance, allow ImageDiff to read from
files by adding support for reading two file path arguments.
Also add some nice --help output, and preliminary support for --verbose.
* ImageDiff/ImageDiff.cpp:
(processImages):
(main):
* ImageDiff/PlatformImage.h:
* ImageDiff/cairo/PlatformImageCairo.cpp:
(ImageDiff::PlatformImage::createFromFile):
* ImageDiff/cg/PlatformImageCG.cpp:
(ImageDiff::PlatformImage::createFromFile):
2021-10-23 Yusuke Suzuki <ysuzuki@apple.com>
[WTF] Replace current LLVM flang's Int128 with abseil-cpp's Int128
https://bugs.webkit.org/show_bug.cgi?id=232129
Reviewed by Darin Adler.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/Int128.cpp:
(TestWebKitAPI::TYPED_TEST):
(TestWebKitAPI::TEST):
(TestWebKitAPI::ToNativeUInt128):
(TestWebKitAPI::FromNativeUInt128):
(TestWebKitAPI::ToNativeInt128):
(TestWebKitAPI::FromNativeInt128):
(TestWebKitAPI::TestBinaryUInt128):
(TestWebKitAPI::TestBinaryInt128):
(TestWebKitAPI::TestVsNativeUInt128):
(TestWebKitAPI::TestVsNativeInt128):
(TestWebKitAPI::TestUnary): Deleted.
(TestWebKitAPI::TestBinary): Deleted.
(TestWebKitAPI::ToNative): Deleted.
(TestWebKitAPI::FromNative): Deleted.
(TestWebKitAPI::TestVsNative): Deleted.
* TestWebKitAPI/Tests/WTF/LeadingZeroBitCount.cpp: Removed.
2021-10-22 Simon Fraser <simon.fraser@apple.com>
Content offset in this codepen when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=231989
Reviewed by Tim Horton.
API test that scrolls an iframe via wheel events, then detached and re-attaches the view.
The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode
scroll position" issue.
The scrolling tree dumps validate the layout viewport part of the fix.
Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added.
(TestWebKitAPI::synthesizeWheelEvents):
(TestWebKitAPI::waitForScrollEventAndReturnScrollY):
(TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[WKWebView objectByEvaluatingJavaScript:]):
(-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):
2021-10-22 Ryan Haddad <ryanhaddad@apple.com>
[ iOS15 EWS ] TestWebKitAPI.AppPrivacyReport.LoadSimulatedRequest tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=232166
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Disable these tests.
2021-10-22 Roy Reapor <rreapor@apple.com>
webkitpy/autoinstalled/pyobjc_frameworks.py should install wheel distribution
https://bugs.webkit.org/show_bug.cgi?id=232156
Reviewed by Stephanie Lewis.
Install wheel version of framweorks.
* Scripts/webkitpy/autoinstalled/pyobjc_frameworks.py:
2021-10-22 Ayumi Kojima <ayumi_kojima@apple.com>
Unreviewed, reverting r284654.
Reverting because this commit caused scrolling tests to fail
Reverted changeset:
"Content offset in this codepen when switching tabs"
https://bugs.webkit.org/show_bug.cgi?id=231989
https://commits.webkit.org/r284654
2021-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Localized role name doesn't work with ATSPI enabled
https://bugs.webkit.org/show_bug.cgi?id=232136
Reviewed by Adrian Perez de Castro.
Add a few tests for localized role name.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testAccessibleBasicHierarchy):
2021-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of text interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230258
Reviewed by Adrian Perez de Castro.
Add unit tests for the text interface.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(AtspiTextRangeDeleter::operator() const):
(AccessibilityTest::startEventMonitor):
(AccessibilityTest::stopEventMonitor):
(AccessibilityTest::findEvent):
(testTextBasic):
(testTextSurrogatePair):
(testTextIterator):
(testTextExtents):
(testTextSelections):
(testTextAttributes):
(testTextStateChanged):
(beforeAll):
2021-10-22 Kimmo Kinnunen <kkinnunen@apple.com>
WebGL low-power and high-performance contexts should use different ANGLE Metal EGLDisplays
https://bugs.webkit.org/show_bug.cgi?id=231012
<rdar://problem/83971417>
Reviewed by Dean Jackson.
Add a API test to test GraphicsContextGLOpenGL
Cocoa implementation regarding the bug where
the GraphicsContextGLOpenGL instances would use
the GPU that was selected by the first instance.
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm: Added.
(TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::create):
(TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::TestedGraphicsContextGLOpenGL):
(TestWebKitAPI::hasMultipleGPUs):
(TestWebKitAPI::TEST):
* TestWebKitAPI/WebCoreUtilities.h: Added.
(TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::ScopedSetAuxiliaryProcessTypeForTesting):
(TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::~ScopedSetAuxiliaryProcessTypeForTesting):
Add a utility state setter to set the process type for the
duration of a test.
2021-10-21 Ryan Haddad <ryanhaddad@apple.com>
WebGL bot should run tests with GPU Process enabled
https://bugs.webkit.org/show_bug.cgi?id=232107
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/config.json:
* CISupport/build-webkit-org/factories_unittest.py:
2021-10-21 Simon Fraser <simon.fraser@apple.com>
Content offset in this codepen when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=231989
Reviewed by Tim Horton.
API test that scrolls an iframe via wheel events, then detached and re-attaches the view.
The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode
scroll position" issue.
The scrolling tree dumps validate the layout viewport part of the fix.
Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added.
(TestWebKitAPI::synthesizeWheelEvents):
(TestWebKitAPI::waitForScrollEventAndReturnScrollY):
(TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[WKWebView objectByEvaluatingJavaScript:]):
(-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]):
(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):
2021-10-21 Fujii Hironori <Hironori.Fujii@sony.com>
[Win] TestWTF.FileSystemTest.* are timing out if run-api-tests is run by a normal user
https://bugs.webkit.org/show_bug.cgi?id=232065
Reviewed by Jonathan Bedard.
run-api-tests script didn't pass TEMP and TMP env vars to
TestWTF.exe. Then, generateTemporaryPath in
wtf/win/FileSystemWin.cpp never finished because a normal user
can't create a file in the Windows system directory.
* Scripts/webkitpy/port/win.py:
(WinPort.environment_for_api_tests): Added TEMP and TMP to the env
var list to inherit.
2021-10-21 Fujii Hironori <Hironori.Fujii@sony.com>
[Win Python] REGRESSION(r284398): run-api-tests: FileNotFoundError raised: [WinError 2] The system cannot find the file specified
https://bugs.webkit.org/show_bug.cgi?id=232037
Reviewed by Jonathan Bedard.
r284398 temporarily copied TestWTF program to ToBeListed to list
test cases. However, on Windows, TestWTF.exe is just a wrapper
program loading TestWTFLib.dll. If I just rename TestWTF.exe to
ToBeListed.exe, ToBeListed.exe tries to load ToBeListedLib.dll.
* Scripts/webkitpy/api_tests/manager.py:
(Manager._collect_tests): Do not copy the test program to
ToBeListed on Windows.
2021-10-21 Devin Rousso <drousso@apple.com>
[css-values-4] Support small (sv*), large (lv*) and dynamic (dv*) viewport units
https://bugs.webkit.org/show_bug.cgi?id=219287
<rdar://problem/71857370>
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: Added.
(evaluateForInt):
(getElementHeight):
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):
* TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html: Added.
* TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp:
(TEST.FloatSize.MinDimension): Added.
(TEST.FloatSize.MaxDimension): Added.
* TestWebKitAPI/Tests/WebCore/IntSizeTests.cpp:
(TEST.IntSize.MinDimension): Added.
(TEST.IntSize.MaxDimension): Added.
Add utility/helper methods for returning the minimum/maximum of the width vs height.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2021-10-21 Chris Dumez <cdumez@apple.com>
WebKit should process-swap for initial navigation of a popup if it has no opener
https://bugs.webkit.org/show_bug.cgi?id=231990
<rdar://84425504>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[PSONUIDelegate webViewDidClose:]):
Updated existing API tests to reflect behavior change.
Also extend an API test to make sure that a popup opened by JS can still close itself
via JS (by calling window.close()), even in the case where we process swap.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::outputText):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::didReceivePageMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
We have some tests that open a new popup with 'noopener' and the popup would be the
one to call `testRunner.notifyDone()`. This used to work fine when the popup would
end up in the same WebProcess because the injected bundle would know which page is
the main test page and use that one. However, now that we process-swap, the popup
page would think it is the main test page and try to dump its own output. However,
the UIProcess wasn't listening for messages from auxiliary pages' injected bundles.
The UIProcess now listens for those messages and asks the main test page to dump
its output when an auxiliary page in another process says the test is done.
2021-10-21 Simon Fraser <simon.fraser@apple.com>
run-webkit-tests --ios-simulator --print-expectations fails
https://bugs.webkit.org/show_bug.cgi?id=232035
Reviewed by Jonathan Bedard.
self._port.supported_device_types(), which _collect_tests() uses (despite its argument)
returns a different set of devices than self._port.DEFAULT_DEVICE_TYPES which caused
using those as hash keys to throw. So have print_expectations() and print_summary()
just use self._port.supported_device_types().
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.print_expectations):
(Manager.print_summary):
2021-10-21 Chris Lord <clord@igalia.com>
[WPE][GTK] Enable smooth scrolling by default
https://bugs.webkit.org/show_bug.cgi?id=220512
Reviewed by Carlos Garcia Campos.
Smooth scrolling is default on on GTK now, so reverse the logic in the
test for the efficacy of the related setting.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings):
2021-10-21 Sam Sneddon <gsnedders@apple.com>
Move layout_test_finder to layout_test_finder_legacy
https://bugs.webkit.org/show_bug.cgi?id=232018
Reviewed by Darin Adler.
This is a simple rename; no further changes.
* Scripts/open-layout-test:
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py.
(_is_reference_html_file):
(_has_supported_extension):
(LayoutTestFinder):
(LayoutTestFinder.__init__):
(LayoutTestFinder.find_tests):
(LayoutTestFinder.find_tests_by_path):
(LayoutTestFinder._expanded_paths):
(LayoutTestFinder._real_tests):
(LayoutTestFinder._is_test_file):
(LayoutTestFinder._is_w3c_resource_file):
(LayoutTestFinder._strip_test_dir_prefixes):
(LayoutTestFinder._strip_test_dir_prefix):
(LayoutTestFinder._read_test_names_from_file):
(LayoutTestFinder._strip_comments):
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py.
(MockLayoutTestFinder):
(MockLayoutTestFinder._real_tests):
(LayoutTestFinderTests):
(LayoutTestFinderTests.make_finder):
(LayoutTestFinderTests.test_supported_test_extensions):
(LayoutTestFinderTests.test_is_reference_html_file):
(LayoutTestFinderTests.test_find_no_paths_specified):
(LayoutTestFinderTests.test_find_one_test):
(LayoutTestFinderTests.test_find_glob):
(LayoutTestFinderTests.test_find_with_skipped_directories):
(LayoutTestFinderTests.test_find_with_skipped_directories_2):
(LayoutTestFinderTests.test_is_test_file):
(LayoutTestFinderTests.test_is_w3c_resource_file):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
* Scripts/webkitpy/tool/commands/queries.py:
2021-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK build with old version of ATSPI after r284367.
There's not API to check ATSPI version, so check if ATSPI_SCROLLTYPE_COUNT is defined to know if component
scroll API is available.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(beforeAll):
2021-10-20 Brady Eidson <beidson@apple.com>
WebKit Managed Notifications: Skeleton NotificationProvider
https://bugs.webkit.org/show_bug.cgi?id=231786
Reviewed by Alex Christensen.
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults): Disable BuiltInNotificationsEnabled for now.
2021-10-20 Beth Dakin <bdakin@apple.com> and Dana Estra <destra@apple.com>
macOS key-driven smooth scrolling does not stop when focus changes
https://bugs.webkit.org/show_bug.cgi?id=228302
Reviewed by Simon Fraser.
This patch adds support for rawKeyUp and rawKeyDown to the macOS versions of WKTR and DRT.
* DumpRenderTree/mac/EventSendingController.mm:
(+[EventSendingController initialize]):
(+[EventSendingController isSelectorExcludedFromWebScript:]):
(+[EventSendingController webScriptNameForSelector:]):
(-[EventSendingController rawKeyDown:withModifiers:withLocation:]):
(-[EventSendingController rawKeyDownWrapper:withModifiers:withLocation:]):
(-[EventSendingController rawKeyUp:withModifiers:withLocation:]):
(-[EventSendingController rawKeyUpWrapper:withModifiers:withLocation:]):
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::createRawKeyDownMessageBody):
(WTR::createRawKeyUpMessageBody):
(WTR::EventSendingController::rawKeyDown):
(WTR::EventSendingController::rawKeyUp):
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm:
(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveRawKeyDownMessageFromInjectedBundle):
(WTR::TestController::didReceiveRawKeyUpMessageFromInjectedBundle):
(WTR::TestController::didReceiveMessageFromInjectedBundle):
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):
* WebKitTestRunner/win/EventSenderProxyWin.cpp:
(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::EventSenderProxy::rawKeyDown):
(WTR::EventSenderProxy::rawKeyUp):
2021-10-20 Alex Christensen <achristensen@webkit.org>
REGRESSION (r284418): [iOS] TestWebKitAPI.HSTS.Basic, TestWebKitAPI.HSTS.CrossOriginRedirect, TestWebKitAPI.HSTS.ThirdParty, and TestWebKitAPI.WebKit.RedirectToPlaintextHTTPSUpgrade timing out
https://bugs.webkit.org/show_bug.cgi?id=232003
Reviewed by Chris Dumez.
I observed that sometimes the framer's nw_framer_input_handler_t is called after calling nw_framer_pass_through_input.
To fix this, I instead call nw_framer_deliver_input_no_copy myself to pass through the data inside my nw_framer_input_handler_t.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::proxyDefinition):
2021-10-20 Roy Reapor <rreapor@apple.com>
Benchmarks harness could fail if pyobjc-core module is upgraded without upgrading other pyobjc-frameworks
https://bugs.webkit.org/show_bug.cgi?id=231983
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver.prepare_env): Use autoinstalled Quartz module
(OSXBrowserDriver._terminate_processes): Use autoinstalled AppKit module
2021-10-20 Alex Christensen <achristensen@webkit.org>
Fix iOS build after r284539
https://bugs.webkit.org/show_bug.cgi?id=232003
* TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:
2021-10-20 Alex Christensen <achristensen@webkit.org>
Skip timing out tests on iOS while I investigate.
https://bugs.webkit.org/show_bug.cgi?id=232003
These tests are clearly timing out on iOS, but it'll take more than an hour or so to investigate.
Keep the bots green while I look into a better solution.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
* TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:
2021-10-20 Michael Catanzaro <mcatanzaro@gnome.org>
Do not use strerror()
https://bugs.webkit.org/show_bug.cgi?id=231913
Reviewed by Chris Dumez.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/Tests/WTF/SafeStrerror.cpp: Added.
(TestWebKitAPI::TEST):
2021-10-20 John Pascoe <j_pascoe@apple.com>
[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>
Reviewed by Brent Fulgham.
Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.
This adds a test to confirm a different path is taken whenever consent is obtained.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-10-20 Youenn Fablet <youenn@apple.com>
Add support for requestVideoFrameCallback API and MediaStreamTrack-based backend support
https://bugs.webkit.org/show_bug.cgi?id=231803
Reviewed by Eric Carlson.
Disable rvfc on tests by default until we implement rvfc for usual video streaming.
WebRTC tests enable rvfc themselves.
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2021-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Reenable -fvisibility=hidden and -fvisibility-inlines-hidden
https://bugs.webkit.org/show_bug.cgi?id=222860
Reviewed by Don Olmstead.
* TestRunnerShared/CMakeLists.txt:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/glib/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/PlatformWPE.cmake:
2021-10-20 Kimmo Kinnunen <kkinnunen@apple.com>
It should be possible to format C++ code to project style with WebKit tools
https://bugs.webkit.org/show_bug.cgi?id=230397
Reviewed by Jonathan Bedard.
Add capability to run clang-format for lines changed by
a patch.
Supports workflow of:
webkit-patch format -g HEAD
git commit -a --amend --no-edit
* Scripts/webkitpy/tool/commands/__init__.py:
* Scripts/webkitpy/tool/commands/format.py: Added.
(Format):
* Scripts/webkitpy/tool/steps/__init__.py:
* Scripts/webkitpy/tool/steps/formatcppfiles.py: Added.
(_is_formatted):
(_ranges):
(FormatCppFiles):
(FormatCppFiles.options):
(FormatCppFiles.__init__):
(FormatCppFiles.run):
* Scripts/webkitpy/tool/steps/options.py:
(Options):
2021-10-19 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Override http url with ssh url
https://bugs.webkit.org/show_bug.cgi?id=231965
<rdar://problem/84422393>
Reviewed by Ryan Haddad.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): Exclude / from hostname.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Prompt user to switch to ssh checkout.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
2021-10-19 Ryan Haddad <ryanhaddad@apple.com>
[EWS] Move EWS bots to iOS 15 / watchOS 8 / tvOS 15
https://bugs.webkit.org/show_bug.cgi?id=231925
Reviewed by Jonathan Bedard.
* CISupport/ews-build/config.json:
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
2021-10-19 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Generate commit message template (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=231023
<rdar://problem/83722871>
Unreviewed follow-up fix.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: MarkupSafe is imported as markupsafe.
2021-10-14 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Generate commit message template
https://bugs.webkit.org/show_bug.cgi?id=231023
<rdar://problem/83722871>
Reviewed by Dewei Zhu.
* Scripts/git-webkit: Use prepare-ChangeLog to generate commit messages.
* Scripts/hooks/prepare-commit-msg: Added.
* Scripts/libraries/webkitscmpy/setup.py: Bump version, add jinja.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add unbound status mock.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Pass hooks to sub-programs.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): iterate through the directory of provided hooks and render with jinja2.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg: Added.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
(TestSetup.test_commit_message):
2021-10-19 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Filter approvers by status
https://bugs.webkit.org/show_bug.cgi?id=231843
<rdar://problem/84320934>
Reviewed by Dewei Zhu.
If a project defines statuses for it's contributors, we only want
to allow reviewers to approve changes.
* Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
(Contributor): Add reviewer status.
(Contributor.Mapping.load): Keep track of possible statuses.
(Contributor.Mapping.__init__): Ditto.
(Contributor.Mapping.add): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.PullRequest): If a project defines a reviewer status, enforce it.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator._contributor): Handle case where no name is defined.
(GitHub.PRGenerator.reviewers): If a project defines a reviewer status, enforce it.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
2021-10-19 Alex Christensen <achristensen@webkit.org>
Fix iOS API tests after r284304
https://bugs.webkit.org/show_bug.cgi?id=231829
Part of the original commit that told the tests to continue doing what they were doing before was omitted.
This commits that.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(webViewWithResourceLoadStatisticsEnabledInNetworkProcess):
2021-10-19 Alex Christensen <achristensen@webkit.org>
Use JSONValues instead of a JSC::VM to parse WKContentRuleLists
https://bugs.webkit.org/show_bug.cgi?id=231704
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
2021-10-19 Alex Christensen <achristensen@webkit.org>
Re-disable WebKit.HTTPSProxy API test on iOS
https://bugs.webkit.org/show_bug.cgi?id=231396
Yesterday's attempt at making it not time out does not appear to have worked.
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
2021-10-19 Yusuke Suzuki <ysuzuki@apple.com>
DumpRenderTree should not use WK methods
https://bugs.webkit.org/show_bug.cgi?id=231910
Reviewed by Alex Christensen.
DumpRenderTree functions can be called on WebThread if ios simulator is used.
If we first use WK functions on that, it causes WebKit initialization on non
main thread. We should not mix WK functions with DumpRenderTree.
* DumpRenderTree/mac/DumpRenderTree.mm:
(dumpFramesAsText):
2021-10-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r284413.
https://bugs.webkit.org/show_bug.cgi?id=231936
BrokeSafariBuildByAddingANewEnum
Reverted changeset:
"[WebAuthn] Obtain consent to create new credential when
platform authenticator in excludedCredentials"
https://bugs.webkit.org/show_bug.cgi?id=219813
https://commits.webkit.org/r284413
2021-10-18 Jonathan Bedard <jbedard@apple.com>
Unreviewed, reverting r284399.
Breaks commit message generation
Reverted changeset:
"[webkitperl] Stop using LoadAsModule.pm"
https://bugs.webkit.org/show_bug.cgi?id=231868
https://commits.webkit.org/r284399
2021-10-18 Alex Christensen <achristensen@webkit.org>
Remove TCPServer
https://bugs.webkit.org/show_bug.cgi?id=231912
Reviewed by Chris Dumez.
It has been replaced by HTTPServer, which doesn't time out in its destructor when not everything is perfect,
and which does its logic on the main thread. It also doesn't use boringssl directly, so we can compile it on watchOS and tvOS.
* TestWebKitAPI/Sources.txt:
* TestWebKitAPI/TCPServer.cpp: Removed.
* TestWebKitAPI/TCPServer.h: Removed.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(testCertificate):
(testIdentity):
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:
(TestWebKitAPI::hstsWebViewAndDelegate):
(TestWebKitAPI::hstsServer):
(TestWebKitAPI::TEST):
(TestWebKitAPI::hasRadar80550123): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h:
(ServiceWorkerTCPServer::respondToRequests):
* TestWebKitAPI/cocoa/HTTPServer.h:
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::HTTPServer::testCertificate):
(TestWebKitAPI::HTTPServer::testPrivateKey):
2021-10-18 Jonathan Bedard <jbedard@apple.com>
[Python-3] Invoke webkit-patch with Python 3 by default (Revert)
https://bugs.webkit.org/show_bug.cgi?id=231591
<rdar://problem/84153640>
Reverted to fix webkitbot.
* Scripts/webkit-patch:
2021-10-18 John Pascoe <j_pascoe@apple.com>
[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>
Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.
This adds a test to confirm a different path is taken whenever consent is obtained.
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]):
(TestWebKitAPI::TEST):
2021-10-18 Alex Christensen <achristensen@webkit.org>
[ iOS15 ] TestWebKitAPI.WebKit.HTTPSProxy is a flaky, but frequent, timeout
https://bugs.webkit.org/show_bug.cgi?id=231396
Reviewed by Chris Dumez.
Something was happening that was very timing dependent that was causing this test to time out.
I think it was because the proxy framer was receiving an incomplete HTTP request.
To fix this, I look at the bytes received and if it wasn't a complete HTTP request, wait for the rest of the message.
I was unable to reproduce the timeout after this change and only rarely reproduced the timeout without this change.
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::proxyDefinition):
2021-10-18 Chris Dumez <cdumez@apple.com>
Add a callback to know when the service worker loads via -[WKWebView _loadServiceWorker:]
https://bugs.webkit.org/show_bug.cgi?id=231771
<rdar://problem/84274364>
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2021-10-18 Basuke Suzuki <basuke@mac.com>
[webkitperl] Fix webkitperl on Windows
https://bugs.webkit.org/show_bug.cgi?id=231374
Reviewed by Fujii Hironori.
Set WEBKIT_LIBRARIES environment variable before run if it is not defined.
Shell-style environment variables settings are not available on Windows. Replace them by setting
%ENV directly.
* Scripts/test-webkitperl:
* Scripts/webkitperl/auto-version_unittest/autoVersionTests.pl:
* Scripts/webkitperl/auto-version_unittest/versionStampTests.pl:
2021-10-18 Basuke Suzuki <basuke.suzuki@sony.com>
[webkitperl] Stop using LoadAsModule.pm
https://bugs.webkit.org/show_bug.cgi?id=231868
Reviewed by Jonathan Bedard.
This module load a script file as module with a bit tricky way. It prevents the proper
usage of package after all. The purpose of this module is to test routines defined in the
script. It just be wrong with such way. If you have something to test, it should be separated
as a module and be imported to the script. Then unit test can load the module and can test
without any sort of trouble.
* Scripts/filter-build-webkit:
(setOutputFormatOption):
(shouldShowSubsequentLine): Moved to webkitperl/build/output.pm.
(shouldIgnoreLine): Ditto.
* Scripts/prepare-ChangeLog:
(generateFunctionLists):
(fetchBugXMLData):
(openChangeLogs):
(method_decl_to_selector):
(diffCommand):
(statusCommand):
(propertyChangeDescription):
(normalizeLineEndings):
(actuallyGenerateFunctionLists): Moved to webkitperl/changelog.
(computeModifiedFunctions): Ditto.
(fetchBugDescriptionFromBugXMLData): Ditto.
(fetchRadarURLFromBugXMLData): Ditto.
(get_function_line_ranges): Ditto.
(get_function_line_ranges_for_cpp): Ditto.
(delete_namespaces_from_ranges_for_cpp): Ditto.
(is_function_in_namespace): Ditto.
(get_function_line_ranges_for_java): Ditto.
(get_function_line_ranges_for_javascript): Ditto.
(get_function_line_ranges_for_perl): Ditto.
(get_function_line_ranges_for_python): Ditto.
(get_selector_line_ranges_for_css): Ditto.
(get_function_line_ranges_for_swift): Ditto.
(parseSwiftFunctionArgs): Ditto.
(attributeCommand): Ditto.
(extractLineRangeAfterChange): Ditto.
(extractLineRangeBeforeChange): Ditto.
(decodeEntities): Ditto.
* Scripts/run-leaks:
(main):
(removeMatchingRecords):
(runLeaks): Moved to webkitperl/leaks.pm.
(parseLeaksOutput): Ditto.
(reportError): Deleted. Use Carp::croak instead.
* Scripts/webkitdirs.pm:
(determineBaseProductDir):
(determineCurrentSVNRevision):
(chdirWebKit):
(determineSourceDir): Moved to webkitperl/dirs.pm.
(setSourceDir): Ditto.
(sourceDir): Ditto.
* Scripts/webkitperl/LoadAsModule.pm: Removed.
* Scripts/webkitperl/build/output.pm: Extracted from Tools/Scripts/filter-build-webkit.
(shouldShowSubsequentLine):
(shouldIgnoreLine):
* Scripts/webkitperl/changelog.pm: Extracted from Tools/Scripts/prepare-ChangeLog.
(actuallyGenerateFunctionLists):
(extractLineRangeAfterChange):
(extractLineRangeBeforeChange):
(attributeCommand):
(fetchBugDescriptionFromBugXMLData):
(fetchRadarURLFromBugXMLData):
(computeModifiedFunctions):
(get_function_line_ranges):
(get_function_line_ranges_for_cpp):
(delete_namespaces_from_ranges_for_cpp):
(is_function_in_namespace):
(get_function_line_ranges_for_java):
(get_function_line_ranges_for_javascript):
(get_function_line_ranges_for_perl):
(get_function_line_ranges_for_python):
(get_selector_line_ranges_for_css):
(get_function_line_ranges_for_swift):
(parseSwiftFunctionArgs):
(decodeEntities):
* Scripts/webkitperl/dirs.pm: Extracted from Tools/Scripts/webkitdirs.
(sourceDir):
(setSourceDir):
(determineSourceDir):
* Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl:
* Scripts/webkitperl/leaks.pm: Copied from Tools/Scripts/run-leaks.
(runLeaks):
(parseLeaksOutput):
* Scripts/webkitperl/prepare-ChangeLog_unittest/extractLineRangeBeforeAndAfterChange.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/fetchRadarURLFromBugXMLData.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/filenameWithParentheses.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/generateFunctionLists.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
(convertAbsolutePathToRelativeUnixPath):
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl:
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:
2021-10-18 Jonathan Bedard <jbedard@apple.com>
[run-api-tests] Use temporary symlink when listing tests
https://bugs.webkit.org/show_bug.cgi?id=230560
Reviewed by Dewei Zhu.
* Scripts/webkitpy/api_tests/manager.py:
(Manager._collect_tests): Copy binary when listing tests to make debuging easier.
* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.copyfile): Return copyfile result.
(FileSystem.copymode): Invoke shutil.copymode.
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.copymode):
2021-10-18 Andres Gonzalez <andresg_22@apple.com>
Set isolated tree mode to secondary AX thread in LayoutTests.
https://bugs.webkit.org/show_bug.cgi?id=231763
Reviewed by Chris Fleizach.
Isolated tree mode was enabled for LayoutTests but set to run on the
main thread. Change it to run on the AX thread.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::updateIsolatedTreeMode):
2021-10-18 Alex Christensen <achristensen@webkit.org>
[ iOS15 Monterey ] TestWTF.WTF_URLExtras.URLExtras is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=231454
Reviewed by Chris Dumez.
The behavior of NSURL changed to disallow empty punycode in the host.
This is fine, but we need to update our test expectations.
* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):
2021-10-18 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Allow repositories to define custom setup commands (Follow0-up)
https://bugs.webkit.org/show_bug.cgi?id=231345
<rdar://problem/83960249>
Unreviewed follow-up fix.
* Scripts/git-webkit: Do not specify OpenSource in Tools/Scripts path.
2021-10-18 Alex Christensen <achristensen@webkit.org>
Regression (r284304) : [ iOS 15 Release ] http/tests/privateClickMeasurement tests are failing
https://bugs.webkit.org/show_bug.cgi?id=231898
Use the SPI I made to keep the tests having old behavior of using the network process instead of the daemon.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):
2021-10-18 Philippe Normand <pnormand@igalia.com>
[GStreamer] fast/mediastream/video-rotation tests are failing due to missing TestController::takeViewPortSnapshot
https://bugs.webkit.org/show_bug.cgi?id=231059
Reviewed by Xabier Rodriguez-Calvar.
Implement takeViewPortSnapshot for WPE and GTK, the WebView snapshot is exported to PNG and
serialized as a data URL.
* WebKitTestRunner/TestController.cpp:
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::takeViewPortSnapshot):
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::takeViewPortSnapshot):
2021-10-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add implementation of component interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230257
Reviewed by Adrian Perez de Castro.
Add unit tests for component interface.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testComponentHitTest):
(testComponentScrollTo):
(beforeAll):
2021-10-18 Yusuke Suzuki <ysuzuki@apple.com>
Remove AVOID_NATIVE_INT128_T
https://bugs.webkit.org/show_bug.cgi?id=231888
Reviewed by Mark Lam.
We can test Int128 without AVOID_NATIVE_INT128_T.
* TestWebKitAPI/Tests/WTF/Int128.cpp:
(TestWebKitAPI::TestUnary):
(TestWebKitAPI::TestBinary):
(TestWebKitAPI::ToNative):
(TestWebKitAPI::FromNative):
(TestWebKitAPI::TestVsNative):
(TestWebKitAPI::TEST):
2021-10-17 David Kilzer <ddkilzer@apple.com>
Add tests for WTF::OSObjectPtr/adoptOSObject in Cocoa with and without ARC
<https://webkit.org/b/231819>
<rdar://problem/84312692>
Reviewed by Darin Adler.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Add OSObjectPtrCocoa.mm and OSObjectPtrCocoaARC.mm source
files to the project.
* TestWebKitAPI/Tests/WTF/darwin/OSObjectPtr.cpp:
(TestWebKitAPI::TEST):
- Make code work when compiled with ARC enabled.
- Fix a pre-existing leak of dispatch_queue_t in RetainRelease
test.
* TestWebKitAPI/Tests/WTF/darwin/OSObjectPtrCocoa.mm: Add.
* TestWebKitAPI/Tests/WTF/darwin/OSObjectPtrCocoaARC.mm: Add.
- Add test files that #include OSObjectPtr.cpp.
2021-10-17 BJ Burg <bburg@apple.com>
[Cocoa] Web Inspector: remove _WKInspectorExtensionPrivateForTesting
https://bugs.webkit.org/show_bug.cgi?id=231784
<rdar://problem/84280608>
Reviewed by Timothy Hatcher.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:
(TEST):
2021-10-16 Simon Fraser <simon.fraser@apple.com>
Page zoom is messed up after navigating back from a PDF
https://bugs.webkit.org/show_bug.cgi?id=231841
<rdar://72666365>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/PageZoom.mm:
(TestWebKitAPI::TEST):
2021-10-15 Basuke Suzuki <basuke.suzuki@sony.com>
Add flag to turn off Iso heap
https://bugs.webkit.org/show_bug.cgi?id=231823
Reviewed by Yusuke Suzuki.
Added --(no-)iso-malloc feature flag for cmake build.
* Scripts/webkitperl/FeatureList.pm:
2021-10-15 Alex Christensen <achristensen@webkit.org>
Start using adattributiond on iOS
https://bugs.webkit.org/show_bug.cgi?id=231829
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::configurationWithoutUsingDaemon):
(TestWebKitAPI::webViewWithoutUsingDaemon):
(TestWebKitAPI::runBasicPCMTest):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(webViewWithResourceLoadStatisticsEnabledInNetworkProcess):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):
2021-10-15 Alex Christensen <achristensen@webkit.org>
Use attributedBundleIdentifier instead of applicationBundleIdentifier when present for handling PCM attribution
https://bugs.webkit.org/show_bug.cgi?id=231827
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::runBasicPCMTest):
(TestWebKitAPI::TEST):
2021-10-15 Ross Kirsling <ross.kirsling@sony.com>
Realize Mac CMake build of WebCore and WebKit
https://bugs.webkit.org/show_bug.cgi?id=231749
Reviewed by Alex Christensen.
* PlatformMac.cmake:
2021-10-15 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Allow repositories to define custom setup commands
https://bugs.webkit.org/show_bug.cgi?id=231345
<rdar://problem/83960249>
Reviewed by Dewei Zhu.
* Scripts/git-webkit: Define changelog conflict resolver.
* Scripts/libraries/webkitscmpy/setup.py: Add inspect2 as dependency, bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Attempt to resolve additional_setup function.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github): Invoke additional_setup function, if it exists.
(Setup.git): Ditto.
2021-10-15 BJ Burg <bburg@apple.com>
[Cocoa] Web Inspector: handle Promise objects returned from evaluateScriptInExtensionTab
https://bugs.webkit.org/show_bug.cgi?id=231709
<rdar://problem/84224179>
Reviewed by Timothy Hatcher.
Add a new test:
WKInspectorExtension.EvaluateScriptInExtensionTabCanReturnPromises
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:
(TEST):
2021-10-15 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Refactor PR branch management (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=230432
<rdar://problem/83258413>
Reviewed by Stephanie Lewis.
When we are uploading a change that includes multiple commits,
the second commit will be on the same branch as the first, but that
branch will be editable. We should not declare that "no commits
have been found on an editable branch," because that's not true.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.branch_point): Log the found commit for branches with multiple commits.
2021-10-15 Aakash Jain <aakash_jain@apple.com>
Make submit to ews error messages readable
https://bugs.webkit.org/show_bug.cgi?id=231824
Reviewed by Ryan Haddad.
* CISupport/ews-app/ews/views/submittoews.py:
(SubmitToEWS.post):
2021-10-15 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION (r284079): [Debug] IPCTestingAPI.CanReceiveSharedMemory is timing out
https://bugs.webkit.org/show_bug.cgi?id=231701
<rdar://problem/84219000>
Reviewed by Tim Horton.
Fix the failing API test by using the new `sendSyncMessage()` method on JSIPCStreamClientConnection to send
the "RemoteRenderingBackend::UpdateSharedMemoryForGetPixelBuffer" stream message and decode the result into a
buffer of shared memory.
* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
(TEST):
2021-10-14 John Wilander <wilander@apple.com>
TestWebKitAPI.PrivateClickMeasurement.FraudPrevention is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=231393
<rdar://problem/84000081>
Reviewed by Alex Christensen and Kate Cheney as part of https://bugs.webkit.org/show_bug.cgi?id=231553.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
PrivateClickMeasurement.FraudPrevention fixed. It was missing a call to
_setPrivateClickMeasurementAppBundleIDForTesting() so that the app bundle ID
for the triggering event matches the app bundle ID where the click happened.
2021-10-14 Lauro Moura <lmoura@igalia.com>
[webkitpy] Occasional exception thrown in change_result_to_failure when repeating flaky layout tests
https://bugs.webkit.org/show_bug.cgi?id=229788
Reviewed by Jonathan Bedard.
When a iterated/repeated flaky test moves from an unexpected Failure to
successive unexpected Pass, the currently stored result is still the
Failure (likely due to r235467). This may cause change_result_to_failure
to raise KeyError trying to forcibly remove() the Failure result from
the test_by_expectations set twice.
This commit relaxes the behavior to just ask to discard the value from
the set.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(LayoutTestRunnerTests.test_update_summary_with_result): Added test case.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.change_result_to_failure): Use set.discard to avoid
KeyErrors.
2021-10-14 Chris Dumez <cdumez@apple.com>
Service workers running on the main thread should use the main VM
https://bugs.webkit.org/show_bug.cgi?id=231753
Reviewed by Geoffrey Garen.
Extend API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerPagePlugIn.mm:
(-[ServiceWorkerPagePlugIn webProcessPlugInBrowserContextController:serviceWorkerGlobalObjectIsAvailableForFrame:inScriptWorld:]):
2021-10-14 Wenson Hsieh <wenson_hsieh@apple.com>
[JS IPC] Implement a way to synchronously wait for an incoming IPC message
https://bugs.webkit.org/show_bug.cgi?id=231745
Reviewed by Tim Horton.
Adjust an existing JS IPC test, IPCTestingAPI.CanReceiveIPCSemaphore, so that it uses the new JSIPC method to
wait for RemoteRenderingBackend's IPC stream wakeup semaphore to arrive. This fixes
IPCTestingAPI.CanReceiveIPCSemaphore (which is one of the two IPC tests that time out after r284079).
We also adjust IPCTestingAPI.CanReceiveSharedMemory to wait for and install the wakeup semaphore into the IPC
stream connection; however, this alone isn't sufficient to fix the test, since the test also requires the
ability to send synchronous messages through the IPC stream.
See WebKit ChangeLog for more details.
* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
(TEST):
2021-10-14 Alex Christensen <achristensen@webkit.org>
Fix some iOS builds after r284203
https://bugs.webkit.org/show_bug.cgi?id=231718
* TestWebKitAPI/cocoa/DaemonTestUtilities.h:
* TestWebKitAPI/cocoa/DaemonTestUtilities.mm:
Linker couldn't find OSLaunchdJob. It's only used on macOS, so only build it on macOS.
2021-10-14 Alex Christensen <achristensen@webkit.org>
Reduce memory use of AdAttributionDaemon
https://bugs.webkit.org/show_bug.cgi?id=231523
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-10-14 Yusuke Suzuki <ysuzuki@apple.com>
Fix build failures with newer clang
https://bugs.webkit.org/show_bug.cgi?id=231783
Reviewed by Chris Dumez.
Since this is Objective-C (not Objective-C++), we cannot use `static const uint32_t` value for array size.
Use enum hack instead.
* DumpRenderTree/mac/LayoutTestHelper.m:
(displayUUIDStrings):
2021-10-14 Peng Liu <peng.liu6@apple.com>
Promote WKPreferences._needsSiteSpecificQuirks to API
https://bugs.webkit.org/show_bug.cgi?id=230721
<rdar://83255206>
Reviewed by Jer Noble.
Updated API tests to use the new API.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(TEST):
2021-10-14 Alex Christensen <achristensen@webkit.org>
Share IPC communication code between webpushd and adattributiond
https://bugs.webkit.org/show_bug.cgi?id=231718
Reviewed by Brady Eidson.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::currentExecutableLocation): Deleted.
(TestWebKitAPI::currentExecutableDirectory): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: Added.
(TestWebKitAPI::testWebPushDaemonLocation):
(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::setUpTestWebPushD):
(TestWebKitAPI::cleanUpTestWebPushD):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/DaemonTestUtilities.h: Renamed from Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/webpushd.c.
* TestWebKitAPI/cocoa/DaemonTestUtilities.mm: Added.
(TestWebKitAPI::currentExecutableLocation):
(TestWebKitAPI::currentExecutableDirectory):
(TestWebKitAPI::registerPlistWithLaunchD):
2021-10-14 Wenson Hsieh <wenson_hsieh@apple.com>
[JS IPC] Make it possible to establish a stream connection using the JS IPC testing API
https://bugs.webkit.org/show_bug.cgi?id=231710
Reviewed by Tim Horton.
See WebKit ChangeLog for more details.
* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
Adjust these two API tests so that they actually end up creating a new remote rendering backend in the GPU
process, instead of failing to decode because we're missing a StreamConnectionBuffer. This allows us to make it
to `GPUConnectionToWebProcess::createRenderingBackend` and actually create the corresponding rendering backend;
however, this is still insufficient to fix the failing API tests, since there is still no mechanism to (1)
wait for and receive the stream wakeup semaphore in the web process, and (2) send stream messages using an
instance of the stream client connection.
2021-10-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
[webkitpy] The actual results reported for a flaky tests shouldn't include the expectation
https://bugs.webkit.org/show_bug.cgi?id=231241
Reviewed by Jonathan Bedard.
When a test is marked as flaky and fails the expectations on the
first run but passes on the second run (the retry) the current code
was adding the expectations to the actual results.
This is missleading and makes really hard to detect when a test stops
giving a specific expectation.
Instead of doing that report the actual results of the test on both runs.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.__init__):
(TestRunResults.add):
(TestRunResults.merge):
(summarize_results):
* Scripts/webkitpy/layout_tests/views/buildbot_results.py:
(BuildBotPrinter.print_unexpected_results):
2021-10-14 Myles C. Maxfield <mmaxfield@apple.com>
All the SDKVariant.xcconfig files should match
https://bugs.webkit.org/show_bug.cgi?id=231663
Reviewed by Youenn Fablet.
* ContentExtensionTester/Configurations/SDKVariant.xcconfig:
* DumpRenderTree/mac/Configurations/SDKVariant.xcconfig:
* ImageDiff/cg/Configurations/SDKVariant.xcconfig:
* MiniBrowser/Configurations/SDKVariant.xcconfig:
* MobileMiniBrowser/Configurations/SDKVariant.xcconfig:
* TestWebKitAPI/Configurations/SDKVariant.xcconfig:
* WebEditingTester/Configurations/SDKVariant.xcconfig:
* WebKitTestRunner/Configurations/SDKVariant.xcconfig:
* lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig:
2021-10-14 Chris Dumez <cdumez@apple.com>
[WKWebView _loadServiceWorkerURL] ends up lowercasing URL host
https://bugs.webkit.org/show_bug.cgi?id=231742
Reviewed by Timothy Hatcher.
Extend test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2021-10-14 Chris Dumez <cdumez@apple.com>
[ iOS Release ] TestWebKitAPI.WebKit.TryUsingPrewarmedProcessThatJustCrashed is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=229260
<rdar://problem/82100254>
Reviewed by Youenn Fablet.
WebKit's default crash handler simply calls [webview reload] which does not reliably work
here because the WebProcess gets terminated so early in the page load. To make the test pass
reliably, it now provides its own crash handler which loads the same request again.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm:
(TEST):
2021-10-14 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Reset author time when editing commits (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=230224
Reviewed by Dewei Zhu.
update-ref creates a sticky ref file, which is not what we want.
Use 'fetch' instead.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.pull): Use fetch instead of update-ref.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
2021-10-14 Aakash Jain <aakash_jain@apple.com>
Disable django admin url on ews.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=231739
Reviewed by Jonathan Bedard.
* CISupport/ews-app/ews-app/urls.py:
2021-10-14 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Move getCurrentExecutablePath() and getCurrentExecutableName() to FileSystem
https://bugs.webkit.org/show_bug.cgi?id=231732
Reviewed by Michael Catanzaro.
* TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:
(main):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
* WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp:
(WTR::topLevelPath):
* WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp:
(WTR::topLevelPath):
2021-10-13 Chris Dumez <cdumez@apple.com>
Drop makeWeakPtr() and use WeakPtr { } directly
https://bugs.webkit.org/show_bug.cgi?id=231679
Reviewed by Darin Adler.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_callonmainthread):
(process_line):
(check_makeweakptr): Deleted.
* TestWebKitAPI/Tests/WTF/Observer.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::makeWeakPtr):
2021-10-13 Jean-Yves Avenard <jya@apple.com>
Clearly distinguish serial from concurrent WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=231418
rdar://problem/84021977
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST):
2021-10-13 Ryan Haddad <ryanhaddad@apple.com>
Disable failing API tests
https://bugs.webkit.org/show_bug.cgi?id=231700
Unreviewed test gardening.
* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDoesNotLogDuringInitialization.mm:
* TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm:
2021-10-13 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] List reviewers for pull-request
https://bugs.webkit.org/show_bug.cgi?id=231577
<rdar://problem/84146807>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:
(BitBucket.request): Add state to created pull-reqest.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub):
(GitHub._users): Vend json representation of user for username.
(GitHub.request): Filter review details, add users endpoint.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Match both closed and opened pull-requests.
* Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest): Remove state.
(PullRequest.__init__): Add opened flag, reviewers and generator.
(PullRequest.reviewers): List the users who are reviewing this change.
(PullRequest.approvers): List the users who have aproved this change.
(PullRequest.blockers): List the users that are blocking this change from landing.
(PullRequest.opened): Check the pull-request is opened.
(PullRequest.State): Deleted.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.PullRequest): Set opened flag, specify reviewers.
(BitBucket.PRGenerator.find): Filter by opened flag instead of state.
(BitBucket.PRGenerator.update): Set generator.
(BitBucket.PRGenerator.reviewers): Set reviewer lists.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.PullRequest): Set opened flag, pass generator.
(GitHub.PRGenerator.find): Filter by opened flag instead of state.
(GitHub.PRGenerator.update): Set generator and opened flag.
(GitHub.PRGenerator._contributor): Find contributor matching username.
(GitHub.PRGenerator.reviewers): Populate lists of reviewers for a pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
(Scm.PRGenerator.find): Filter via opened flag instead of state.
(Scm.PRGenerator.reviewers): Function which populates reviewer lists for a pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
2021-10-13 Alex Christensen <achristensen@webkit.org>
Remove WTF::Variant and WTF::get
https://bugs.webkit.org/show_bug.cgi?id=231675
Reviewed by Chris Dumez.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/Variant.cpp: Removed.
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(addValuesToTable):
2021-10-13 Angelos Oikonomopoulos <angelos@igalia.com>
Debugging code for jscore-test hang
https://bugs.webkit.org/show_bug.cgi?id=231573
Reviewed by Jonathan Bedard.
Occasionally, jscore-test will just hang ("1200 seconds without
output"). When that happens, send SIGTERM first and have
run-jsc-stress-tests print a backtrace when that happens, so that we
can hopefully get an idea of what went wrong.
* CISupport/ews-build/steps.py:
(RunJavaScriptCoreTests.__init__):
* Scripts/run-jsc-stress-tests:
2021-10-12 Jonathan Bedard <jbedard@apple.com>
[AppleSilicon] Support native simulator testing
https://bugs.webkit.org/show_bug.cgi?id=231639
<rdar://problem/84170151>
Reviewed by Tim Horton.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort): Add arm64 as possible architecture.
(IOSSimulatorPort.architecture): Return the native system's architecture.
* Scripts/webkitpy/port/watch_simulator.py:
(WatchSimulatorPort): Add arm64_32.
(WatchSimulatorPort.architecture): Return the native system's 32 bit architecture.
2021-10-12 Garrett Davidson <garrett_davidson@apple.com>
Adopt platform UI for WebAuthn
https://bugs.webkit.org/show_bug.cgi?id=230906
<rdar://74659556>
Reviewed by David Kilzer.
Update the timeout test to expect NotAllowedError, which is the expected error
code when a timeout occurs, per Step 21 of the "Create a New Credential"
algorithm.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-10-12 Sihui Liu <sihui_liu@apple.com>
Implement FileSystemSyncAccessHandle read() and write()
https://bugs.webkit.org/show_bug.cgi?id=231466
<rdar://problem/84050394>
Reviewed by Youenn Fablet.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: Added.
(-[FileSystemAccessMessageHandler userContentController:didReceiveScriptMessage:]):
(test):
2021-10-12 Alex Christensen <achristensen@webkit.org>
Rename AdAttributionDaemon to adattributiond
https://bugs.webkit.org/show_bug.cgi?id=231620
Reviewed by Kate Cheney.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::testPCMDaemonLocation):
(TestWebKitAPI::cleanUpDaemon):
2021-10-12 Myles C. Maxfield <mmaxfield@apple.com>
[GPU Process] Unique RenderingResourceIdentifiers Part 9: Finish migrating RemoteResourceCache to QualifiedRenderingResourceIdentifier
https://bugs.webkit.org/show_bug.cgi?id=231414
<rdar://problem/84015584>
Reviewed by Said Abou-Hallawa.
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):
2021-10-12 Gabriel Nava Marino <gnavamarino@apple.com>
WebKitTestRunner should check mainFrameURL exists in InjectedBundlePage::willSendRequestForFrame
https://bugs.webkit.org/show_bug.cgi?id=231401
Reviewed by Youenn Fablet.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::willSendRequestForFrame):
Add mainFrameURL check in case of loading a non localhost URL with WebKitTestRunner.
2021-10-12 Alex Christensen <achristensen@webkit.org>
Use STL instead of WTF::get_if, WTF::Monostate, WTF::visit, and WTF::holds_alternative
https://bugs.webkit.org/show_bug.cgi?id=231582
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WTF/Variant.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(addValuesToTable):
2021-10-12 Jonathan Bedard <jbedard@apple.com>
Reverting r282216 becasue unauthenticated GitHub requests have low rate limits
https://bugs.webkit.org/show_bug.cgi?id=230095
Reviewed by Ryan Haddad.
* CISupport/ews-build/factories.py:
(WatchListFactory.__init__):
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
2021-10-12 Jonathan Bedard <jbedard@apple.com>
[Python-3] Invoke webkit-patch with Python 3 by default
https://bugs.webkit.org/show_bug.cgi?id=231591
<rdar://problem/84153640>
Reviewed by Michael Catanzaro.
* Scripts/webkit-patch: Change shebang to Python 3.
2021-10-12 Yusuke Suzuki <ysuzuki@apple.com>
Unreviewed, run-benchmark fix after r283936
https://bugs.webkit.org/show_bug.cgi?id=231512
import sys is necessary.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
2021-10-12 Tim Horton <timothy_horton@apple.com>
Borders are not drawn when using BifurcatedGraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=230976
<rdar://problem/83657330>
Reviewed by Sam Weinig.
* TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
Add a test for line drawing.
2021-10-12 Jonathan Bedard <jbedard@apple.com>
Move few scripts from python 2 to python3 (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=229817
Reviewed by Alexey Proskuryakov.
* CISupport/clean-build: Invoke clean-webkit with Python 3.
2021-10-12 Alex Christensen <achristensen@webkit.org>
Remove non-HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE) code
https://bugs.webkit.org/show_bug.cgi?id=231579
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(TestWebKitAPI::TEST):
2021-10-11 Diego Pino Garcia <dpino@igalia.com>
[GTK] Unreviewed build fix. Fix build for Debian 10 (Buster)
* TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
* TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
2021-10-11 Myles C. Maxfield <mmaxfield@apple.com>
[GPU Process] Unique RenderingResourceIdentifiers Part 8: Consolidate DisplayList::ResourceHeap
https://bugs.webkit.org/show_bug.cgi?id=231411
<rdar://problem/84013167>
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):
2021-10-11 Darin Adler <darin@apple.com>
Slightly better idiom for ARC debug autorelease workaround
https://bugs.webkit.org/show_bug.cgi?id=231435
Reviewed by David Kilzer.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:
(TestWebKitAPI::TEST): Use one macro instead of two, with
traditional indentation instead of left flush style.
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
(TestWebKitAPI::TEST): Ditto.
2021-10-11 Jonathan Bedard <jbedard@apple.com>
[build-imagediff] Build universal binaries by default
https://bugs.webkit.org/show_bug.cgi?id=231527
<rdar://problem/84113091>
Reviewed by Ryan Haddad.
* Scripts/build-imagediff:
2021-10-11 Jonathan Bedard <jbedard@apple.com>
[run-benchmark] Make Python 3 compatible
https://bugs.webkit.org/show_bug.cgi?id=231512
<rdar://problem/84098736>
Reviewed by Dewei Zhu.
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py:
(LinuxBrowserDriver.launch_url): Encode Popen call if Python 3.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.launch_url): Ditto.
2021-10-11 Alex Christensen <achristensen@webkit.org>
Reduce use of TCPServer
https://bugs.webkit.org/show_bug.cgi?id=231518
Reviewed by Chris Dumez.
HTTPServer runs its logic on the main thread and doesn't hang in its destructor
when the number of connections and requests isn't exactly what was expected.
verifyCertificateAndPublicKey needed its expected bytes to be changed because it is
using the identity from TCPServer::testCertificate instead of TCPServer::startSecureConnection now.
I also moved the proxy basic authentication check from proxyAuthenticationServer to proxyDefinition.
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(TEST):
(verifyCertificateAndPublicKey):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::proxyAuthenticationServer):
(TestWebKitAPI::webViewAndDelegate):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
* TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/HTTPServer.h:
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::proxyDefinition):
(TestWebKitAPI::shouldDisableTLS):
(TestWebKitAPI::HTTPServer::listenerParameters):
(TestWebKitAPI::statusText):
(TestWebKitAPI::HTTPServer::request const):
2021-10-11 Ryan Haddad <ryanhaddad@apple.com>
Bring up an iOS GPU Process tester
https://bugs.webkit.org/show_bug.cgi?id=231515
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/config.json:
* CISupport/build-webkit-org/factories_unittest.py:
2021-10-11 Alex Christensen <achristensen@webkit.org>
Prepare to switch from WTF::Variant to std::variant
https://bugs.webkit.org/show_bug.cgi?id=231239
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WTF/Hasher.cpp:
(TestWebKitAPI::add):
* TestWebKitAPI/Tests/WTF/Variant.cpp:
(TestWebKitAPI::TEST):
2021-10-11 Jonathan Bedard <jbedard@apple.com>
[build.webkit.org] Build iOS 15 as universal binary (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=231389
<rdar://problem/83997697>
Reviewed by Ryan Haddad.
* CISupport/build-webkit-org/config.json: Use universal iOS 15 Simulator Release build.
2021-10-10 Michael Catanzaro <mcatanzaro@gnome.org>
[WPE] Expose WKTextCheckerSetContinuousSpellCheckingEnabled and use it from WKTR
https://bugs.webkit.org/show_bug.cgi?id=231446
Reviewed by Philippe Normand.
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
* WebKitTestRunner/gtk/UIScriptControllerGtk.cpp:
* WebKitTestRunner/gtk/main.cpp:
* WebKitTestRunner/wpe/UIScriptControllerWPE.cpp:
(WTR::UIScriptControllerWPE::setContinuousSpellCheckingEnabled):
2021-10-09 Beth Dakin <bdakin@apple.com>
Pull modifier key extraction into TestRunnerShared
https://bugs.webkit.org/show_bug.cgi?id=231267
Reviewed by Tim Horton.
This patch pulls the code to extract modifier key information is pulled into a little class
called ModifierKeys in TestRunnerShared. That code is now shared between DRT and WKTR
for the existing implementations of keyDown.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController keyDown:withModifiers:withLocation:]):
* TestRunnerShared/cocoa/ModifierKeys.h: Added.
* TestRunnerShared/cocoa/ModifierKeys.mm: Added.
(-[ModifierKeys init]):
(-[ModifierKeys dealloc]):
(+[ModifierKeys modifierKeysWithKey:modifiers:keyLocation:]):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::keyDown):
2021-10-08 BJ Burg <bburg@apple.com>
[Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be notified when the inspected page navigates
https://bugs.webkit.org/show_bug.cgi?id=231338
<rdar://71200338>
Reviewed by Devin Rousso.
Add a new test to verify that triggering a navigation on the inspected WKWebView
causes the -extension:inspectedPageDidNavigate: method of _WKInspectorExtensionDelegate
to fire.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:
(resetGlobalState):
(-[InspectorExtensionDelegateForTesting inspectorExtension:inspectedPageDidNavigate:]):
(TEST):
2021-10-08 Tadeu Zagallo <tzagallo@apple.com>
Implement the WebAssembly exception handling proposal
https://bugs.webkit.org/show_bug.cgi?id=229681
<rdar://81603387>
Reviewed by Keith Miller.
* Scripts/run-jsc-stress-tests:
2021-10-08 Jer Noble <jer.noble@apple.com>
[Build-time perf] Forward-declare more things in Element.h
https://bugs.webkit.org/show_bug.cgi?id=231283
Reviewed by Myles C. Maxfield.
Include ArrayBuffer.h in various necessary places.
* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
2021-10-08 Truitt Savell <tsavell@apple.com>
Reverting r283824 becasue it broke baseline search paths
https://bugs.webkit.org/show_bug.cgi?id=230540
Unreviewed revert.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/version_unittest.py:
(VersionTestCase.test_int_constructor):
* Scripts/libraries/webkitcorepy/webkitcorepy/version.py:
(Version.from_iterable):
(Version.__init__):
(Version.__setitem__):
(Version.__contains__):
(Version.__hash__):
(Version.__cmp__):
2021-10-08 Wenson Hsieh <wenson_hsieh@apple.com>
Split DisplayList::Recorder into an abstract base class and a concrete implementation
https://bugs.webkit.org/show_bug.cgi?id=231404
Reviewed by Myles Maxfield.
See WebCore/ChangeLog for more details.
* TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
2021-10-08 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Allow caller to differentiate remote branches
https://bugs.webkit.org/show_bug.cgi?id=231450
<rdar://problem/84042400>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.branches): Change _branches_for to branches_for.
(Git.branches_for): Allow call to differentiate remote branches
to be returned, or return dictionary of all remotes.
(Git.commit): Change _branches_for to branches_for.
(Git._branches_for): Renamed branches_for.
2021-10-08 Michael Catanzaro <mcatanzaro@gnome.org>
Ensure webkitpy secret storage works successfully on Linux using only autoinstalled libraries
https://bugs.webkit.org/show_bug.cgi?id=231381
Reviewed by Jonathan Bedard.
Update to the latest python-keyring and python-secretstorage when using python 3.6 or newer.
Otherwise, use the latest version that still supports python2. This version is broken on
Linux, but that's OK because we do not care about python2 or python 3.5 anymore. I'm just
trying to avoid gratuitous breakage.
Autoinstall python-jeepey, a D-Bus library required by python-secretstorage.
Update to a newer version of importlib_metadata when using python 3.6 or newer. For older
versions of python, stick to the older version. There are some API breaks in this library
that I hope only affect python-keyring. We have other software that depends on this library,
but I think it's OK with either version. test-webkitpy will be the arbiter of that.
* Scripts/libraries/webkitcorepy/setup.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
* Scripts/webkitpy/__init__.py:
2021-10-08 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser][WK2] Implement Show Layer Tree to dump the GraphicsLayer tree
https://bugs.webkit.org/show_bug.cgi?id=231409
Reviewed by Don Olmstead.
MiniBrower has Show Layer Tree to dump the GraphicsLayer tree.
It's useful, but worked only in WebKit1. It should work for
WebKit2.
The layer tree are dumped to the debug console of WebProcess by
using OutputDebugString. You need to attach a debugger to it to
see the message. I'd like to recommend to install Child Process
Debugging Power Tool to your Visual Studio.
* MiniBrowser/win/CMakeLists.txt:
* MiniBrowser/win/Common2.cpp: Added.
(createString):
* MiniBrowser/win/Common2.h: Added.
* MiniBrowser/win/InjectedBundle.cpp: Added.
(didReceiveMessageToPage):
(WKBundleInitialize):
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(injectedBundlePath):
(WebKitBrowserWindow::create):
(WebKitBrowserWindow::showLayerTree):
2021-10-08 Jonathan Bedard <jbedard@apple.com>
[contributors.json] Support GitHub usernames
https://bugs.webkit.org/show_bug.cgi?id=231400
<rdar://problem/84005266>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
(Contributor.Encoder.default): Add GitHub and BitBucket username.
(Contributor.Mapping.load): Ditto.
(Contributor.Mapping.add): Ditto.
(Contributor.__init__): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:
(TestContributor):
(TestContributor.test_github):
(TestContributor.test_bitbucket):
* Scripts/webkitpy/common/config/committers.py:
(Contributor.__init__): Add GitHub username.
(Contributor.as_dict): Ditto.
(Committer.__init__): Ditto.
(Reviewer.__init__): Ditto.
(Bot.__init__): Ditto.
(CommitterList.load_json): Ditto.
2021-10-08 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Not possible to autoinstall a package with micro version 0
https://bugs.webkit.org/show_bug.cgi?id=230540
<rdar://problem/83613371>
Reviewed by Michael Catanzaro.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/version_unittest.py:
(VersionTestCase.test_int_constructor): Default values are 'None.'
* Scripts/libraries/webkitcorepy/webkitcorepy/version.py:
(Version.from_iterable):
(Version.__init__): Use 'None' as the default value instead of 0.
(Version.__setitem__): Support 'None' as a version value.
(Version.__contains__): Ditto.
(Version.__hash__): Ditto.
(Version.__cmp__): Ditto.
2021-10-08 Andres Gonzalez <andresg_22@apple.com>
AX: AXMathRootRadicand should return an array of elements, not just the first
https://bugs.webkit.org/show_bug.cgi?id=230986
<rdar://83688829>
Reviewed by Chris Fleizach.
Added AccessibilityUIElement::mathRootRadicand as a readonly property to
be used in LayoutTests.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::mathRootRadicand const):
2021-10-08 Antti Koivisto <antti@apple.com>
Make WTF::IteratorRange reversible
https://bugs.webkit.org/show_bug.cgi?id=231415
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WTF/IteratorRange.cpp:
(TestWebKitAPI::TEST):
2021-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
[WebDriver] Update w3c and selenium tests
https://bugs.webkit.org/show_bug.cgi?id=230551
<rdar://problem/83620518>
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/steps.py:
(RunWebDriverTests): Run run-webdriver-tests with python3.
* Scripts/run-webdriver-tests: Run with python3.
* Scripts/webkitpy/__init__.py: Use a newer version of pytest and its dependencies to match what tests expect.
* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(collect): Use contextlib to redirect stdout to /dev/null while collecting tests.
(run): Use ExitCode new enum added to pytest.
* Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
(WebDriverSeleniumExecutor.__init__): Do not encode paths.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
(WebDriverTestRunnerSelenium.collect_tests): Use items() instead of iteritems() that doesn't exist in python3.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebKitDriverServer.__init__):
(WebDriverW3CExecutor.__init__):
(WebDriverW3CExecutor.setup):
(WebDriverW3CExecutor._runner):
2021-10-08 Youenn Fablet <youenn@apple.com>
Add support for processing push events without service worker clients
https://bugs.webkit.org/show_bug.cgi?id=231285
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
2021-10-07 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Library should own contributors.json loading
https://bugs.webkit.org/show_bug.cgi?id=231310
<rdar://problem/83941327>
Unreviewed follow-up fix.
* Scripts/git-webkit: Fix imports.
2021-10-07 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Library should own contributors.json loading
https://bugs.webkit.org/show_bug.cgi?id=231310
<rdar://problem/83941327>
Reviewed by Dewei Zhu.
* Scripts/git-webkit: Do not load contributors from webkitpy.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
(Contributor.Encoder.default): Save contributor status to json.
(Contributor.Mapping.load): contributors.json is a list, may include
status, aliases and nicks.
(Contributor.Mapping.save): Save contributors to json file.
(Contributor.Mapping.__iter__): Iterate through all contributors.
(Contributor.__init__): Add status to contributor.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
(Scm.__init__): Attempt to load contributors.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.__init__): Set root_path before constructing base class.
* Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:
(ScmBase.__init__): Only reset path if it's not already defined.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:
(TestContributor.test_iteration):
2021-10-07 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Share cache between processes
https://bugs.webkit.org/show_bug.cgi?id=231176
<rdar://problem/83841221>
Reviewed by Dewei Zhu.
Generating the identifier cache is more expensive than reading a file with
that cache in it. This is particularly relevant for webservers, which are
likely running multiple processes.
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.__init__): Move cache loading into "load" function.
(Git.Cache.load): Open cache file.
(Git.Cache.to_hash): If we fail to find a match, attempt to load the file
before populating the file.
(Git.Cache.to_revision): Ditto.
(Git.Cache.to_identifier): Ditto.
2021-10-07 Jonathan Bedard <jbedard@apple.com>
[contributors.json] Relocation (Part 7)
https://bugs.webkit.org/show_bug.cgi?id=229690
<rdar://problem/82552403>
Reviewed by Dewei Zhu.
* Scripts/webkitpy/common/config/contributors.json: Removed.
2021-10-07 Jonathan Bedard <jbedard@apple.com>
[tvOS] Build simulator for arm64
https://bugs.webkit.org/show_bug.cgi?id=231390
<rdar://problem/83998448>
Reviewed by Alexey Proskuryakov.
* CISupport/build-webkit-org/config.json: Change tvOS simulator build to arm64.
* CISupport/ews-build/config.json: Ditto.
2021-10-07 Tim Horton <timothy_horton@apple.com>
BifurcatedGraphicsContext doesn't bifurcate draw{Tiled}Image
https://bugs.webkit.org/show_bug.cgi?id=231385
<rdar://problem/83922633>
Reviewed by Devin Rousso.
* TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
Add some test.
2021-10-07 Jonathan Bedard <jbedard@apple.com>
[build.webkit.org] Build iOS 15 as universal binary
https://bugs.webkit.org/show_bug.cgi?id=231389
<rdar://problem/83997697>
Reviewed by Ryan Haddad.
* CISupport/build-webkit-org/config.json: Make iOS 15 Simulator Release build universal.
2021-10-07 Stephan Szabo <stephan.szabo@sony.com>
[WinCairo] Support run-jsc-stress-tests without posix commands
https://bugs.webkit.org/show_bug.cgi?id=231101
Reviewed by Adrian Perez de Castro.
Add support for collecting the test result files when not on
a posix host platform by roughly emulating the find command
current used in ruby code when using the ruby-runner or
for playstation.
* Scripts/run-jsc-stress-tests:
2021-10-07 Jonathan Bedard <jbedard@apple.com>
[WebKitBot] Land local changes on production host
https://bugs.webkit.org/show_bug.cgi?id=231388
<rdar://problem/83996428>
Reviewed by Yusuke Suzuki.
* WebKitBot/src/Commit.mjs: Add Slack ID integration.
* WebKitBot/src/Contributors.mjs: Ditto.
* WebKitBot/src/Utility.mjs:
* WebKitBot/src/WebKitBot.mjs: Add "hi" and "yt" commands.
* WebKitBot/src/index.mjs:
2021-10-07 Michael Catanzaro <mcatanzaro@gnome.org>
Misc compiler warning fixes, October 2021
https://bugs.webkit.org/show_bug.cgi?id=231377
Reviewed by Adrian Perez de Castro.
Stop testing the default value of the XSS auditor setting. I could have used
IGNORE_DEPRECATED_DECLARATIONS_BEGIN instead, but I see no point in testing the default
value of a setting that no longer does anything.
* TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
(TestWebKitAPI::TEST):
2021-10-07 BJ Burg <bburg@apple.com>
Web Inspector: WebInspectorExtensionTabContentView should not reload its iframe when detached
https://bugs.webkit.org/show_bug.cgi?id=230758
<rdar://74714861>
Reviewed by Timothy Hatcher.
Add a new test to verify that re-selecting an extension tab does not cause it to reload.
* TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html:
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:
(TEST):
2021-10-07 Youenn Fablet <youenn@apple.com>
REGRESSION (r283613): [ macOS ] TestWebKitAPI.ResourceLoadDelegate.LoadInfo is failing
https://bugs.webkit.org/show_bug.cgi?id=231303
<rdar://problem/83940067>
Reviewed by Chris Dumez.
Make sure to clear all data store at the end of PushAPI test, as well as at the beginning of ResourceLoadDelegate test.
* TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm:
2021-10-07 David Kilzer <ddkilzer@apple.com>
Add back RetainPtrARC and TypeCastsCocoaARC tests to TestWTF
<https://webkit.org/b/231251>
<rdar://problem/83902809>
Reviewed by Darin Adler.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Add RetainPtrARC.mm and TypeCastsCocoaARC.mm to the project.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:
(TestWebKitAPI::TEST):
- Modify tests to clean up autoreleased objects in Debug builds
that are optimized out of Release builds.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Add.
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
(TestWebKitAPI::TEST):
- Modify tests to clean up autoreleased objects in Debug builds
that are optimized out of Release builds.
* TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Add.
2021-10-07 Chris Dumez <cdumez@apple.com>
ASSERTION FAILED: This HTTPServer does not know how to respond to a request for /popup-after-redirection.html
https://bugs.webkit.org/show_bug.cgi?id=231256
<rdar://problem/83904937>
Reviewed by Alex Christensen.
Stop hardcoding the HTTPServer port in COOP API tests to address flakiness.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
* TestWebKitAPI/cocoa/HTTPServer.h:
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::HTTPServer::addResponse):
2021-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Reenable -fvisibility=hidden
https://bugs.webkit.org/show_bug.cgi?id=181916
Reviewed by Michael Catanzaro.
* TestWebKitAPI/PlatformGTK.cmake:
2021-10-06 Fujii Hironori <Hironori.Fujii@sony.com>
Python 3: run-inspector-generator-tests and generate-inspector-protocol-bindings.py
https://bugs.webkit.org/show_bug.cgi?id=231055
Reviewed by Jonathan Bedard.
* Scripts/run-inspector-generator-tests:
* Scripts/webkitpy/inspector/main.py:
(InspectorGeneratorTests.generate_from_json): Use sys.executable
to invoke generate-inspector-protocol-bindings.py because 'python'
is python2.
2021-10-06 Wenson Hsieh <wenson_hsieh@apple.com>
Move FlushIdentifier out of the DisplayList namespace
https://bugs.webkit.org/show_bug.cgi?id=231263
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):
2021-10-06 Alex Christensen <achristensen@webkit.org>
[ iOS15 Release ] TestWebKitAPI.WebSocket.CloseCode
https://bugs.webkit.org/show_bug.cgi?id=231306
Reviewed by Chris Dumez.
This test starts by navigating, opening a websocket connection, then navigating away.
Sometimes in release builds we only get one didFinishNavigation callback.
The important thing about this test is that the server receives the expected close code
whenever the page is navigated away from, so drop the two didFinishNavigation checks.
I manually verified that on iOS15 simulator release builds the test would time out here,
and that it doesn't any more.
* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):
2021-10-06 Philip Chimento <pchimento@igalia.com>
Style checker should check spacing inside braces with elements in them
https://bugs.webkit.org/show_bug.cgi?id=231199
In order to automate this and prevent reviewers from having to comment
on it, ensure that spaces are required by webkit-check-style inside of
braces with elements in them (e.g., initializer lists.)
In order to avoid false positives, ignore brace spacing if the braces
are surrounded by double-quotes on the same line, assuming that means
it's likely the braces are inside a string.
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest):
(NoNonVirtualDestructorsTest):
(WebKitStyleTest.test_indentation):
2021-10-06 Youenn Fablet <youenn@apple.com>
Implement https://w3c.github.io/push-api/#receiving-a-push-message
https://bugs.webkit.org/show_bug.cgi?id=231070
<rdar://problem/83759574>
Reviewed by Chris Dumez.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: Added.
2021-10-06 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. [GTK] Fix /webkit/WebKitAccessibility/accessible/state with ATSPI
Add missing #else I didn't add by mistake in r283361.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(testAccessibleState):
2021-10-06 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE][GTK] TestJSC incorrectly expects garbage collector to collect variables still on the stack
https://bugs.webkit.org/show_bug.cgi?id=222972
Reviewed by Michael Catanzaro.
Include JSCContextInternal.h instead of JSCContextPrivate.h and remove the jscContextGarbageCollect() implementation.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCWeakValue): Call sanitizeStackForVM() before the garbage collection.
(jscContextGarbageCollect): Deleted.
2021-10-06 Jer Noble <jer.noble@apple.com>
[Build-time perf] Forward declare JS TypedArrays
https://bugs.webkit.org/show_bug.cgi?id=231196
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:
2021-10-05 Alex Christensen <achristensen@webkit.org>
[ iOS15 ] TestWebKitAPI.ResourceLoadStatistics.DataTaskIdentifierCollision is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=231246
Reviewed by Chris Dumez.
For a reason that is mysterious to me, this test was timing out on iOS
in the call to synchronouslyLoadHTMLString unless I added "addToWindow:NO"
to the TestWKWebView initialization.
For a reason that is also mysterious to me, the test was crashing when closing
because of something in the autoreleasepool, but using Vector<String> instead of
RetainPtr<NSArray<NSString *>> in DataTaskIdentifierCollisionDelegate makes that
stop crashing.
I've looked quite closely and don't see why this fixes it, but I verified that it does.
While I was at it, I migrated from TCPServer to HTTPServer to be more robust against timeouts,
because the TCPServer destructor waits forever for threads to join, and if not everything is
perfect it will make the tests time out, which isn't great. HTTPServer does everything on the
main thread with callbacks instead.
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(-[DataTaskIdentifierCollisionDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[DataTaskIdentifierCollisionDelegate waitForMessages:]):
(waitUntilTwoServersConnected):
(TEST):
2021-10-05 Alex Christensen <achristensen@webkit.org>
Add an entitlement check to only allow AdAttributionDaemon to be connected to by the network process
https://bugs.webkit.org/show_bug.cgi?id=231248
Reviewed by Alexey Proskuryakov.
Also add a system call to "launchctl unload" to clear any residual state in launchd before starting the unit test.
Otherwise we could get into a state where the plist is registered with launchd from an old test that registered it
but didn't start the daemon, causing the test to time out until you reboot the machine. This makes it recover nicely.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::attemptConnectionInProcessWithoutEntitlement):
(TestWebKitAPI::setInjectedBundleClient): Deleted.
(TestWebKitAPI::webViewWithOpenInspector): Deleted.
2021-10-05 Alex Christensen <achristensen@webkit.org>
TestWebKitAPI.PrivateClickMeasurement.DaemonBasicFunctionality is timing out
https://bugs.webkit.org/show_bug.cgi?id=231257
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
Originally reviewed as part of https://bugs.webkit.org/show_bug.cgi?id=231248
this should fix the error that happens when a previous test run has registered
the test AdAttributionDaemon but then failed before it was started, which leaves
launchd in a state of having already loaded a plist for the mach service named
"org.webkit.pcmtestdaemon.service" so it refuses to load another. The solution is
just to try unloading any previously loaded plist before loading another to clear
state in launchd.
2021-10-05 Tim Horton <timothy_horton@apple.com>
<model> should be draggable, similar to <img>
https://bugs.webkit.org/show_bug.cgi?id=229246
Reviewed by Wenson Hsieh.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/cube.usdz: Added.
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(-[ModelLoadingMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):
Add a test that ensures that dragging a <model> works.
2021-10-05 Alex Christensen <achristensen@webkit.org>
Implement missing functions in PrivateClickMeasurementDaemonClient
https://bugs.webkit.org/show_bug.cgi?id=231060
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::cleanUpDaemon):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestUIDelegate.h:
* TestWebKitAPI/cocoa/TestUIDelegate.mm:
(-[TestUIDelegate _webView:didAttachLocalInspector:]):
(-[TestUIDelegate waitForInspectorToShow]):
(-[WKWebView _test_waitForInspectorToShow]):
2021-10-05 David Kilzer <ddkilzer@apple.com>
REGRESSION (r283476): [ iOS macOS Debug ] TestWTF failures in RetainPtrARC and TypeCastsCocoaARC
<https://webkit.org/b/231172>
<rdar://problem/83836549>
Unreviewed partial revert of r283476.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Remove RetainPtrARC.mm and TypeCastsCocoaARC.mm from the
project.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Delete.
* TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Delete.
- Remove these tests until issues can be fixed.
2021-10-05 David Kilzer <ddkilzer@apple.com>
Follow-up #2: WTF::RetainPtr<> allows assignment of two pointer types that are not assignable
<https://webkit.org/b/230406>
<rdar://problem/83241893>
Unreviewed attempt to fix API tests.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:
(TestWebKitAPI::TEST):
- Revert code back to using objectNS.get() for
checked_objc_cast<> tests since it always worked.
2021-10-04 Jonathan Bedard <jbedard@apple.com>
[ews-build.webkit.org] check-patch-relevance can get stuck
https://bugs.webkit.org/show_bug.cgi?id=231190
<rdar://problem/77327168>
Reviewed by Alexey Proskuryakov.
* CISupport/ews-build/steps.py:
(CheckPatchRelevance): Compute all regexes in advance.
(CheckPatchRelevance._patch_is_relevant): Rely on pre-computed regexes,
limit the number of characters to check in a line to 250 and include a
hard-timeout so that a patch can never get EWS stuck.
2021-10-04 Chris Dumez <cdumez@apple.com>
Add SPI to launch a service service worker in a WKWebView and expose service worker to injected bundle
https://bugs.webkit.org/show_bug.cgi?id=231045
<rdar://problem/83744069>
Reviewed by Geoff Garen.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(-[ServiceWorkerSchemeHandler initWithBytes:]):
(-[ServiceWorkerSchemeHandler addMappingFromURLString:toData:]):
(-[ServiceWorkerSchemeHandler webView:startURLSchemeTask:]):
(-[ServiceWorkerSchemeHandler webView:stopURLSchemeTask:]):
(-[ServiceWorkerPageRemoteObject serviceWorkerGlobalObjectIsAvailable]):
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerPagePlugIn.mm: Added.
(-[ServiceWorkerPagePlugIn webProcessPlugInBrowserContextController:serviceWorkerGlobalObjectIsAvailableForFrame:inScriptWorld:]):
(-[ServiceWorkerPagePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerPageProtocol.h: Added.
2021-10-04 David Kilzer <ddkilzer@apple.com>
Follow-up: WTF::RetainPtr<> allows assignment of two pointer types that are not assignable
<https://webkit.org/b/230406>
<rdar://problem/83241893>
Unreviewed attempt to fix api-ios tests.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:
(TestWebKitAPI::TEST):
- Work around TestWTF.TypeCastsCocoa.checked_objc_cast test
failures on iOS Simulator by using @autoreleasepool.
2021-10-04 John Pascoe <j_pascoe@apple.com>
[WebAuthn] Prefer internal user verification if available over pin entry.
https://bugs.webkit.org/show_bug.cgi?id=213903
<rdar://problem/65359269>
Reviewed by Brent Fulgham.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added.
2021-10-04 John Pascoe <j_pascoe@apple.com>
[WebAuthn] Add SPI to change username of credential
https://bugs.webkit.org/show_bug.cgi?id=230956
<rdar://problem/83471755>
Reviewed by Brent Fulgham.
API test coverage for updating the username of a webauthn credential.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-10-04 Aakash Jain <aakash_jain@apple.com>
Send EWS exception emails to bot watchers instead of Aakash
Unreviewed.
* CISupport/ews-build/master.cfg:
2021-10-03 David Kilzer <ddkilzer@apple.com>
WTF::RetainPtr<> allows assignment of two pointer types that are not assignable
<https://webkit.org/b/230406>
<rdar://problem/83241893>
Reviewed by Darin Adler.
* DumpRenderTree/mac/DumpRenderTree.mm:
(dump):
- Use bridge_cast() to fix assignment.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Add RetainPtrARC.mm and TypeCastsCocoaARC.mm to the project.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:
- Update for dual compilation with MRR and with ARC. Change
-retainCount methods to CFGetRetainCount().
- Add @autoreleasepool blocks around groups of tests to find
over-released bugs sooner (for future changes).
- Add more CFGetRetainCount() to catch unexpected auto-released
objects as well as leaks.
(TestWebKitAPI::helloWorldCStringLength): Add.
(TestWebKitAPI::TEST):
- Add tests for bridge_cast() and bridge_id_cast().
- Remove invalid tests after changing RetainPtr<> move
constructor to check types.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Add.
- Run tests in TypeCastsCocoa.mm with ARC enabled.
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
(TestWebKitAPI::TEST):
- Update for dual compilation with MRR and with ARC. Change
-retainCount methods to CFGetRetainCount().
- Make it possible to name tests differently for MRR vs. ARC
using RETAIN_PTR_TEST_NAME macro.
* TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Add.
- Run tests in RetainPtr.mm with ARC enabled.
* TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
(readFile):
- Use bridge_cast() to fix assignment.
- Drive-by fix to keep NSData out of autoreleasePool.
2021-10-03 Myles C. Maxfield <mmaxfield@apple.com>
Some layout tests with Japanese glyphs fail if Japanese is included in the system "Preferred Languages" settings
https://bugs.webkit.org/show_bug.cgi?id=231112
Reviewed by Simon Fraser.
Simply set the default locale to en-US. Tests can still override it.
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
2021-10-02 Alex Christensen <achristensen@webkit.org>
Migrate some tests from TCPServer to HTTPServer
https://bugs.webkit.org/show_bug.cgi?id=231130
Reviewed by Chris Dumez.
The former runs logic on a non-main thread and has a destructor that waits for all threads to join,
which often causes timeouts in tests. This is progress towards removing TCPServer, which has been
replaced by HTTPServer.
* TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm:
* TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
* TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
(respondToRangeRequests):
2021-10-01 Chris Dumez <cdumez@apple.com>
Drop support for macOS < 10.15
https://bugs.webkit.org/show_bug.cgi?id=231085
Reviewed by Darin Adler.
* TestRunnerShared/spi/AppKitTestSPI.h:
* TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/Preconnect.mm:
* TestWebKitAPI/config.h:
2021-10-01 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Add a delay between successive iOS simulator boots (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=226376
Unreviewed infrastrucutre fix.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._boot_device): Increase delay to support iOS 15.
2021-10-01 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Get pull-request by number
https://bugs.webkit.org/show_bug.cgi?id=231039
<rdar://problem/83740215>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.request): Add pull-request access by number.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.PullRequest): Shared JSON pull-request generator.
(BitBucket.PRGenerator.get): Get pull-request by number.
(BitBucket.PRGenerator.find): Use shared pull-request generator.
(BitBucket.PRGenerator.create): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.PullRequest): Shared JSON pull-request generator.
(GitHub.PRGenerator.get): Get pull-request by number.
(GitHub.PRGenerator.find): Use shared pull-request generator.
(GitHub.PRGenerator.create):
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
(Scm.PRGenerator.get):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestNetworkPullRequestGitHub): Added.
2021-10-01 Alex Christensen <achristensen@webkit.org>
Implement HTTPS proxy in HTTPServer
https://bugs.webkit.org/show_bug.cgi?id=231109
Reviewed by Geoff Garen.
Previously we used TCPServer for this, which is picky about the exact number of connections, requests, and replies.
If everything isn't perfect, it hangs in the TCPServer destructor.
It also doesn't run the server logic on the main thread.
This will allow migration to HTTPServer, the replacement for TCPServer.
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/HTTPServer.h:
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::proxyDefinition):
(TestWebKitAPI::HTTPServer::listenerParameters):
(TestWebKitAPI::HTTPServer::respondWithOK):
(TestWebKitAPI::HTTPServer::request const):
2021-10-01 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add TaskPool (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=220547
<rdar://problem/73043887>
Unreviewed pip install modification.
* Scripts/libraries/webkitcorepy/setup.py: Bump version, add tblib.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version,].
2021-10-01 Chris Dumez <cdumez@apple.com>
Drop legacy USE(LEGACY_CFNETWORK_DOWNLOADS) code paths
https://bugs.webkit.org/show_bug.cgi?id=231081
Reviewed by Alex Christensen.
Drop legacy USE(LEGACY_CFNETWORK_DOWNLOADS) code paths, as we no longer support Mac OS 14 Mojave.
* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
2021-10-01 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Linkify http urls in pull-requests
https://bugs.webkit.org/show_bug.cgi?id=230655
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest):
(PullRequest.escape_html): Escape any html and linkify http urls.
(PullRequest.unescape_html): Unescape escaped html and strip links from http urls.
(PullRequest.create_body): Use <pre> and escape html in commit messages.
(PullRequest.parse_body): Match both <pre> and ```, escape html if <pre> was used.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.create): Opt out of linkifying http in comment body.
(BitBucket.PRGenerator.update): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
2021-10-01 Kimmo Kinnunen <kkinnunen@apple.com>
Add Kimmo Kinnunen as reviewer
https://bugs.webkit.org/show_bug.cgi?id=231072
Unreviewed.
Add myself as a reviewer
* Scripts/webkitpy/common/config/contributors.json:
2021-10-01 Sam Sneddon <gsnedders@apple.com>
Remove most deprecated webkit-patch commands
https://bugs.webkit.org/show_bug.cgi?id=231032
Reviewed by Jonathan Bedard.
This removes all currently deprecated commands except for
rebaseline-server (to be decided about) and land-cowhand (see
https://bugs.webkit.org/show_bug.cgi?id=227980).
This undoubtedly leaves dead code elsewhere in webkitpy, but tidying that is a task for the
future (due to dynamic typing, determining what is or is not dead is non-trivial).
* Scripts/webkitpy/tool/bot/retrylogic_unittest.py:
(MockJSCEarlyWarningSystem):
Rewrite to directly be a EarlyWarningSystemTaskDelegate subclass.
(MockJSCEarlyWarningSystem.__init__):
(MockJSCEarlyWarningSystem.group):
* Scripts/webkitpy/tool/commands/__init__.py:
* Scripts/webkitpy/tool/commands/adduserstogroups.py: Removed.
* Scripts/webkitpy/tool/commands/analyzechangelog.py: Removed.
* Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py: Removed.
* Scripts/webkitpy/tool/commands/applywatchlistlocal.py:
* Scripts/webkitpy/tool/commands/bugfortest.py: Removed.
* Scripts/webkitpy/tool/commands/bugsearch.py: Removed.
* Scripts/webkitpy/tool/commands/download.py:
(Update): Deleted.
(Build): Deleted.
(Build._prepare_state): Deleted.
(CheckPatchRelevance): Deleted.
(LandCowboy): Deleted.
(LandCowboy._prepare_state): Deleted.
(BuildAttachment): Deleted.
(ApplyWatchList): Deleted.
(LandFromURL): Deleted.
(PrepareRollout): Deleted.
(PrepareRollout._prepare_state): Deleted.
(CreateRollout): Deleted.
(CreateRollout._prepare_state): Deleted.
(Rollout): Deleted.
(Rollout._prepare_state): Deleted.
* Scripts/webkitpy/tool/commands/download_unittest.py:
(DownloadCommandsTest.test_build): Deleted.
(DownloadCommandsTest.test_apply_watch_list): Deleted.
(test_land): Deleted.
(test_build_attachment): Deleted.
(test_land_from_url): Deleted.
(test_prepare_revert): Deleted.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py: Removed.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Removed.
* Scripts/webkitpy/tool/commands/findusers.py: Removed.
* Scripts/webkitpy/tool/commands/gardenomatic.py: Removed.
* Scripts/webkitpy/tool/commands/openbugs.py: Removed.
* Scripts/webkitpy/tool/commands/openbugs_unittest.py: Removed.
* Scripts/webkitpy/tool/commands/queries.py:
(BugsToCommit): Deleted.
(BugsToCommit.execute): Deleted.
(PatchesInCommitQueue): Deleted.
(PatchesInCommitQueue.execute): Deleted.
(PatchesToCommitQueue): Deleted.
(PatchesToCommitQueue.__init__): Deleted.
(PatchesToCommitQueue._needs_commit_queue): Deleted.
(PatchesToCommitQueue.execute): Deleted.
(PatchesToReview): Deleted.
(PatchesToReview.__init__): Deleted.
(PatchesToReview._print_report): Deleted.
(PatchesToReview._generate_report): Deleted.
(PatchesToReview.execute): Deleted.
(WhatBroke): Deleted.
(WhatBroke._print_builder_line): Deleted.
(WhatBroke._print_blame_information_for_builder): Deleted.
(WhatBroke.execute): Deleted.
(ResultsFor): Deleted.
(ResultsFor._print_layout_test_results): Deleted.
(ResultsFor.execute): Deleted.
(FailureReason): Deleted.
(FailureReason._blame_line_for_revision): Deleted.
(FailureReason._print_blame_information_for_transition): Deleted.
(FailureReason._explain_failures_for_builder): Deleted.
(FailureReason._builder_to_explain): Deleted.
(FailureReason._done_explaining): Deleted.
(FailureReason.execute): Deleted.
(FindFlakyTests): Deleted.
(FindFlakyTests._find_failures): Deleted.
(FindFlakyTests._increment_statistics): Deleted.
(FindFlakyTests._print_statistics): Deleted.
(FindFlakyTests._walk_backwards_from): Deleted.
(FindFlakyTests._builder_to_analyze): Deleted.
(FindFlakyTests.execute): Deleted.
(TreeStatus): Deleted.
(execute): Deleted.
(CrashLog): Deleted.
(PrintExpectations): Deleted.
(PrintExpectations.__init__): Deleted.
(PrintExpectations.execute): Deleted.
(PrintExpectations._filter_tests): Deleted.
(PrintExpectations._format_lines): Deleted.
(PrintExpectations._model): Deleted.
(PrintBaselines): Deleted.
(PrintBaselines.__init__): Deleted.
(PrintBaselines.execute): Deleted.
(PrintBaselines._print_baselines): Deleted.
(PrintBaselines._platform_for_path): Deleted.
(FindResolvedBugs): Deleted.
(FindResolvedBugs.execute): Deleted.
* Scripts/webkitpy/tool/commands/queries_unittest.py: Removed.
* Scripts/webkitpy/tool/commands/rebaseline.py: Removed.
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py: Removed.
* Scripts/webkitpy/tool/commands/upload.py:
(CommitMessageForCurrentDiff): Deleted.
(CommitMessageForCurrentDiff.__init__): Deleted.
(CommitMessageForCurrentDiff.execute): Deleted.
(CleanPendingCommit): Deleted.
(CleanPendingCommit._flags_to_clear_on_patch): Deleted.
(CleanPendingCommit.execute): Deleted.
(CleanReviewQueue): Deleted.
(CleanReviewQueue.execute): Deleted.
(AssignToCommitter): Deleted.
(AssignToCommitter._patches_have_commiters): Deleted.
(AssignToCommitter._assign_bug_to_last_patch_attacher): Deleted.
(AssignToCommitter.execute): Deleted.
(ObsoleteAttachments): Deleted.
(ObsoleteAttachments._prepare_state): Deleted.
(AttachToBug): Deleted.
(AttachToBug._prepare_state): Deleted.
(HasLanded): Deleted.
(PostCommits): Deleted.
(PostCommits.__init__): Deleted.
(PostCommits._comment_text_for_commit): Deleted.
(PostCommits.execute): Deleted.
(CreateBug): Deleted.
(CreateBug.__init__): Deleted.
(CreateBug.create_bug_from_commit): Deleted.
(CreateBug.create_bug_from_patch): Deleted.
(CreateBug.prompt_for_bug_title_and_comment): Deleted.
(CreateBug.execute): Deleted.
(WPTChangeExport): Deleted.
(WPTChangeExport._prepare_state): Deleted.
* Scripts/webkitpy/tool/commands/upload_unittest.py:
(UploadCommandsTest.test_commit_message_for_current_diff): Deleted.
(UploadCommandsTest.test_clean_pending_commit): Deleted.
(UploadCommandsTest.test_assign_to_committer): Deleted.
(test_obsolete_attachments): Deleted.
(test_post): Deleted.
(test_attach_to_bug): Deleted.
(test_attach_to_bug_no_description_or_comment): Deleted.
2021-10-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add initial implementation of accessible interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230256
Reviewed by Adrian Perez de Castro.
Add more unit tests for the accessible interface.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(AtspiEventDeleter::operator() const):
(AccessibilityTest::startEventMonitor):
(AccessibilityTest::stopEventMonitor):
(AccessibilityTest::stateSetSize):
(testAccessibleBasicHierarchy):
(testAccessibleIgnoredObjects):
(testAccessibleChildrenChanged):
(testAccessibleAttributes):
(testAccessibleState):
(testAccessibleStateChanged):
(beforeAll):
(testAtspiBasicHierarchy): Deleted.
2021-09-30 Alex Christensen <achristensen@webkit.org>
Stop making a file named null when running API tests
​https://bugs.webkit.org/show_bug.cgi?id=230191
r283298 did the trick, but I need to pipe stderr to /dev/null instead of null
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-09-30 Fujii Hironori <Hironori.Fujii@sony.com>
Python 3 fails to run run-builtins-generator-tests : ModuleNotFoundError: No module named 'builtins_model'
https://bugs.webkit.org/show_bug.cgi?id=230870
Reviewed by Jonathan Bedard.
After r282424 (Bug 229879) switched to python3 for running
run-builtins-generator-tests on Buildbot, only WinCairo buildbot
was failing run-builtins-generator-tests.
run-builtins-generator-tests was invoking generate-js-builtins.py
explictly with 'python'. This is Python 2 on other bots.
Use sys.executable instead of 'python' to invoke
generate-js-builtins.py.
* Scripts/webkitpy/codegen/main.py:
(BuiltinsGeneratorTests.generate_from_js_builtins):
2021-09-30 John Wilander <wilander@apple.com>
PCM: Take app bundle ID into consideration when matching triggering events with pending clicks
https://bugs.webkit.org/show_bug.cgi?id=230778
<rdar://problem/83516528>
Reviewed by Alex Christensen.
https://commits.webkit.org/r282884 added app bundle IDs to unattributed
and attributed clicks in PCM. This patch makes sure we take those IDs
into consideration in PCM::Database::attributePrivateClickMeasurement().
The TestRunner changes are all test infrastructure to enable different
app bundle IDs in the eyes of PCM. The API test changes are to make use
of the app bundle ID test infrastructure.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPrivateClickMeasurementAppBundleIDForTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setPrivateClickMeasurementAppBundleIDForTesting):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2021-09-30 Alex Christensen <achristensen@webkit.org>
Clean up PrivateClickMeasurement
https://bugs.webkit.org/show_bug.cgi?id=230978
Reviewed by Kate Cheney.
I removed the InvalidSourceID test because it is now impossible to make an invalid source ID
because it uses a uint8_t and allows the values 0-255.
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-09-29 Alex Christensen <achristensen@webkit.org>
Terminate PCM daemon before and after unit test that uses it
https://bugs.webkit.org/show_bug.cgi?id=230191
In r282368 I added a unit test that creates a daemon, uses it, then terminates it.
On some bots it has been timing out. Once it starts timing out, it probably won't stop because
it won't get to the part of the test that terminates the problematic daemon.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-09-29 Chris Dumez <cdumez@apple.com>
Add support for running service workers on the main thread
https://bugs.webkit.org/show_bug.cgi?id=230649
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2021-09-29 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Contributors may be undefined
https://bugs.webkit.org/show_bug.cgi?id=230997
<rdar://problem/83693400>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Ensure that repositories always have defined contributors.
2021-09-29 Basuke Suzuki <basuke.suzuki@sony.com>
[webkitpy] LOG_CHANNEL is widely used in the codebase and shouldn't be treated as error
https://bugs.webkit.org/show_bug.cgi?id=230995
Reviewed by Jonathan Bedard.
LOG_CHANNEL is the macro which is defined in each framework to define list of all channels
in the framework.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):
2021-09-29 Alex Christensen <achristensen@webkit.org>
Update PCM Daemon name
https://bugs.webkit.org/show_bug.cgi?id=230516
In r282883 I updated the daemon name but not in this one place.
I think this might cause TestWebKitAPI.EventAttribution.Daemon to stop timing out on one of the bots.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-09-29 BJ Burg <bburg@apple.com>
[Cocoa] add _WKInspectorExtension SPI to evaluate script on an extension tab
https://bugs.webkit.org/show_bug.cgi?id=230646
<rdar://problem/83420328>
Reviewed by Devin Rousso.
Add a new test to exercise the SPI. The test sets up an _WKInspectorExtension,
creates a tab, evaluates script on the tab, and later reads back the stored value.
Notably, this test would fail if the extension tab is not currently showing.
This is a bug and will be addressed as part of https://bugs.webkit.org/show_bug.cgi?id=230758.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Add new files.
* TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html:
Add inline <script> to set window._secretValue. This is checked by the API test.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: Added.
(resetGlobalState):
(-[UIDelegateForTestingInspectorExtension _webView:didAttachLocalInspector:]):
(-[UIDelegateForTestingInspectorExtension _webView:configurationForLocalInspector:]):
(-[InspectorExtensionDelegateForTestingInspectorExtension inspectorExtension:didShowTabWithIdentifier:]):
(-[InspectorExtensionDelegateForTestingInspectorExtension inspectorExtension:didHideTabWithIdentifier:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:
(-[UIDelegateForTestingInspectorExtensionDelegate _webView:configurationForLocalInspector:]):
(TEST):
Adopt fixes from WKInspectorExtension that allow extension tab content and icons to load.
* TestWebKitAPI/cocoa/TestInspectorURLSchemeHandler.h: Added.
* TestWebKitAPI/cocoa/TestInspectorURLSchemeHandler.mm: Copied from Source/WebKit/UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm.
(-[TestInspectorURLSchemeHandler webView:startURLSchemeTask:]):
(-[TestInspectorURLSchemeHandler webView:stopURLSchemeTask:]):
Add a simple URLSchemeHandler which allows serving test resources from the TestWebKitAPI.resources directory.
This is necessary to test _WKInspectorExtension tabs, which must load their content from a custom URL scheme.
* TestWebKitAPI/cocoa/TestWKWebView.mm:
Fix UnifiedSources fallout by adding a missing include.
2021-09-29 Alex Christensen <achristensen@webkit.org>
Migrate _WKDownload tests from TCPServer to HTTPServer
https://bugs.webkit.org/show_bug.cgi?id=230980
<rdar://82100878>
Reviewed by Chris Dumez.
The former is very picky when it comes to numbers of TCP connections, and causes tests to time out when
the number of connections changes. The latter is more forgiving and runs code on the main thread.
* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(TestWebKitAPI::respondSlowly):
(TestWebKitAPI::downloadAtRate):
(TEST):
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::Connection::send const):
2021-09-29 Matt Lewis <jlewis3@apple.com>
Unreviewed built trigger fix.
* CISupport/build-webkit-org/wkbuild.py:
(_should_file_trigger_build):
* CISupport/build-webkit-org/wkbuild_unittest.py:
(ShouldBuildTest):
(ShouldBuildTest.test_should_build):
2021-09-29 Basuke Suzuki <basuke.suzuki@sony.com>
[PlayStation] Make build-webkit configurable using environment variable
https://bugs.webkit.org/show_bug.cgi?id=230958
Reviewed by Fujii Hironori.
The cmake toolchain file is hard coded in the script. Make it configurable using
environment variable.
* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):
2021-09-29 Youenn Fablet <youenn@apple.com>
WPT importer should create serviceworker template for templated test that have worker as global
https://bugs.webkit.org/show_bug.cgi?id=230943
Reviewed by Jonathan Bedard.
Tests with a worker global should run in all worker global scope (dedicated worker, shared worker and service worker).
Let's add service worker by default for now.
* Scripts/webkitpy/w3c/test_importer.py:
* Scripts/webkitpy/w3c/test_importer_unittest.py:
2021-09-28 BJ Burg <bburg@apple.com>
[Cocoa] Add SPI to select a tab created by _WKInspectorExtension
https://bugs.webkit.org/show_bug.cgi?id=230580
<rdar://problem/83372851>
Reviewed by Devin Rousso.
Create a new test file for _WKInspectorExtensionDelegate. Add a
new test case that exercises creating an extension tab, showing an
extension tab, and uses delegate callbacks for didShowTab/didHideTab.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-TabIcon-30x30.png: Added.
* TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: Added.
(resetGlobalState):
(-[UIDelegateForTestingInspectorExtensionDelegate _webView:didAttachLocalInspector:]):
(-[InspectorExtensionDelegateForTesting inspectorExtension:didShowTabWithIdentifier:]):
(-[InspectorExtensionDelegateForTesting inspectorExtension:didHideTabWithIdentifier:]):
(TEST):
2021-09-28 Kate Cheney <katherine_cheney@apple.com>
PCM: different bundleID entries will override each other
https://bugs.webkit.org/show_bug.cgi?id=230839
Reviewed by Alex Christensen.
API test coverage for the case of existing PCM data with a bundleID
column but an expired unique index.
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(addUnattributedPCMv4):
(addAttributedPCMv4):
(dumpedPCM):
(pollUntilPCMIsMigrated):
(emptyPcmDBPath):
(createAndPopulatePCMObservedDomainTable):
(setUpFromResourceLoadStatisticsDatabase):
(setUpFromPCMDatabase):
(TEST):
(setUp): Deleted.
2021-09-28 Eddy Wong <eddy_wong@apple.com>
Added GlobalSign R3/R5 Root CA cert to webkitcorepy to resolve certain pip module download SSL error.
https://bugs.webkit.org/show_bug.cgi?id=230904
Reviewed by Jonathan Bedard.
* Scripts/libraries/webkitcorepy/webkitcorepy/cacert.pem:
2021-09-28 Youenn Fablet <youenn@apple.com>
Validate DeviceIdHashSaltStorage persistent data
https://bugs.webkit.org/show_bug.cgi?id=230852
<rdar://problem/83615408>
Reviewed by Eric Carlson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
* TestWebKitAPI/Tests/WebKit/invalidDeviceIDHashSalts: Added.
2021-09-28 Chris Dumez <cdumez@apple.com>
Move Cross-Origin-Opener-Policy handling to the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=230812
<rdar://83504842>
Reviewed by Youenn Fablet.
Port COOP API tests from PSONSchemeHandler to HTTPServer. This was necessary since custom scheme handler
loads do not go via the networkProcess (Where COOP handling is now implemented).
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[PSONScheme webView:startURLSchemeTask:]):
* TestWebKitAPI/cocoa/HTTPServer.h:
2021-09-28 Matt Lewis <jlewis3@apple.com>
Move iOS, watchOS, and tvOS queues to latest releases
https://bugs.webkit.org/show_bug.cgi?id=230837
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/config.json:
* CISupport/build-webkit-org/factories_unittest.py:
(TestExpectedBuildSteps):
* CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.ios-simulator-14 img.logo): Deleted.
(table.queue-grid tr.platform.ios-14 img.logo): Deleted.
(table.queue-grid tr.platform.tvos-simulator-14 img.logo): Deleted.
(table.queue-grid tr.platform.tvos-14 img.logo): Deleted.
(table.queue-grid tr.platform.watchos-simulator-7 img.logo): Deleted.
(table.queue-grid tr.platform.watchos-7 img.logo): Deleted.
2021-09-28 Alex Christensen <achristensen@webkit.org>
Mostly fix Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=230868
Reviewed by Don Olmstead.
* DumpRenderTree/PlatformMac.cmake:
* DumpRenderTree/TestNetscapePlugIn/PlatformMac.cmake: Added.
* TestRunnerShared/PlatformMac.cmake: Added.
2021-09-28 Youenn Fablet <youenn@apple.com>
REGRESSION (r283102): [ MacOS Debug ] TestWebKitAPI.WebKit2.CaptureIndicatorDelay is failing
https://bugs.webkit.org/show_bug.cgi?id=230847
<rdar://problem/83577251>
Reviewed by Saam Barati.
As identified by Saam, the promise resolution callback is racing with the stop function.
To prevent this, we check in a loop whether the page has a stream and call stop when that is the case.
* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/getUserMedia.html:
2021-09-28 Geza Lore <gezalore@gmail.com>
Fix rounding issue in run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=230889
Reviewed by Adrian Perez de Castro.
* Scripts/run-jsc-stress-tests:
2021-09-27 Yusuke Suzuki <ysuzuki@apple.com>
[WTF] Add ApproximateTime
https://bugs.webkit.org/show_bug.cgi?id=230876
Reviewed by Filip Pizlo.
* TestWebKitAPI/Tests/WTF/Time.cpp:
(WTF::operator<<):
(TestWebKitAPI::TEST):
2021-09-27 Saam Barati <sbarati@apple.com>
Build an unlinked baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=229223
<rdar://problem/82321772>
Reviewed by Yusuke Suzuki.
* Scripts/run-jsc-stress-tests:
2021-09-27 Sam Sneddon <gsnedders@apple.com>
Port._natural_sort_key should sort a01 before a001
https://bugs.webkit.org/show_bug.cgi?id=230764
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/port/base.py:
(Port._natural_sort_key):
* Scripts/webkitpy/port/base_unittest.py:
(NaturalCompareTest.test_natural_compare):
(KeyCompareTest.test_test_key):
2021-09-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r283102, r283103 and r283104.
https://bugs.webkit.org/show_bug.cgi?id=230854
It regresses JetStream2 on iOS devices
Reverted changesets:
"Build an unlinked baseline JIT"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283102
"Unreviewed, fix CLoop build"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283103
"Unreviewed, fix CLoop build part 2"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283104
2021-09-27 Jonathan Bedard <jbedard@apple.com>
Exception in run-webkit-tests: Bad file descriptor (Revert)
https://bugs.webkit.org/show_bug.cgi?id=229994
<rdar://problem/82826083>
Unreviewed revert.
Revert of 241391@main, 241474@main, 241546@main and 241782@main
* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.rmtree):
* Scripts/webkitpy/port/server_process.py:
(ServerProcess.write):
(ServerProcess._wait_for_data_and_update_buffers_using_select):
* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess):
(SimulatorProcess._start):
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.launch_app):
2021-09-27 Youenn Fablet <youenn@apple.com>
Make sure to reset presenting application pid in case of mediaserverd crash
https://bugs.webkit.org/show_bug.cgi?id=230822
<rdar://83474184>
Reviewed by Eric Carlson.
Add test runner API to crash GPUProcess.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::terminateGPUProcess):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::terminateGPUProcess):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2021-09-27 Hoa Dinh <dvh@apple.com>
prepare-ChangeLog does not show the correct result with using --git-commit
https://bugs.webkit.org/show_bug.cgi?id=230816
Reviewed by Jonathan Bedard.
When we pass the parameter --git-commit, we need to use the correct reference version when
computing the difference between the version before and after the change.
This patch fixes it by passing the version before the specified commit.
Also, when --git-commit is used, we need compare against the correct version of the file.
This patch fixes that part by calling git to retrieve the accurate version.
* Scripts/prepare-ChangeLog:
(originalFile):
(generateFunctionLists):
2021-09-27 Saam Barati <sbarati@apple.com>
Build an unlinked baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=229223
<rdar://problem/82321772>
Reviewed by Yusuke Suzuki.
* Scripts/run-jsc-stress-tests:
2021-09-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r283083 and r283088.
https://bugs.webkit.org/show_bug.cgi?id=230806
Windows pors are crashing
Reverted changesets:
"Build an unlinked baseline JIT"
https://bugs.webkit.org/show_bug.cgi?id=229223
https://commits.webkit.org/r283083
"Make byte codes with arithmetic profiles switch to using an
index instead of a pointer in metadata"
https://bugs.webkit.org/show_bug.cgi?id=230798
https://commits.webkit.org/r283088
2021-09-25 Lauro Moura <lmoura@igalia.com>
[GLIB] Use less parallel webviews in the uri-scheme API test for WPE and debug builds
https://bugs.webkit.org/show_bug.cgi?id=230783
Reviewed by Michael Catanzaro.
The WPE bots are timing out due to the reasons already mentioned in
bug230556 and bug229116, and GTK-Debug is flaky timing out.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testWebContextURIScheme):
2021-09-24 Jonathan Bedard <jbedard@apple.com>
[run-webkit-tests] Use Python 3 (Revert)
https://bugs.webkit.org/show_bug.cgi?id=226658
<rdar://problem/78882016>
Unreviewed revert.
When running run-webkit-tests with Python 3, our simulator often
encounter https://bugs.webkit.org/show_bug.cgi?id=230513. Until we
resolve this bug, we must use Python 2 to run run-webkit-tests.
* CISupport/build-webkit-org/steps.py:
(RunWebKitTests):
* CISupport/build-webkit-org/steps_unittest.py:
* CISupport/ews-build/steps.py:
(RunWebKitTests):
* CISupport/ews-build/steps_unittest.py:
(test_success):
(test_warnings):
* Scripts/run-webkit-tests:
2021-09-24 Aakash Jain <aakash_jain@apple.com>
Gracefully handle security bugs in apply-watchlist
https://bugs.webkit.org/show_bug.cgi?id=229961
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla._parse_bug_dictionary_from_xml):
(Bugzilla.fetch_bug):
2021-09-24 Sam Sneddon <gsnedders@apple.com>
LayoutTestFinder should return tests in order
https://bugs.webkit.org/show_bug.cgi?id=230684
Reviewed by Jonathan Bedard.
It has always been intended that LayoutTestFinder return tests in a deterministic order;
however, a bug in find_files means that directories found by glob aren't sorted, and hence
running run-webkit-tests with no arguments ends up running the top-level directories in a
non-deterministic order.
* Scripts/webkitpy/common/find_files.py:
(_normalized_find):
(_normalized_find.sort_by_directory_key):
* Scripts/webkitpy/common/find_files_unittest.py:
(TestWinNormalize.assert_filesystem_normalizes):
(TestWinNormalize.test_win):
(TestFindFiles):
(TestFindFiles.test_directory_sort_key):
(TestFindFiles.test_directory_sort_key_with_paths):
2021-09-24 Youenn Fablet <youenn@apple.com>
<video> element rendered incorrectly when provided with a portrait orientation stream in Safari 15
https://bugs.webkit.org/show_bug.cgi?id=229792
<rdar://problem/82776741>
Reviewed by Eric Carlson.
Add testRunner API to take a view port snapshot as a PNG data URL.
We can then use this data URL to validate some rendered pixel values.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::takeViewPortSnapshot):
(WTR::TestRunner::viewPortSnapshotTaken):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::takeViewPortSnapshot):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::takeViewPortSnapshot):
2021-09-24 Philippe Normand <pnormand@igalia.com>
REGRESSION(r282742): Broke IceCC builds
https://bugs.webkit.org/show_bug.cgi?id=230547
Reviewed by Sergio Villar Senin.
There's no need to check the default IceCC toolchain exists, we can't do that from the host
anyway because their path is a sandbox path. Additionally we now check host paths supplied
through $ICECC_VERSION_OVERRIDE and ICECC_VERSION_APPEND.
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
2021-09-24 Youenn Fablet <youenn@apple.com>
[IOS 15] Video track does not get unmuted in case of tab was inactive less than ~500 ms
https://bugs.webkit.org/show_bug.cgi?id=230538
<rdar://problem/83355705>
Reviewed by Eric Carlson.
Add mock API to mock camera interruption.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMockCameraIsInterrupted):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setMockCameraIsInterrupted):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2021-09-23 Andres Gonzalez <andresg_22@apple.com>
Remove AXDRTElementIdAttribute from the AX object platform wrapper interface.
https://bugs.webkit.org/show_bug.cgi?id=230657
<rdar://problem/83424767>
Reviewed by Chris Fleizach.
AXDRTElementIdAttribute is a duplicate of AXDOMIdentifier, thus removing
an unnecessary attribute from the platform wrapper's
accessibilityAttributeValue method, and making the corresponding change
to the DRT and WTR accessibilityControllers.
* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(findAccessibleObjectById):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(findAccessibleObjectById):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::findAccessibleObjectById):
2021-09-23 Sergio Villar Senin <svillar@igalia.com>
[Flatpak] Use NUMBER_OF_PROCESSORS if already defined
https://bugs.webkit.org/show_bug.cgi?id=230638
Reviewed by Martin Robinson.
The environment variable NUMBER_OF_PROCESSORS can be defined to instruct the build system
to spawn as many concurrent build commands as specified. By default flatpak was using 3x the number
of processors in the local system. However we might prefer to provide a more convenient number
by using the environment variable. Note that this approach is better than passing -j as
--makeargs because cmake would have to be reconfigured everytime the number passed to -j changes.
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox): Use NUMBER_OF_PROCESSORS if already defined. Otherwise fallback
to 3x the number of processors.
2021-09-23 Chris Lord <clord@igalia.com>
[GTK] Allow sending precise mouse wheel events in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=230541
Reviewed by Tim Horton.
Add API to be able to send precise mouse-wheel events in EventSender.
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::setWheelHasPreciseDeltas):
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::toWebKitGLibAPI):
(WTR::EventSenderProxy::~EventSenderProxy):
(WTR::EventSenderProxy::setWheelHasPreciseDeltas):
2021-09-22 Alex Christensen <achristensen@webkit.org>
PCM should include the bundle ID of the app from which it originated
https://bugs.webkit.org/show_bug.cgi?id=230576
<rdar://83065221>
Reviewed by Kate Cheney.
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(pollUntilPCMIsMigrated):
2021-09-22 Alex Christensen <achristensen@webkit.org>
Move PCMDaemon to WebKit.framework and rename it to AdAttributionDaemon
https://bugs.webkit.org/show_bug.cgi?id=230516
Reviewed by Brent Fulgham.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::testPCMDaemonLocation):
2021-09-22 Brady Eidson <beidson@apple.com>
Disable FTP.
<rdar://81193860> and https://bugs.webkit.org/show_bug.cgi?id=230477
Reviewed by Geoff Garen.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/BundlePageConsoleMessage.mm: Added.
(willAddMessageToConsoleCallback):
(-[BundlePageConsoleMessage webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/FTP.mm: Added.
(TestWebKitAPI::didReceivePageMessageFromInjectedBundle):
(TestWebKitAPI::setInjectedBundleClient):
(TestWebKitAPI::TEST):
* TestWebKitAPI/PlatformUtilities.h:
* TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm:
(TestWebKitAPI::Util::toNS):
2021-09-22 Philippe Normand <pnormand@igalia.com>
[Flatpak SDK] Switch runtime to 21.08 SDK
https://bugs.webkit.org/show_bug.cgi?id=229919
Reviewed by Michael Catanzaro.
Upgrade SDK runtime to the 21.08 branch.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
* flatpak/flatpakutils.py:
(WebkitFlatpak.__init__):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.main):
(WebkitFlatpak.check_installed_packages):
(WebkitFlatpak._get_dependency_packages):
(WebkitFlatpak.install_all):
2021-09-22 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r282082): [GTK] Tests timeout when using xvfb after r282082
https://bugs.webkit.org/show_bug.cgi?id=230610
Reviewed by Philippe Normand.
r282082 changed the way xvfb is spawned by providing a PIPE for stdout and stderr instead of redirecting to
/dev/null. The problem is that stderr is only read in case of execution failure, so when nothing fails we end up
filling the buffer that is never read. We can try to find a better solution to show the stderr output in error
messages, but for now we can revert that part to redirect stderr to /dev/null to make the tests work again.
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._xvfb_run):
(XvfbDriver._xvfb_check_if_ready):
2021-09-21 Chris Dumez <cdumez@apple.com>
Drop makeRefPtr() and use RefPtr { } directly instead
https://bugs.webkit.org/show_bug.cgi?id=230564
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WTF/RunLoop.cpp:
(TestWebKitAPI::TEST):
2021-09-21 David Kilzer <ddkilzer@apple.com>
Rename {checked,dynamic}_ns_cast<> to {checked,dynamic}_objc_cast<>
<https://webkit.org/b/230508>
<rdar://problem/83323145>
Reviewed by Brent Fulgham.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Update for rename of TypeCastsNS.h to TypeCastsCocoa.h.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm: Rename from TypeCastsNS.mm.
(TestWebKitAPI::TEST):
- Update for rename.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
- Import <wtf/cocoa/TypeCastsCocoa.h> for future move of
WTF::dynamic_objc_cast<> from RetainPtr.h to that header.
2021-09-21 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com>
[PlayStation][MiniBrowser] Remove WebKit private header include
https://bugs.webkit.org/show_bug.cgi?id=230183
Reviewed by Ross Kirsling.
* MiniBrowser/playstation/main.cpp:
Remove config.h and wtf/Platform.h include directive.
PlayStation MiniBrowser is expected to be independent of WebKit
private headers (i.e. it should depend only on WK API.) in order to
ensure that we can make a WebBrowser without those headers.
2021-09-21 Philip Chimento <pchimento@igalia.com>
Add LLVM/FLang's int128_t implementation to WTF
https://bugs.webkit.org/show_bug.cgi?id=230437
Added tests for Int128 and LeadingZeroBitCount copied from LLVM's tests,
reformatted according to WebKit style.
Reviewed by Yusuke Suzuki.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/Int128.cpp: Added.
(TestWebKitAPI::TestUnary):
(TestWebKitAPI::TestBinary):
(TestWebKitAPI::TEST):
(TestWebKitAPI::ToNative):
(TestWebKitAPI::FromNative):
(TestWebKitAPI::TestVsNative):
* TestWebKitAPI/Tests/WTF/LeadingZeroBitCount.cpp: Added.
(countWithTwoShiftedBits):
(TEST):
2021-09-21 Phillip Mates <pmates@igalia.com>
Fix JSC test runner warnings and errors on linux
https://bugs.webkit.org/show_bug.cgi?id=230218
Reviewed by Jonathan Bedard.
Fixed the following warning that arises in many scripts when they are
run on Linux:
`Can't exec "xcodebuild": No such file or directory at
/home/mates/igalia/WebKit/Tools/Scripts/webkitdirs.pm line 634.`
Fixed `run-javascriptcore-tests` on Linux, which was failing to invoke
builds before running the test suite with the error:
`Unrecognized option `--64-bit'`
* Scripts/webkitdirs.pm:
(XcodeOptions):
(determineIsWin64):
(determineIsWin64FromArchitecture): Deleted.
2021-09-21 Carlos Garcia Campos <cgarcia@igalia.com>
[webkitcorepy] Fail to parse python required version when there's a space between operator and version
https://bugs.webkit.org/show_bug.cgi?id=230549
Reviewed by Jonathan Bedard.
Add optional space between operator and version expression in regular expression.
* Scripts/libraries/webkitcorepy/webkitcorepy/version.py:
(Version):
2021-09-20 Chris Dumez <cdumez@apple.com>
Reduce use of makeRefPtr() and use RefPtr { } directly
https://bugs.webkit.org/show_bug.cgi?id=230503
Reviewed by Geoffrey Garen.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):
(WTR::UIScriptControllerIOS::sendEventStream):
(WTR::UIScriptControllerIOS::dragFromPointToPoint):
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::activateDataListSuggestion):
2021-09-20 Michael Catanzaro <mcatanzaro@gnome.org>
WebKit might load custom URI scheme request content multiple times
https://bugs.webkit.org/show_bug.cgi?id=229116
Reviewed by Brady Eidson.
Let's load the same URL 50 times and make sure all loads complete with the same content.
Without the fix, the test hangs forever spinning its main loop, because only a few of the
requests actually complete, so the test gets stuck waiting.
Note I picked 50 because when running the test 100 times, wpebackend-fdo dies to an
unrelated problem: its internal Wayland registry stops registering new global objects, and
each new web process starts crashing. That's weird, but not the problem we're trying to
solve today.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(createTestWebViewWithWebContext):
(testWebContextURIScheme):
2021-09-20 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Move FileLock from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=230320
<rdar://problem/83168826>
Reviewed by Dewei Zhu.
Move FileLock from webkitpy into webkitcorepy, implement FileLock as a more
modern Python API.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/file_lock.py: Added.
(FileLock):
(FileLock.__init__):
(FileLock.acquired): Check if the current process has acquired the lock.
(FileLock.acquire): Attempt to acquire lockfile.
(FileLock.release): Release lockfile, if this process owns the lock.
(FileLock.__enter__): Invoke acquire.
(FileLock.__exit__): Invoke release.
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/__init__.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/file_lock.py: Copied from Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/__init__.py.
(FileLock): Single-thread stub implementation of FileLock for testing without a filesystem.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/file_lock_unittest.py: Added.
(FileLockTestCase):
(FileLockTestCase.__init__):
(FileLockTestCase.setUp):
(FileLockTestCase.tearDown):
(FileLockTestCase.test_basic):
(FileLockTestCase.test_locked):
(FileLockTestCase.test_locked_timeout):
(FileLockTestCase.test_double):
* Scripts/webkitpy/common/system/file_lock.py: Removed.
* Scripts/webkitpy/common/system/file_lock_integrationtest.py: Removed.
* Scripts/webkitpy/common/system/systemhost.py:
(SystemHost.make_file_lock): Use webkitcorepy's FileLock.
* Scripts/webkitpy/common/system/systemhost_mock.py:
(MockSystemHost.make_file_lock): Use webkitcorepy's mocks.FileLock.
* Scripts/webkitpy/tool/commands/rebaseline.py:
(RebaselineTest._update_expectations_file): Use webkitcorepy's FileLock.
2021-09-20 Brent Fulgham <bfulgham@apple.com>
Remove XSS Auditor: Part 1 (Turn off by default)
https://bugs.webkit.org/show_bug.cgi?id=230483
<rdar://problem/83310922>
Reviewed by Yusuke Suzuki.
* TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
(TestWebKitAPI::TEST): Switch expectation for XSS Auditor.
2021-09-20 Antti Koivisto <antti@apple.com>
[LFC][Integration] Enable selections
https://bugs.webkit.org/show_bug.cgi?id=230463
Reviewed by Alan Bujtas.
* TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
(TestWebKitAPI::TEST):
2021-09-20 Chris Dumez <cdumez@apple.com>
Stop using makeRef(*this) / makeRefPtr(this)
https://bugs.webkit.org/show_bug.cgi?id=230464
Reviewed by Alex Christensen.
* DumpRenderTree/TestRunner.cpp:
(TestRunner::callUIScriptCallback):
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::doAsyncTask):
(WTR::UIScriptControllerIOS::zoomToScale):
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::doAsyncTask):
(WTR::UIScriptControllerMac::activateDataListSuggestion):
(WTR::UIScriptControllerMac::removeViewFromWindow):
(WTR::UIScriptControllerMac::addViewToWindow):
* DumpRenderTree/win/UIScriptControllerWin.cpp:
(WTR::UIScriptControllerWin::doAsyncTask):
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::H2::Connection::receive const):
* WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
(WTR::UIScriptControllerCocoa::setDidShowContextMenuCallback):
(WTR::UIScriptControllerCocoa::setDidDismissContextMenuCallback):
* WebKitTestRunner/gtk/UIScriptControllerGtk.cpp:
(WTR::UIScriptControllerGtk::doAsyncTask):
(WTR::UIScriptControllerGtk::activateAtPoint):
(WTR::UIScriptControllerGtk::removeViewFromWindow):
(WTR::UIScriptControllerGtk::addViewToWindow):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::doAfterPresentationUpdate):
(WTR::UIScriptControllerIOS::doAfterNextStablePresentationUpdate):
(WTR::UIScriptControllerIOS::ensurePositionInformationIsUpToDateAt):
(WTR::UIScriptControllerIOS::doAfterVisibleContentRectUpdate):
(WTR::UIScriptControllerIOS::zoomToScale):
(WTR::UIScriptControllerIOS::retrieveSpeakSelectionContent):
(WTR::UIScriptControllerIOS::simulateAccessibilitySettingsChangeNotification):
(WTR::UIScriptControllerIOS::touchDownAtPoint):
(WTR::UIScriptControllerIOS::liftUpAtPoint):
(WTR::UIScriptControllerIOS::twoFingerSingleTapAtPoint):
(WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):
(WTR::UIScriptControllerIOS::doubleTapAtPoint):
(WTR::UIScriptControllerIOS::stylusDownAtPoint):
(WTR::UIScriptControllerIOS::stylusMoveToPoint):
(WTR::UIScriptControllerIOS::stylusUpAtPoint):
(WTR::UIScriptControllerIOS::stylusTapAtPointWithModifiers):
(WTR::UIScriptControllerIOS::longPressAtPoint):
(WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard):
(WTR::UIScriptControllerIOS::dismissFilePicker):
(WTR::UIScriptControllerIOS::applyAutocorrection):
(WTR::UIScriptControllerIOS::simulateRotation):
(WTR::UIScriptControllerIOS::simulateRotationLikeSafari):
(WTR::UIScriptControllerIOS::setDidStartFormControlInteractionCallback):
(WTR::UIScriptControllerIOS::setDidEndFormControlInteractionCallback):
(WTR::UIScriptControllerIOS::setWillBeginZoomingCallback):
(WTR::UIScriptControllerIOS::setDidEndZoomingCallback):
(WTR::UIScriptControllerIOS::setDidShowKeyboardCallback):
(WTR::UIScriptControllerIOS::setDidHideKeyboardCallback):
(WTR::UIScriptControllerIOS::setWillStartInputSessionCallback):
(WTR::UIScriptControllerIOS::chooseMenuAction):
(WTR::UIScriptControllerIOS::setWillPresentPopoverCallback):
(WTR::UIScriptControllerIOS::setDidDismissPopoverCallback):
(WTR::UIScriptControllerIOS::setDidEndScrollingCallback):
(WTR::UIScriptControllerIOS::activateDataListSuggestion):
(WTR::UIScriptControllerIOS::doAfterDoubleTapDelay):
(WTR::UIScriptControllerIOS::installTapGestureOnWindow):
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::zoomToScale):
(WTR::UIScriptControllerMac::simulateAccessibilitySettingsChangeNotification):
(WTR::UIScriptControllerMac::chooseMenuAction):
(WTR::UIScriptControllerMac::activateAtPoint):
* WebKitTestRunner/win/UIScriptControllerWin.cpp:
(WTR::UIScriptControllerWin::doAsyncTask):
* WebKitTestRunner/wpe/UIScriptControllerWPE.cpp:
(WTR::UIScriptControllerWPE::doAsyncTask):
(WTR::UIScriptControllerWPE::activateAtPoint):
(WTR::UIScriptControllerWPE::removeViewFromWindow):
(WTR::UIScriptControllerWPE::addViewToWindow):
2021-09-20 Philippe Normand <pnormand@igalia.com>
[Flatpak SDK] Move toolchains to UserFlatpak and improve SDK upgrades
https://bugs.webkit.org/show_bug.cgi?id=230201
Reviewed by Carlos Alberto Lopez Perez.
As toolchain archives depend on the SDK runtime, it makes sense to move them in the
corresponding UserFlatpak folder, so that when SDK is upgraded, stale toolchains are
removed. The SDK upgrade is also now handling cached SSCache authentication tokens and
propagating those in the newly installed SDK. Finally, SDK upgrades will now also clear
CMake cache files on WebKit builds, so that hopefully, existing build directories no longer
need to be manually removed.
* flatpak/flatpakutils.py:
(WebkitFlatpak.__init__):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.setup_gstbuild):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.main):
(WebkitFlatpak.acquire_sccache_auth_token_from_config_file):
(WebkitFlatpak.save_config):
2021-09-17 Chris Dumez <cdumez@apple.com>
[ macOS Release ] TestWebKitAPI.NetworkProcess.BroadcastChannelCrashRecovery is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=230430
<rdar://problem/83256307>
Reviewed by Alex Christensen.
I suspect that the flakiness is due to the BroadcastChannel.postMessage() sometimes failing right
after we kill the network process and relaunch it. I believe this could happen because the test
was only making sure that `[[WKWebsiteDataStore defaultDataStore] _networkProcessIdentifier]`
changed. This meant that the UIProcess was indeed notified that the network process crashed and
that a new one was relaunched. However, this doesn't necessarily indicate that the view's
WebProcesses were notified yet. As a result, when we evaluate JS to post a message on a
BroadcastChannel, the WebProcess could potentially still try to send the IPC via the
IPC::Connection for the old network process.
To try and address this race, I am adding code to wait until cookie synchronization is
working across both web views before I try posting the message. Because cookie synchronization
involves the network process and both WebProcesses, once this happens, we know that both
WebProcesses are properly connected to the new NetworkProcess.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(waitUntilNetworkProcessIsResponsive):
(TEST):
2021-09-17 Kevin Neal <kevin_neal@apple.com>
[results.webkit.org] Add ability to access Bugzilla and Radar links from commit messages
https://bugs.webkit.org/show_bug.cgi?id=229160
Reviewed by Jonathan Bedard.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/css/tooltip.css:
(.tooltip-content hr):
(@media (prefers-color-scheme: dark) .tooltip-content hr):
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:
(Commit):
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(xAxisFromScale):
2021-09-17 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Reset author time when editing commits (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=230224
<rdar://problem/83065417>
Unreviewed follow-up fix.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.pull): We can't update SVN if the HEAD commit does not have a revision.
2021-09-17 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Refactor PR branch management
https://bugs.webkit.org/show_bug.cgi?id=230432
<rdar://problem/83258413>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch): Specify that the 'eng' prefix is for pull-requests.
(Branch.normalize_branch_name): Normalized branch names should consider other developement prefixes.
(Branch.editable): Check if a branch is editable. Only includes development branches at the moment,
will include commit-queue in the near future.
(Branch.branch_point): Moved from pull_request.py.
(Branch.main):
(Branch.normalize_issue): Renamed normalize_branch_name.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull.py:
(Pull.main): branch_point is now owned Branch command.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Match DEV_BRANCHES instead of PREFIX, branch_point is now owned Branch command.
(PullRequest.branch_point): Moved to branch.py.
2021-09-17 Kate Cheney <katherine_cheney@apple.com>
Remove unnecessary ITP memory store code
https://bugs.webkit.org/show_bug.cgi?id=229512
<rdar://problem/82644309>
Reviewed by John Wilander.
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):
Deleted an extra memory store test leftover from when we still had
a functioning memory store. Now it is just a duplicate of the database
test, so we can remove it.
2021-09-17 Alex Christensen <achristensen@webkit.org>
REGRESSION: [ iOS ] 5 TestWebKitAPI.WebpagePreferences.* api tests are flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=229094
Reviewed by Chris Dumez.
Disable the tests on iOS until we can fix the problem.
This will help EWS be much faster and more reliable.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(TEST):
2021-09-17 Geza Lore <gezalore@gmail.com>
Speed up run-jsc-stress-tests with parallel processing
https://bugs.webkit.org/show_bug.cgi?id=230251
Reviewed by Yusuke Suzuki.
Around 2/3 of the time spent in the initial serial processing phase of
run-jsc-stress-tests is simply writing out the many test runner
scripts to disk, which is trivially parallelizable. The change in this
patch forks sub-processes to emit the test runner scripts which makes
the serial startup phase overall about 2.5x faster on my test machine
(47 sec -> 19 sec).
* Scripts/run-jsc-stress-tests:
2021-09-17 Lauro Moura <lmoura@igalia.com>
REGRESSION(r275267) [GLIB] API test /webkit/WebKitWebsiteData/configuration is failing
https://bugs.webkit.org/show_bug.cgi?id=224175
Reviewed by Carlos Garcia Campos.
Some WebsiteData tests rely on checking whether some specific files
are created in the background. Currently, this is done through
waitUntilFileChanged(), which first g_file_query() whether the file
exists before entering a main loop which uses GFileMonitor. While this
worked most of the time, some tests were flaky due to likely the file
being created between the query call and the monitoring starting,
especially after revisions like r275267.
This commit replaces the waitUntilFileChanged calls with an explicit
check loop, like was done for the applicationCache file in the
configuration test.
Also, for the ITP test, there's no need to check for the file to be
deleted, as the ResourceLoadStatistics just clears the database and
recreates the schema, reusing the existing file.
Covered by existing tests.
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration):
(testWebsiteDataITP):
(testWebsiteDataDOMCache):
* TestWebKitAPI/glib/TestExpectations.json:
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::assertFileIsCreated):
(WebViewTest::assertJavaScriptBecomesTrue):
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
2021-09-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][a11y] Add a build option to enable ATSPI
https://bugs.webkit.org/show_bug.cgi?id=230254
Reviewed by Adrian Perez de Castro.
Add stubs for WTR accessibility implementation.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isIsolatedObject const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(WTR::AccessibilityUIElement::platformUIElement):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp: Added.
(WTR::AccessibilityController::resetToConsistentState):
(WTR::AccessibilityController::accessibleElementById):
(WTR::AccessibilityController::platformName):
(WTR::AccessibilityController::injectAccessibilityPreference):
(WTR::AccessibilityController::rootElement):
(WTR::AccessibilityController::focusedElement):
(WTR::AccessibilityController::addNotificationListener):
(WTR::AccessibilityController::removeNotificationListener):
(WTR::AccessibilityController::updateIsolatedTreeMode):
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: Added.
(WTR::AccessibilityUIElement::AccessibilityUIElement):
(WTR::AccessibilityUIElement::~AccessibilityUIElement):
(WTR::AccessibilityUIElement::isEqual):
(WTR::AccessibilityUIElement::getChildren):
(WTR::AccessibilityUIElement::getChildrenWithRange):
(WTR::AccessibilityUIElement::childrenCount):
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::indexOfChild):
(WTR::AccessibilityUIElement::childAtIndex):
(WTR::AccessibilityUIElement::linkedUIElementAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
(WTR::AccessibilityUIElement::disclosedRowAtIndex):
(WTR::AccessibilityUIElement::rowAtIndex):
(WTR::AccessibilityUIElement::selectedChildAtIndex const):
(WTR::AccessibilityUIElement::selectedChildrenCount const):
(WTR::AccessibilityUIElement::selectedRowAtIndex):
(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::parentElement):
(WTR::AccessibilityUIElement::disclosedByRow):
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
(WTR::AccessibilityUIElement::attributesOfDocumentLinks):
(WTR::AccessibilityUIElement::attributesOfChildren):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue const):
(WTR::AccessibilityUIElement::rowHeaders const):
(WTR::AccessibilityUIElement::columnHeaders const):
(WTR::AccessibilityUIElement::uiElementAttributeValue const):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSettable):
(WTR::AccessibilityUIElement::isAttributeSupported):
(WTR::AccessibilityUIElement::parameterizedAttributeNames):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::y):
(WTR::AccessibilityUIElement::width):
(WTR::AccessibilityUIElement::height):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::intValue const):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::insertionPointLineNumber):
(WTR::AccessibilityUIElement::isPressActionSupported):
(WTR::AccessibilityUIElement::isIncrementActionSupported):
(WTR::AccessibilityUIElement::isDecrementActionSupported):
(WTR::AccessibilityUIElement::isEnabled):
(WTR::AccessibilityUIElement::isRequired const):
(WTR::AccessibilityUIElement::isFocused const):
(WTR::AccessibilityUIElement::isSelected const):
(WTR::AccessibilityUIElement::isSelectedOptionActive const):
(WTR::AccessibilityUIElement::isExpanded const):
(WTR::AccessibilityUIElement::isChecked const):
(WTR::AccessibilityUIElement::isIndeterminate const):
(WTR::AccessibilityUIElement::hierarchicalLevel const):
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::ariaDropEffects const):
(WTR::AccessibilityUIElement::lineForIndex):
(WTR::AccessibilityUIElement::rangeForLine):
(WTR::AccessibilityUIElement::rangeForPosition):
(WTR::AccessibilityUIElement::boundsForRange):
(WTR::AccessibilityUIElement::stringForRange):
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::selectTextWithCriteria):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfColumns):
(WTR::AccessibilityUIElement::attributesOfRows):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::rowCount):
(WTR::AccessibilityUIElement::columnCount):
(WTR::AccessibilityUIElement::indexInTable):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar const):
(WTR::AccessibilityUIElement::verticalScrollbar const):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::setSelectedTextRange):
(WTR::AccessibilityUIElement::increment):
(WTR::AccessibilityUIElement::decrement):
(WTR::AccessibilityUIElement::showMenu):
(WTR::AccessibilityUIElement::press):
(WTR::AccessibilityUIElement::setSelectedChild const):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const):
(WTR::AccessibilityUIElement::removeSelectionAtIndex const):
(WTR::AccessibilityUIElement::clearSelectedChildren const):
(WTR::AccessibilityUIElement::accessibilityValue const):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::addNotificationListener):
(WTR::AccessibilityUIElement::removeNotificationListener):
(WTR::AccessibilityUIElement::isFocusable const):
(WTR::AccessibilityUIElement::isSelectable const):
(WTR::AccessibilityUIElement::isMultiSelectable const):
(WTR::AccessibilityUIElement::isVisible const):
(WTR::AccessibilityUIElement::isOffScreen const):
(WTR::AccessibilityUIElement::isCollapsed const):
(WTR::AccessibilityUIElement::isIgnored const):
(WTR::AccessibilityUIElement::isSingleLine const):
(WTR::AccessibilityUIElement::isMultiLine const):
(WTR::AccessibilityUIElement::hasPopup const):
(WTR::AccessibilityUIElement::takeFocus):
(WTR::AccessibilityUIElement::takeSelection):
(WTR::AccessibilityUIElement::addSelection):
(WTR::AccessibilityUIElement::removeSelection):
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForElement):
(WTR::AccessibilityUIElement::textMarkerRangeLength):
(WTR::AccessibilityUIElement::previousTextMarker):
(WTR::AccessibilityUIElement::nextTextMarker):
(WTR::AccessibilityUIElement::stringForTextMarkerRange):
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForBounds):
(WTR::AccessibilityUIElement::startTextMarkerForBounds):
(WTR::AccessibilityUIElement::textMarkerForPoint):
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute):
(WTR::AccessibilityUIElement::indexForTextMarker):
(WTR::AccessibilityUIElement::isTextMarkerValid):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::scrollToMakeVisible):
(WTR::AccessibilityUIElement::scrollToGlobalPoint):
(WTR::AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
(WTR::AccessibilityUIElement::supportedActions const):
(WTR::AccessibilityUIElement::pathDescription const):
(WTR::AccessibilityUIElement::mathPostscriptsDescription const):
(WTR::AccessibilityUIElement::mathPrescriptsDescription const):
(WTR::AccessibilityUIElement::classList const):
(WTR::AccessibilityUIElement::characterAtOffset):
(WTR::AccessibilityUIElement::wordAtOffset):
(WTR::AccessibilityUIElement::lineAtOffset):
(WTR::AccessibilityUIElement::sentenceAtOffset):
(WTR::AccessibilityUIElement::replaceTextInRange):
(WTR::AccessibilityUIElement::insertText):
(WTR::AccessibilityUIElement::popupValue const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::updateIsolatedTreeMode):
* WebKitTestRunner/PlatformGTK.cmake:
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
2021-09-16 David Kilzer <ddkilzer@apple.com>
WebKit::WebProcessPool should use a weak observer with CFNotificationCenter
<https://webkit.org/b/230227>
<rdar://problem/83067708>
Reviewed by Darin Adler.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Add TypeCastsNS.mm to the project.
* TestWebKitAPI/Tests/WTF/cocoa/TypeCastsNS.mm: Add.
(TestWebKitAPI::TEST): Add tests for <wtf/TypeCastsNS.h>.
2021-09-16 Philip Chimento <pchimento@igalia.com>
Fixes for build-webkit --minimal
https://bugs.webkit.org/show_bug.cgi?id=229780
Reviewed by Fujii Hironori.
Remove ENABLE_RESIZE_OBSERVER build-time option. This option is
quite broken if you try to disable it.
* Scripts/webkitperl/FeatureList.pm:
2021-09-16 Jonathan Bedard <jbedard@apple.com>
Exception in run-webkit-tests: Bad file descriptor (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=229994
<rdar://problem/82826083>
Reviewed by Stephanie Lewis.
* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess):
(SimulatorProcess._start): Retry app start if OSError is caught when constructing stdout/stdin/stderr.
2021-09-16 Megan Gardner <megan_gardner@apple.com>
Fix TestWebKitAPI.WebKit.AppHighlightsInImageOverlays to work with changing menu states.
https://bugs.webkit.org/show_bug.cgi?id=230363
rdar://82099562
Reviewed by Wenson Hsieh.
The tests assumes that both menu items would be available, but that was changed to be based on the visibility
of the quick note window, so update the test accordingly.
* TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:
(TEST):
2021-09-16 Youenn Fablet <youenn@apple.com>
Add an option to disable linter in WPT test exporter
https://bugs.webkit.org/show_bug.cgi?id=230345
Reviewed by Jonathan Bedard.
Some existings WPT tests are failing the linter.
While we should probably try to restrict linter to test files actually modified, let's add an option to disable linter for now.
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.do_export):
(parse_args):
2021-09-16 Hoa Dinh <dvh@apple.com>
Allow use of --git-index and --git-commit at the same time when using with --only-files
https://bugs.webkit.org/show_bug.cgi?id=230328
Reviewed by Jonathan Bedard.
When specifying --git-index and --git-commit, it will compute the diff between the parent commit of the specified commit
and HEAD, including the current staged changes.
* Scripts/prepare-ChangeLog:
(main):
(diffFromToString):
2021-09-16 Tyler Wilcock <twilco.o@protonmail.com> and Myles C. Maxfield <mmaxfield@apple.com>
font-weight should always serialize as a number
https://bugs.webkit.org/show_bug.cgi?id=214230
<rdar://problem/65623540>
Reviewed by Antti Koivisto.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
* TestWebKitAPI/Tests/mac/FontManagerTests.mm:
2021-09-15 Philip Chimento <pchimento@igalia.com>
Fixes for build-webkit --minimal
https://bugs.webkit.org/show_bug.cgi?id=229780
Reviewed by Fujii Hironori.
Remove ENABLE_INTERSECTION_OBSERVER build-time option. This option is
quite broken if you try to disable it.
* Scripts/webkitperl/FeatureList.pm: Remove intersection-observer option
2021-09-15 Philip Chimento <pchimento@igalia.com>
Fixes for build-webkit --minimal
https://bugs.webkit.org/show_bug.cgi?id=229780
Reviewed by Fujii Hironori.
Remove the fast-jit-permissions, legacy-css-vendor-prefixes,
webassembly-streaming-api, and webgpu options. These don't seem to exist
anymore within the codebase and print an error if they are used.
* Scripts/webkitperl/FeatureList.pm:
2021-09-15 Chris Dumez <cdumez@apple.com>
Implement network process crash recovery for BroadcastChannel
https://bugs.webkit.org/show_bug.cgi?id=230236
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(-[BroadcastChannelMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):
2021-09-15 Tim Horton <timothy_horton@apple.com>
Remove the "core.webKitBranchBuild" prompt from setup-git-clone
https://bugs.webkit.org/show_bug.cgi?id=230323
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/tool/commands/setupgitclone.py:
(SetupGitClone.execute):
"core.webKitBranchBuild" is an advanced feature and also doesn't work
at all for Apple folks (leading to a myriad of bizarro build problems).
Folks who want it can use the documentation (UsingGitWithWebKit on the Wiki),
but in general, until it's well supported, it's best if we don't encourage it.
2021-09-15 Geza Lore <gezalore@gmail.com>
Cache resource paths in run-jsc-stress-tests for speedup
https://bugs.webkit.org/show_bug.cgi?id=230263
Reviewed by Adrian Perez de Castro.
A large portion of the serial startup time of run-jsc-stress-tests is
just re-computing file system paths of bundle resources over and over
again. Cache results for a 40% speedup of the test enumeration phase.
* Scripts/run-jsc-stress-tests:
2021-09-14 Don Olmstead <don.olmstead@sony.com>
Rename RESOURCE_LOAD_STATISTICS to INTELLIGENT_TRACKING_PREVENTION
https://bugs.webkit.org/show_bug.cgi?id=230279
<rdar://problem/83118683>
Reviewed by John Wilander.
Followup renaming the variables in FeatureList.pm.
* Scripts/webkitperl/FeatureList.pm:
2021-09-14 John Wilander <wilander@apple.com>
Rename RESOURCE_LOAD_STATISTICS to INTELLIGENT_TRACKING_PREVENTION
https://bugs.webkit.org/show_bug.cgi?id=230279
<rdar://problem/83118683>
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
2021-09-14 Kevin Neal <kevin_neal@apple.com>
[builtins-generator-tests] Invoke with Python 3
https://bugs.webkit.org/show_bug.cgi?id=229879
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/steps.py:
(RunBuiltinsTests):
* Scripts/run-builtins-generator-tests:
(main): Deleted.
2021-09-14 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Reset author time when editing commits (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=230224
<rdar://problem/83065417>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.pull): Force-update ref of pulled branch, reset author time of all rebased commits.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add update-ref mock.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestDoPullRequest):
2021-09-14 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Reset author time when editing commits (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=230224
<rdar://problem/83065417>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Capture 'git commit date=now'.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_commit): Always reset commit date.
2021-09-14 Hoa Dinh <dvh@apple.com>
Provide a way to update the commit message with an updated list of changed files/functions
https://bugs.webkit.org/show_bug.cgi?id=230195
Reviewed by Jonathan Bedard.
Add a new parameter --only-files to request generation of only the part of the changed files/functions.
* Scripts/prepare-ChangeLog:
(main):
(generateNewChangeLogs):
2021-09-13 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] -toggleAutomaticSpellingCorrection: menu item validation shouldn't require post-layout editor state
https://bugs.webkit.org/show_bug.cgi?id=230205
Reviewed by Darin Adler.
See WebKit ChangeLog for more details.
* TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
(TestWebKitAPI::TEST):
2021-09-13 Andres Gonzalez <andresg_22@apple.com>
AX: set insertion point to the end of a native text control does not work when passing a collapsed TextMarkerRange with both start and end equals to the end TextMarker for the element.
https://bugs.webkit.org/show_bug.cgi?id=230166
Reviewed by Chris Fleizach.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
Use AXTextMarkerRangeForTextMarkers instead of
AXTextMarkerRangeForUnorderedTextMarkers.
2021-09-13 Alex Christensen <achristensen@webkit.org>
Add unit test that uses PCM daemon
https://bugs.webkit.org/show_bug.cgi?id=230191
Reviewed by Chris Dumez.
* TestWebKitAPI/Configurations/TestPCMDaemon.xcconfig: Added.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::currentExecutableLocation):
(TestWebKitAPI::testDaemonPList):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestPCMDaemonMain.c: Copied from Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.cpp.
(main):
2021-09-13 Chris Dumez <cdumez@apple.com>
Crash under WebPage::runJavaScript()
https://bugs.webkit.org/show_bug.cgi?id=230223
<rdar://80172436>
Reviewed by Brady Eidson.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm:
(-[AsyncJSUIDelegate initWithAlertHandler:]):
(-[AsyncJSUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::TEST):
2021-09-13 Tyler Wilcock <tyler_w@apple.com>
AX: Make PDFs loaded via <embed> accessible
https://bugs.webkit.org/show_bug.cgi?id=229556
Reviewed by Chris Fleizach and Andres Gonzalez.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::attributeValue):
Some PDFKit elements don't respond to `accessibilityAttributeValue`,
so before calling that selector first check to see if the given `element` responds
to an attribute-specific selector (like `accessibilityRole`).
2021-09-13 Jonathan Bedard <jbedard@apple.com>
Running iOS layout tests sometimes fails with a utf-8 error
https://bugs.webkit.org/show_bug.cgi?id=230082
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/port/driver.py:
(Driver.run_test): Decode errors should not be fatal, since it's possible
that stdout may be a png from a timed out test.
2021-09-13 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com>
[TestWTF] Hash tests for denorm_min should be skipped if denorm is not supported.
https://bugs.webkit.org/show_bug.cgi?id=230177
Reviewed by Don Olmstead.
std::numeric_limits::denorm_min does not return a denormalized value
if denormal number is not supported. Test denorm_min only if
(has_denorm == denorm_present).
* TestWebKitAPI/Tests/WTF/Hasher.cpp:
(TestWebKitAPI::TEST):
2021-09-13 Aakash Jain <aakash_jain@apple.com>
Reduce EWS email notifications to Aakash
Unreviewed. Do not email to Aakash anymore for every build/test failure. It was added initially so that I
can debug any issue in these email notifications. But these have been stable and I don't need a copy of every
EWS email.
* CISupport/ews-build/send_email.py:
(send_email_to_patch_author):
2021-09-13 Philippe Normand <pnormand@igalia.com>
Unreviewed, AutoInstall hotfix for Linux platforms
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall):
(AutoInstall._request): Disable custom cacert on Linux, OpenSSL fails validate this cert.
2021-09-10 Simon Fraser <simon.fraser@apple.com>
Add an lldb summary provider for the WebCore::Length type
https://bugs.webkit.org/show_bug.cgi?id=230185
Reviewed by Alan Bujtas.
Make Length types easier to visualize when debugging in lldb.
* lldb/lldb_webkit.py:
(__lldb_init_module):
(WebCoreLength_SummaryProvider):
(WebCoreLengthProvider):
(WebCoreLengthProvider.__init__):
(WebCoreLengthProvider.get_type):
(WebCoreLengthProvider.get_type_string):
(WebCoreLengthProvider.is_auto):
(WebCoreLengthProvider.is_undefined):
(WebCoreLengthProvider.is_calculated):
(WebCoreLengthProvider.is_fixed):
(WebCoreLengthProvider.is_percent):
(WebCoreLengthProvider.has_quirk):
(WebCoreLengthProvider.is_float):
(WebCoreLengthProvider.get_numeric_value):
2021-09-10 Chris Dumez <cdumez@apple.com>
Implement navigation reporting for Cross-Origin-Opener-Policy
https://bugs.webkit.org/show_bug.cgi?id=230046
Reviewed by Alex Christensen.
Fix issue where [DumpJSConsoleLogInStdErr] was not working for tests that process-swap
due to COOP. Some data members on InjectedBundle such as m_dumpJSConsoleLogInStdErr
were only set in didReceiveMessageToPage(), before calling beginTesting(). However, in
case of process-swap, beginTesting() gets called a second time in the new process, from
InjectedBundle::didCreatePage() with BegingTestingMode::Resume. As a result, the
m_dumpJSConsoleLogInStdErr flag was not getting set in the new process' injected bundle
after a process-swap. To address the issue, those data members now get initialized in
beginTesting() instead.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::beginTesting):
2021-09-10 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] AutoInstall occasionally raising SSL error (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=230169
<rdar://problem/82767008>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.archives): Add retry when listing archives.
2021-09-10 David Kilzer <ddkilzer@apple.com>
Fix ASan+UBSan builds: part two
<https://webkit.org/b/230100>
<rdar://problem/82926910>
Reviewed by Alexey Proskuryakov.
Overview of changes:
- Rename variables so no Tools/sanitizer/*.xcconfig file
contains a variable with the same name. This is required due
to the way Xcode collects variables from an xcconfig file
specified on the command-line.
- Remove use of $(inherited) except in well-known variables.
That mechanism doesn't work at the time when Xcode resolves
variables from an xcconfig file specified on the command-line.
- Remove or inline existing variables in sanitizer.xcconfig.
* sanitizer/asan.xcconfig:
(WK_ENABLE_ADDRESS_SANITIZER):
- Rename from WK_ENABLE_SANITIZER.
(WK_ADDRESS_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES):
- Rename from WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES and remove
$(inherited).
* sanitizer/sanitizer.xcconfig:
(OTHER_CFLAGS):
- Inline WK_SANITIZER_OTHER_CFLAGS_YES and add variable defined
in ubsan.xcconfig.
(OTHER_CPLUSPLUSFLAGS):
- Remove WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES and add variable
defined in asan.xcconfig.
(OTHER_LDFLAGS):
- Inline WK_LDFLAGS_SANITIZER_YES.
* sanitizer/tsan.xcconfig:
(WK_ENABLE_SANITIZER):
- Remove instead of renaming to WK_ENABLE_THREAD_SANITIZER since
this is unused.
* sanitizer/ubsan.xcconfig:
(WK_ENABLE_UNDEFINED_BEHAVIOR_SANITIZER):
- Rename from WK_ENABLE_SANITIZER.
(WK_UNDEFINED_BEHAVIOR_SANITIZER_OTHER_CFLAGS_YES):
- Rename from WK_SANITIZER_OTHER_CFLAGS_YES and remove
$(inherited).
2021-09-10 Jonathan Bedard <jbedard@apple.com>
[resultsdbpy] model.casserole_unittest.CasseroleTest.test_asynchronous failing
https://bugs.webkit.org/show_bug.cgi?id=230162
<rdar://problem/82847267>
Reviewed by Ryan Haddad.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/casserole_unittest.py:
(CasseroleTest.test_asynchronous): Child processes do not pick up MockTime.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.
2021-09-10 Stephan Szabo <stephan.szabo@sony.com>
[PlayStation] Support running applications with ENABLE_STATIC_JSC=ON
https://bugs.webkit.org/show_bug.cgi?id=230170
Reviewed by Ross Kirsling.
Updating loading code to not load libJavaScriptCore shared library
if we are using a static version. Fix platform bits for
TestJavaScriptCore to load libraries at all.
* MiniBrowser/playstation/main.cpp:
* TestWebKitAPI/PlatformPlayStation.cmake:
* TestWebKitAPI/playstation/main.cpp:
2021-09-10 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] AutoInstall occasionally raising SSL error
https://bugs.webkit.org/show_bug.cgi?id=230169
<rdar://problem/82767008>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall._request): Pass cafile into urlopen directly.
2021-09-10 Aakash Jain <aakash_jain@apple.com>
[build.webkit.org] Remove ./ from command invocations
https://bugs.webkit.org/show_bug.cgi?id=230165
Reviewed by Ryan Haddad.
* CISupport/build-webkit-org/steps.py: Removed ./ from command invocations to be consistent with EWS configuration.
* CISupport/build-webkit-org/steps_unittest.py: Updatd unit-tests.
2021-09-10 Alex Christensen <achristensen@webkit.org>
Add infrastructure to allow TLS during PCM tests
https://bugs.webkit.org/show_bug.cgi?id=230137
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::delegateAllowingAllTLS):
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):
2021-09-10 Jonathan Bedard <jbedard@apple.com>
Exception in run-webkit-tests: Bad file descriptor (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=229994
<rdar://problem/82826083>
Unreviewed follow-up fix.
* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.rmtree): shutil.rmtree doesn't ignore bad file descriptor OSErrors.
2021-09-09 Simon Fraser <simon.fraser@apple.com>
Fix some lldb data provider issues
https://bugs.webkit.org/show_bug.cgi?id=230134
Reviewed by Daniel Bates.
Fix the color data provider. Add a test for the URL provider. Add an
early return in lstring_to_string that fixed an error.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit.py:
(lstring_to_string):
(WebCoreColorProvider):
(WebCoreColorProvider._is_outOfLine):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._color_space):
(WebCoreColorProvider._flags):
(WebCoreColorProvider._to_string_outOfLine):
(WebCoreColorProvider.to_string):
(WebCoreColorProvider._is_extended): Deleted.
(WebCoreColorProvider._to_string_extended): Deleted.
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WTFURL_SummaryProvider):
2021-09-09 Wenson Hsieh <wenson_hsieh@apple.com>
[Mac Catalyst] Korean characters do not combine correctly in editable fields in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=230122
rdar://79062204
Reviewed by Devin Rousso.
Add a new API test to exercise the change. See WebKit/ChangeLog for more information.
* TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:
(-[TestWKWebView synchronouslyRequestAutocorrectionContext]):
(TEST):
* TestWebKitAPI/ios/UIKitSPI.h:
2021-09-09 Chris Dumez <cdumez@apple.com>
Implement a WebProcess cap
https://bugs.webkit.org/show_bug.cgi?id=230067
<rdar://79479244>
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
(TEST):
2021-09-09 Aakash Jain <aakash_jain@apple.com>
Run check-github-mirror-integrity more frequently
https://bugs.webkit.org/show_bug.cgi?id=230095
Reviewed by Jonathan Bedard.
* CISupport/ews-build/factories.py:
(WatchListFactory.__init__): Run check-github-mirror-integrity on watchlist ews.
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps): Updated unit-test.
2021-09-09 Aakash Jain <aakash_jain@apple.com>
[ews] Share more bots between EWS queues
https://bugs.webkit.org/show_bug.cgi?id=230094
Reviewed by Jonathan Bedard.
* CISupport/ews-build/config.json:
2021-09-08 Jonathan Bedard <jbedard@apple.com>
Exception in run-webkit-tests: Bad file descriptor (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=229994
<rdar://problem/82826083>
Reviewed by Ryan Haddad.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.launch_app): Catch OSError.
2021-09-08 Sihui Liu <sihui_liu@apple.com>
Regression (r282130): [ macOS iOS wk2 ] imported/w3c/web-platform-tests/storage/persisted.https.any.html is failing
https://bugs.webkit.org/show_bug.cgi?id=230053
<rdar://problem/82879548>
Reviewed by Chris Dumez.
Clear storage states between tests so tests do not affect each other.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::clearStorage):
* WebKitTestRunner/TestController.h:
2021-09-08 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add support for find_spec
https://bugs.webkit.org/show_bug.cgi?id=230009
<rdar://problem/82827571>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall.find_spec): Added.
2021-09-08 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][DumpRenderTree] ASSERTION FAILED: openWindows().size() == 1 in runTest
https://bugs.webkit.org/show_bug.cgi?id=229932
Reviewed by Chris Dumez.
runTest() called DestroyWindow while iterating 'openWindows'.
However, DestroyWindow dispatches WM_DESTROY that removes the item
from 'openWindows'.
* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest): Copy the vector to iterate.
2021-09-08 Simon Fraser <simon.fraser@apple.com>
Add a temporarily prefixed property for mask-mode, aliased to -webkit-mask-source-type
https://bugs.webkit.org/show_bug.cgi?id=229915
Reviewed by Antti Koivisto.
Allow the "synonym" key in CSSProperties.json.
* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONCSSPropertiesChecker.check_codegen_properties):
2021-09-08 Lauro Moura <lmoura@igalia.com>
[GTK] Fix test path in last commit
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-09-08 Lauro Moura <lmoura@igalia.com>
[GTK] Garden default-menu API test failure
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-09-07 Fujii Hironori <Hironori.Fujii@sony.com>
[Win] TestWebKitAPI.WebKit.DidNotHandleKeyDown is failing
https://bugs.webkit.org/show_bug.cgi?id=229927
Reviewed by Don Olmstead.
TestWebKitAPI::Util::isKeyDown was not implemented
* TestWebKitAPI/CMakeLists.txt: Added Tests/WebKit/DidNotHandleKeyDown.cpp.
* TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp: GTK and WPE ports fail the test. Skip it.
* TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
(TestWebKitAPI::Util::isKeyDown): Implemented.
2021-09-07 Fujii Hironori <Hironori.Fujii@sony.com>
[Win] PlatformWebView::simulateSpacebarKeyPress sends wrong scan code for the space key and Alt key
https://bugs.webkit.org/show_bug.cgi?id=229928
Reviewed by Don Olmstead.
PlatformWebView::simulateSpacebarKeyPress sent 39, but it should be 0x39.
PlatformWebView::simulateAltKeyPress sent 38, but it should be 0x38.
* TestWebKitAPI/win/PlatformWebViewWin.cpp:
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
(TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
2021-09-07 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Support callbacks as main arguments (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=229739
<rdar://problem/82597266>
Unreviewed follow-up fix.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.url): For compatibility, use git config directly.
2021-09-07 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Support callbacks as main arguments
https://bugs.webkit.org/show_bug.cgi?id=229739
<rdar://problem/82597266>
Reviewed by Dewei Zhu.
* Scripts/git-webkit:
(is_webkit_filter): Return item if repository is Webkit.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Pass repository to contributors, identifier_template and subversion
to dynamically generate values if those arguments are callable.
2021-09-07 Chris Dumez <cdumez@apple.com>
Implement origin partitioning (top-origin/frame-origin) for BroadcastChannel
https://bugs.webkit.org/show_bug.cgi?id=229814
Reviewed by Alex Christensen.
Disable BroadcastChannel origin partitioning when running layout tests since it would cause
too many test failures in WPT tests at this point (e.g. COOP/COEP tests).
* TestRunnerShared/TestFeatures.cpp:
(WTR::shouldDisableBroadcastChannelOriginPartitioning):
(WTR::hardcodedFeaturesBasedOnPathForTest):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
2021-09-07 Chris Dumez <cdumez@apple.com>
Allow layout tests to open popups by default
https://bugs.webkit.org/show_bug.cgi?id=229881
Reviewed by Darin Adler.
Allow layout tests to open popups by default and drop testRunner.setCanOpenWindow().
* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner::setCallCloseOnWebViews):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:createWebViewWithRequest:]):
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::createWebViewWithRequest):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::setAcceptsEditing):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h:
2021-09-07 Alex Christensen <achristensen@webkit.org>
TestWebKitAPI.EventAttribution.Basic is extremely flaky on api-ios
https://bugs.webkit.org/show_bug.cgi?id=229995
Reviewed by Jonathan Bedard.
Clear state on disk before running these tests.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::clearState):
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):
2021-09-07 Carlos Alberto Lopez Perez <clopez@igalia.com>
[build.webkit.org][ews-build.webkit.org] Only try to download from S3 on the production server
https://bugs.webkit.org/show_bug.cgi?id=230006
Reviewed by Aakash Jain.
The URL identifiers used for the S3 built products are not random,
they depend on the revision number or the patch number. So it can
happen than on a test deployment the tester downloads the built-product
from the official deployment at webkit.org rather than from its own worker.
Avoid this by ensuring that only on the official deployment it is tried to
download from S3. On the test deployments the code will now skip the step to
download from S3 and instead it will download the built product from the master.
* CISupport/build-webkit-org/steps.py:
(DownloadBuiltProduct.start):
* CISupport/ews-build/steps.py:
(DownloadBuiltProduct.getResultSummary):
(DownloadBuiltProduct.start):
* CISupport/ews-build/steps_unittest.py:
2021-09-07 Megan Gardner <megan_gardner@apple.com>
Rewrite long press and drag tests to be more robust.
https://bugs.webkit.org/show_bug.cgi?id=229779
rdar://40917203
Reviewed by Wenson Hsieh.
Found a crash when bad data was entered for gesture emulation.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::convertCoordinates):
2021-09-07 Jonathan Bedard <jbedard@apple.com>
Exception in run-webkit-tests: Bad file descriptor (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=229994
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/server_process.py:
(ServerProcess.write): Catch "Bad file descriptor."
(ServerProcess._wait_for_data_and_update_buffers_using_select): Ditto.
2021-09-07 Jonathan Bedard <jbedard@apple.com>
run_webkit_tests failed to print error message in python3 in linux_get_crash_log.py
https://bugs.webkit.org/show_bug.cgi?id=229971
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator._get_gdb_output):
2021-09-07 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] The Xvfb display server may fail to start sometimes causing tests to randomly crash (v3)
https://bugs.webkit.org/show_bug.cgi?id=229758
Reviewed by Philippe Normand.
Add a new function in XvfbDriver() to ensure that the display server
at a given display_id is replying as expected. Ask it for the screen
size at monitor 0 and compare the result with the one we expect to
have inside Xvfb. For doing this check a external python program is
called which does the query using GTK. Using a external program is
more robust against possible failures calling into GTK and also will
allow re-using this program also to check that the weston server is
also replying as expected for the weston driver (on a future patch).
If the Xvfb driver is not replying as expected then restart it and
try again, up to 3 retries.
Use this also on the weston driver to check that the Xvfb driver is
ready.
The code is both compatible with python2 and python3, when running on
python2 it will try first to use subprocess32 if available, otherwise
will use standard python2 subprocess without using the timeout feature.
On this v3 fix an error that caused that the subprocess stderr was
redirected to stdout by mistake.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockProcess.__init__):
(MockProcess.communicate):
* Scripts/webkitpy/port/westondriver.py:
(WestonDriver._setup_environ_for_test):
* Scripts/webkitpy/port/westondriver_unittest.py:
(WestonXvfbDriverDisplayTest._xvfb_check_if_ready):
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver):
(XvfbDriver.__init__):
(XvfbDriver.check_driver):
(XvfbDriver._xvfb_run):
(XvfbDriver._xvfb_screen_size):
(XvfbDriver._xvfb_stop):
(XvfbDriver._xvfb_check_if_ready):
(XvfbDriver._setup_environ_for_test):
(XvfbDriver.has_crashed):
(XvfbDriver.stop):
* Scripts/webkitpy/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):
(XvfbDriverTest.assertDriverStartSuccessful):
(XvfbDriverTest.test_xvfb_start_and_ready):
(XvfbDriverTest.test_xvfb_start_arbitrary_worker_number):
(XvfbDriverTest.test_xvfb_not_replying):
* gtk/print-screen-size: Added.
2021-09-07 Aakash Jain <aakash_jain@apple.com>
TestWebKitAPI.EventAttribution.Basic is extremely flaky on api-ios
https://bugs.webkit.org/show_bug.cgi?id=229995
Disabling the test for now.
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-09-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r282064.
https://bugs.webkit.org/show_bug.cgi?id=229990
Made run-webkit-test fail in Linux
Reverted changeset:
"[GTK] The Xvfb display server may fail to start sometimes
causing tests to randomly crash"
https://bugs.webkit.org/show_bug.cgi?id=229758
https://commits.webkit.org/r282064
2021-09-07 Sam Sneddon <gsnedders@apple.com>
Fix DeprecationWarning in webkitpy under Py 3.6+
https://bugs.webkit.org/show_bug.cgi?id=229959
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.print_summary):
2021-09-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r282058.
https://bugs.webkit.org/show_bug.cgi?id=229978
broken two css layout tests on iOS
Reverted changeset:
"Add a temporarily prefixed property for mask-mode, aliased to
-webkit-mask-source-type"
https://bugs.webkit.org/show_bug.cgi?id=229915
https://commits.webkit.org/r282058
2021-09-06 Aakash Jain <aakash_jain@apple.com>
[ews] Invoke transfer-archive-to-s3 with Python 3
https://bugs.webkit.org/show_bug.cgi?id=229972
Reviewed by Alexey Proskuryakov.
* CISupport/ews-build/steps.py:
(TransferToS3): Invoke with python 3.
* CISupport/ews-build/steps_unittest.py: Updated unit-tests.
* CISupport/Shared/transfer-archive-to-s3: Changed shebang to python 3.
2021-09-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r282025.
https://bugs.webkit.org/show_bug.cgi?id=229970
broken layout test on mac-debug-wk1
Reverted changeset:
"Allow layout tests to open popups by default"
https://bugs.webkit.org/show_bug.cgi?id=229881
https://commits.webkit.org/r282025
2021-09-06 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] The Xvfb display server may fail to start sometimes causing tests to randomly crash
https://bugs.webkit.org/show_bug.cgi?id=229758
Reviewed by Philippe Normand.
Add a new function in XvfbDriver() to ensure that the display server
at a given display_id is replying as expected. Ask it for the screen
size at monitor 0 and compare the result with the one we expect to
have inside Xvfb. For doing this check a external python program is
called which does the query using GTK. Using a external program is
more robust against possible failures calling into GTK and also will
allow re-using this program also to check that the weston server is
also replying as expected for the weston driver (on a future patch).
If the Xvfb driver is not replying as expected then restart it and
try again, up to 3 retries.
Use this also on the weston driver to check that the Xvfb driver is
ready.
The code is both compatible with python2 and python3, when running on
python2 it will try first to use subprocess32 if available, otherwise
will use standard python2 subprocess without using the timeout feature.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockProcess.__init__):
(MockProcess.communicate):
* Scripts/webkitpy/port/westondriver.py:
(WestonDriver._setup_environ_for_test):
* Scripts/webkitpy/port/westondriver_unittest.py:
(WestonXvfbDriverDisplayTest._xvfb_check_if_ready):
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver):
(XvfbDriver.__init__):
(XvfbDriver.check_driver):
(XvfbDriver._xvfb_run):
(XvfbDriver._xvfb_screen_size):
(XvfbDriver._xvfb_stop):
(XvfbDriver._xvfb_check_if_ready):
(XvfbDriver._setup_environ_for_test):
(XvfbDriver.has_crashed):
(XvfbDriver.stop):
* Scripts/webkitpy/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):
(XvfbDriverTest.assertDriverStartSuccessful):
(XvfbDriverTest.test_xvfb_start_and_ready):
(XvfbDriverTest.test_xvfb_start_arbitrary_worker_number):
(XvfbDriverTest.test_xvfb_not_replying):
* gtk/print-screen-size: Added.
2021-09-06 Simon Fraser <simon.fraser@apple.com>
Add a temporarily prefixed property for mask-mode, aliased to -webkit-mask-source-type
https://bugs.webkit.org/show_bug.cgi?id=229915
Reviewed by Antti Koivisto.
Allow the "synonym" key in CSSProperties.json.
* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONCSSPropertiesChecker.check_codegen_properties):
2021-09-03 Aakash Jain <aakash_jain@apple.com>
[ews] Invoke validate-changelog with python 3
https://bugs.webkit.org/show_bug.cgi?id=229872
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(ValidateChangeLogAndReviewer):
* CISupport/ews-build/steps_unittest.py: Added unit-tests.
2021-09-03 Kate Cheney <katherine_cheney@apple.com>
Safari’s Privacy Report window is completely blank
https://bugs.webkit.org/show_bug.cgi?id=229847
<rdar://problem/80974688>
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):
2021-09-03 Devin Rousso <drousso@apple.com>
[Web App Manifest] Always fetch the first manifest if provided
https://bugs.webkit.org/show_bug.cgi?id=229059
<rdar://problem/82148333>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:
(TestWebKitAPI::TEST.ApplicationManifest.AlwaysFetch): Added.
(TestWebKitAPI::TEST.ApplicationManifest.OnlyFirstManifest): Added.
(TestWebKitAPI::TEST.ApplicationManifest.NoManifest): Added.
(TestWebKitAPI::TEST.ApplicationManifest.MediaAttriute): Added.
(TestWebKitAPI::TEST.ApplicationManifest.DoesNotExist): Added.
(TestWebKitAPI::TEST.ApplicationManifest.Blocked): Added.
2021-09-03 Chris Dumez <cdumez@apple.com>
Allow layout tests to open popups by default
https://bugs.webkit.org/show_bug.cgi?id=229881
Reviewed by Darin Adler.
Allow layout tests to open popups by default and drop testRunner.setCanOpenWindow().
* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner::setCallCloseOnWebViews):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:createWebViewWithRequest:]):
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::createWebViewWithRequest):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::setAcceptsEditing):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h:
2021-09-03 Chris Dumez <cdumez@apple.com>
Drop calls to testRunner.setCloseRemainingWindowsWhenComplete() from layout tests
https://bugs.webkit.org/show_bug.cgi?id=229873
Reviewed by Sam Weinig.
Drop testRunner.setCloseRemainingWindowsWhenComplete() implementation from WKTR and DRT
as it is a no-op.
* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
2021-09-03 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r281990.
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
2021-09-03 Aakash Jain <aakash_jain@apple.com>
[ews] Invoke apply-watchlist with Python 3
https://bugs.webkit.org/show_bug.cgi?id=229864
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(ApplyWatchList):
* CISupport/ews-build/steps_unittest.py:
2021-09-03 Chris Dumez <cdumez@apple.com>
WebKitTestRunner does not correctly close all auxiliary WebViews between tests
https://bugs.webkit.org/show_bug.cgi?id=229838
Reviewed by Alex Christensen.
I noticed when running imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https.html
in a loop that the number of WebContent processes would grow until we crash. The reason for that is that the
test opens a popup window and that popup wouldn't get closed between runs.
There was some logic in InjectedBundle::done() to close auxiliary pages but this relied on the injected
bundle API and thus only knows about pages that are in the same WebProcess. Nowadays, with process swapping,
it is common for auxiliary pages to end up in other WebProcesses. For this reason, I dropped the logic to
close auxiliary pages from InjectedBundle::done() and instead added similar logic in the UIProcess,
inside TestController::resetStateToConsistentValues().
Finally, I dropped most of the code related to testRunner.setCloseRemainingWindowsWhenComplete() while keeping
the method as a no-op for now so that I don't have to update all the layout tests in this patch (I'll follow
up). For WebKitTestRunner, testRunner.setCloseRemainingWindowsWhenComplete() was already a no-op as the data
member getting set was never queried. For DumpRenderTree, I just made this behavior the default as I don't see
any reason why we wouldn't want to close auxiliary pages between tests.
* DumpRenderTree/TestRunner.cpp:
(setCloseRemainingWindowsWhenCompleteCallback):
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner::setCanOpenWindows):
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::done):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(WTR::InjectedBundle::pageCount const):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::setCloseRemainingWindowsWhenComplete):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::closeOtherPage):
(WTR::TestController::createOtherPage):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::platformCreateOtherPage):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateOtherPage):
2021-09-03 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS 15] editing/caret/ios/caret-in-overflow-area.html is failing
https://bugs.webkit.org/show_bug.cgi?id=229830
rdar://82190832
Reviewed by Tim Horton.
In iOS 15, writing the "AutomaticMinimizationEnabled" default is no longer sufficient to ensure that only the
UCB is on-screen when the keyboard is shown after focusing an editable element with the hardware keyboard
attached in layout tests. Among other things, this causes editing/caret/ios/caret-in-overflow-area.html to fail
in newly created iOS simulators, or iOS simulators that have just had their content erased, due to the fact that
the full-height software keyboard is shown instead of the minimized UCB.
Address this by updating the workaround such that we directly call into TextInput SPI to enable automatic
keyboard minimization.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
2021-09-03 Youenn Fablet <youenn@apple.com>
Remove all WTR output before Content-Type:text/plain for WebRTC tests on BigSur
https://bugs.webkit.org/show_bug.cgi?id=229552
<rdar://problem/82390178>
Reviewed by Jonathan Bedard.
Previously we were removing stdout logging according certain patterns for webrtc tests.
Based on bot results, we now remove any stdout logging for WebRTC tests, but only for BigSur.
For that purpose, we add the empty string as detector when needed.
* Scripts/webkitpy/port/mac.py:
(MacPort.logging_detectors_to_strip_text_start):
2021-09-02 Lauro Moura <lmoura@igalia.com>
[GLIB] Install lcms2 in helper dependencies script
https://bugs.webkit.org/show_bug.cgi?id=229173
Reviewed by Carlos Alberto Lopez Perez.
lcms2 support is enabled by default since r274273.
* glib/dependencies/apt:
* glib/dependencies/dnf:
* glib/dependencies/pacman:
* gtk/dependencies/brew:
2021-09-02 Lauro Moura <lmoura@igalia.com>
[WPE] form-submission-steps API test is also flaky timing out like GTK
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-09-02 Jonathan Bedard <jbedard@apple.com>
[webkit-patch] apply-watchlist command fails on python 3 (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=229822
<rdar://problem/82691261>
Reviewed by Aakash Jain.
* Scripts/webkitpy/common/checkout/diff_parser.py:
(get_diff_converter): Potentially decode bytes.
2021-09-02 Lauro Moura <lmoura@igalia.com>
[GLIB] run-gtk-tests does not require GI outside the sandbox
https://bugs.webkit.org/show_bug.cgi?id=229836
Reviewed by Jonathan Bedard.
Some worker bots were failing without python3-gi installed, but it's
not required as the flatpak env provides it.
* Scripts/run-gtk-tests:
2021-09-02 Alex Christensen <achristensen@webkit.org>
Gracefully recover from WebAuthnProcess crashes
https://bugs.webkit.org/show_bug.cgi?id=229828
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-09-02 Alex Christensen <achristensen@webkit.org>
Reject non-IPv4 hostnames that end in numbers
https://bugs.webkit.org/show_bug.cgi?id=228826
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F):
Update expectations for a few strange URLs that are no longer valid.
2021-09-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
[run-perf-tests] Add support for python3 and use it by default
https://bugs.webkit.org/show_bug.cgi?id=229783
Reviewed by Jonathan Bedard.
Make the script compatible with python3 and set it to use python3
by default. The script is still compatible with python2.
* CISupport/build-webkit-org/steps.py:
(RunAndUploadPerfTests):
* Scripts/run-perf-tests:
* Scripts/webkitpy/common/net/file_uploader.py:
(FileUploader._upload_data.callback):
(FileUploader):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.test_upload_json):
2021-09-02 Jonathan Bedard <jbedard@apple.com>
[contributors.json] Relocation (Part 6)
https://bugs.webkit.org/show_bug.cgi?id=229690
<rdar://problem/82552403>
Reviewed by Yusuke Suzuki.
* WebKitBot/src/Commit.mjs: Use name instead of fullName.
* WebKitBot/src/Contributors.mjs: Load contributors from metadata/contributors.json,
parse as list instead of dictionary.
* WebKitBot/tests/Commit.test.mjs: Load contributors from metadata/contributors.json.
2021-09-02 Jonathan Bedard <jbedard@apple.com>
[webkit-patch] apply-watchlist command fails on python 3
https://bugs.webkit.org/show_bug.cgi?id=229822
<rdar://problem/82691261>
Reviewed by Aakash Jain.
* Scripts/webkitpy/common/checkout/diff_parser.py:
(DiffParser._parse_into_diff_files): Ensure all diff lines are strings.
2021-09-02 Jonathan Bedard <jbedard@apple.com>
[webkitpy] WrappedPopen breaks process returncode
https://bugs.webkit.org/show_bug.cgi?id=229824
Reviewed by Carlos Alberto Lopez Perez.
* Scripts/webkitpy/common/system/executive.py:
(WrappedPopen.__init__): Define underlying object.
(WrappedPopen.returncode): Return underlying object's returncode.
2021-09-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK][WPE] Port API test runner to python3 (v2)
https://bugs.webkit.org/show_bug.cgi?id=229782
Unreviewed follow-up fix after r281919
Remove change on the shebang of run-perf-tests that doesn't belong to this patch,
not sure how this ended here, seems I messed it when working on the patch for bug 229783
* Scripts/run-perf-tests:
2021-09-02 Aakash Jain <aakash_jain@apple.com>
Move few scripts from python 2 to python3
https://bugs.webkit.org/show_bug.cgi?id=229817
Reviewed by Jonathan Bedard.
* Scripts/clean-webkit: Changed shebang to python3.
* CISupport/test-result-archive: Ditto.
* CISupport/ews-build/steps.py: Ditto.
* CISupport/build-webkit-org/steps.py:
(DownloadBuiltProduct): Use python 3 instead of python 2.
(ArchiveTestResults): Ditto.
* CISupport/download-built-product: Ditto.
(CleanWorkingDirectory):
(DownloadBuiltProduct):
(ArchiveTestResults):
* CISupport/ews-build/steps_unittest.py: Updated unit-tests.
2021-09-02 Jonathan Bedard <jbedard@apple.com>
[contributors.json] Relocation (Part 5)
https://bugs.webkit.org/show_bug.cgi?id=229690
<rdar://problem/82552403>
Reviewed by Aakash Jain.
* CISupport/ews-build/steps.py:
(ValidateCommiterAndReviewer): Pull from metadata/contributors.json.
(ValidateCommiterAndReviewer.load_contributors_from_disk): Ditto.
(ValidateCommiterAndReviewer.load_contributors): Parse contributors.json as list instead of dictionary.
* CISupport/ews-build/steps_unittest.py:
2021-09-02 Lauro Moura <lmoura@igalia.com>
[webkitcorepy] Evaluate default Editor to false when not found
https://bugs.webkit.org/show_bug.cgi?id=229791
Reviewed by Jonathan Bedard.
This makes the default editor to not be listed as valid in platforms
without the open command. This was causing the tests to fail for
GTK/WPE (on Linux).
In a future commit a proper solution might be adding proper support
for $EDITOR.
* Scripts/libraries/webkitcorepy/webkitcorepy/editor.py:
(Editor.__bool__):
2021-09-02 Jonathan Bedard <jbedard@apple.com>
[buildbot] Only serve content through nginx
https://bugs.webkit.org/show_bug.cgi?id=229785
<rdar://problem/82653668>
Reviewed by Alexey Proskuryakov.
* CISupport/build-webkit-org/master.cfg: Only expose webserver to localhost.
* CISupport/ews-build/master.cfg: Ditto.
2021-09-02 Lauro Moura <lmoura@igalia.com>
[GLIB] Garden itp API test failure after r281886
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-09-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK][WPE] Port API test runner to python3
https://bugs.webkit.org/show_bug.cgi?id=229782
Reviewed by Philippe Normand.
Port the GTK/WPE API test runner to be compatible with python3
and set it to run with python3 by default.
The runner is still compatible with python2 after this patch, so
we can land this without immediately requiring a restart of the CI.
* Scripts/run-gtk-tests:
(GtkTestRunner): Deleted.
(GtkTestRunner.__init__): Deleted.
(GtkTestRunner._ensure_accessibility_service_is_running): Deleted.
(GtkTestRunner._setup_testing_environment): Deleted.
(GtkTestRunner._tear_down_testing_environment): Deleted.
(GtkTestRunner.is_glib_test): Deleted.
(GtkTestRunner.is_google_test): Deleted.
(GtkTestRunner.is_qt_test): Deleted.
* Scripts/run-perf-tests:
* Scripts/run-wpe-tests:
(WPETestRunner): Deleted.
(WPETestRunner.__init__): Deleted.
(WPETestRunner.is_glib_test): Deleted.
(WPETestRunner.is_google_test): Deleted.
(WPETestRunner.is_qt_test): Deleted.
* glib/api_test_runner.py:
(TestRunner._get_tests_from_google_test_suite):
(TestRunner.run_tests):
(TestRunner.run_tests.number_of_tests):
* glib/common.py:
(parse_output_lines):
* glib/glib_test_runner.py:
(Message.create.read_string):
(Message):
(GLibTestRunner._read_from_pipe):
(GLibTestRunner._read_from_stderr):
(GLibTestRunner.run):
2021-09-01 Jonathan Bedard <jbedard@apple.com>
[contributors.json] Relocation (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=229690
<rdar://problem/82552403>
Reviewed by Dewei Zhu.
* Scripts/webkitpy/common/config/committers.py:
(Contributor.as_dict): Include name in dictionary.
(CommitterList.load_json): Use list instead of dictionary.
(CommitterList.as_json): Encode as list instead of dictionary.
(CommitterList._contributor_list_to_dict): Deleted.
2021-09-01 Alex Christensen <achristensen@webkit.org>
Remove _statisticsDatabaseColumnsForTable and related unused test functions
https://bugs.webkit.org/show_bug.cgi?id=229771
Reviewed by Kate Cheney.
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
2021-09-01 Carlos Alberto Lopez Perez <clopez@igalia.com>
Unreviewed, reverting r281870.
It broke the GTK api test runner.
Reverted changeset:
"[GTK] The Xvfb display server may fail to start sometimes
causing tests to randomly crash"
https://bugs.webkit.org/show_bug.cgi?id=229758
https://commits.webkit.org/r281870
2021-09-01 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Automatic rebasing or pull-requests (Follow-up fix.)
https://bugs.webkit.org/show_bug.cgi?id=229625
<rdar://problem/82451030>
Reviewed by Yusuke Suzuki.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.pull): Set commit for git-svn checkouts.
2021-09-01 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] The Xvfb display server may fail to start sometimes causing tests to randomly crash
https://bugs.webkit.org/show_bug.cgi?id=229758
Reviewed by Philippe Normand.
Add a new function in XvfbDriver() to ensure that the display server
at a given display_id is replying as expected. Ask it for the screen
size at monitor 0 and compare the result with the one we expect to
have inside Xvfb. For doing this check a external python program is
called which does the query using GTK. Using a external program is
more robust against possible failures calling into GTK and also will
allow re-using this program also to check that the weston server is
also replying as expected for the weston driver (on a future patch).
If the Xvfb driver is not replying as expected then restart it and
try again, up to 3 retries.
Use this also on the weston driver to check that the Xvfb driver is
ready.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockProcess.__init__):
(MockProcess.communicate):
* Scripts/webkitpy/port/westondriver.py:
(WestonDriver._setup_environ_for_test):
* Scripts/webkitpy/port/westondriver_unittest.py:
(WestonXvfbDriverDisplayTest._xvfb_check_if_ready):
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver):
(XvfbDriver.__init__):
(XvfbDriver.check_driver):
(XvfbDriver._xvfb_run):
(XvfbDriver._xvfb_screen_size):
(XvfbDriver._xvfb_stop):
(XvfbDriver._xvfb_check_if_ready):
(XvfbDriver._setup_environ_for_test):
(XvfbDriver.has_crashed):
(XvfbDriver.stop):
* Scripts/webkitpy/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):
(XvfbDriverTest.assertDriverStartSuccessful):
(XvfbDriverTest.test_xvfb_start_and_ready):
(XvfbDriverTest.test_xvfb_start_arbitrary_worker_number):
(XvfbDriverTest.test_xvfb_not_replying):
* gtk/print-screen-size: Added.
2021-09-01 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add automatic Editor configuration
https://bugs.webkit.org/show_bug.cgi?id=228867
<rdar://problem/81621991>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version, add whichcraft.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/editor.py: Added.
(Editor): Class representing a text editor
(Editor.atom):
(Editor.sublime):
(Editor.textmate):
(Editor.xcode):
(Editor.textedit):
(Editor.default): System's default text editor.
(Editor.preferred): User's prefered text editor.
(Editor.by_name): Search for text editor by name.
(Editor.programs): List all available text editor programs on this machine.
(Editor.__init__):
(Editor.open): Open a file with a text editor.
(Editor.__repr__):
(Editor.__bool__):
* Scripts/libraries/webkitscmpy/setup.py: Bump version, remove whichcraft.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Prompt user and set commit log editor.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
2021-09-01 Kevin Neal <kevin_neal@apple.com>
[RunBindingsTests] Invoke with Python 3
https://bugs.webkit.org/show_bug.cgi?id=229724
Reviewed by Darin Adler.
* CISupport/build-webkit-org/steps.py:
(RunBindingsTests):
* CISupport/ews-build/steps.py:
(RunBindingsTests):
* CISupport/ews-build/steps_unittest.py:
* Scripts/run-bindings-tests:
(main): Deleted.
2021-09-01 Jonathan Bedard <jbedard@apple.com>
[contributors.json] Relocation (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=229690
<rdar://problem/82552403>
Reviewed by Aakash Jain.
* Scripts/webkitpy/common/config/committers.py:
(CommitterList.load_json): Read from metadata/contributors.json.
(CommitterList.reformat_in_place): Ditto.
2021-09-01 Alicia Boya García <aboya@igalia.com>
[GTK] Fix missing UTF-8 decoding in test crash logs
https://bugs.webkit.org/show_bug.cgi?id=229760
Reviewed by Philippe Normand.
Fix a couple of decoding issues in linux_get_crash_log.py, where
bytestrings were being printed without decoding.
An addditional decoding issue was fixed by Philippe Normand in
driver.py when printing ASan results.
* Scripts/webkitpy/port/driver.py:
(Driver._read_block):
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator._get_trace_from_flatpak):
(GDBCrashLogGenerator.generate_crash_log):
2021-08-31 Chris Dumez <cdumez@apple.com>
Enable SharedArrayBuffer support when COOP/COEP headers are used
https://bugs.webkit.org/show_bug.cgi?id=229559
<rdar://problem/82391945>
Reviewed by Alex Christensen.
Add API test coverage. SharedArrayBuffer support is currently forcefully enabled by
run-webkit-tests.py so it would not be practical to write layout tests for this at
the moment.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONScheme addMappingFromURLString:toData:withCOOPValue:withCOEPValue:]):
(-[PSONScheme webView:startURLSchemeTask:]):
2021-08-31 Kate Cheney <katherine_cheney@apple.com>
Use after move in ServiceWorkerThreadProxy
https://bugs.webkit.org/show_bug.cgi?id=229731
Reviewed by Chris Dumez.
While trying to test that this change did not cause regressions,
I found a bug in the test code from the mass renaming that happened
a few weeks ago. This patch fixes that.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-08-31 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Automatic rebasing or pull-requests
https://bugs.webkit.org/show_bug.cgi?id=229625
<rdar://problem/82451030>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.pull): Add rebase and branch arguments.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add pull.rebase = true in default config.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull.py:
(Pull): Add 'up' and 'update' aliases.
(Pull.main): Update the source branch of a pull-request branches.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.parser): Add --rebase/--no-rebase options.
(PullRequest.main): Update and rebase a pull-request on it's source branch.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestPullRequest.test_staged):
(TestPullRequest.test_modified):
(TestPullRequest.test_github):
(TestPullRequest.test_github_update):
(TestPullRequest.test_bitbucket):
(TestPullRequest.test_bitbucket_update):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_git_svn_unittest.py:
(TestSetupGitSvn.test_empty):
(TestSetupGitSvn.test_add):
2021-08-31 Kate Cheney <katherine_cheney@apple.com>
Loads after session restore marked app initiated in Safari
https://bugs.webkit.org/show_bug.cgi?id=229721
<rdar://problem/82084236>
Reviewed by Brent Fulgham.
API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm:
2021-08-31 Jonathan Bedard <jbedard@apple.com>
[contributors.json] Replace class=bot with status=bot
https://bugs.webkit.org/show_bug.cgi?id=229712
<rdar://problem/82579767>
Reviewed by Aakash Jain.
* Scripts/webkitpy/common/config/committers.py:
(Contributor.as_dict): bot is now a status, not a class.
(CommitterList.load_json): Ditto.
* Scripts/webkitpy/common/config/contributors.json: Replace class=bot with status=bot.
2021-08-30 Megan Gardner <megan_gardner@apple.com>
Fix double-tap-on-editable-content-for-selection-then-drag-* tests.
https://bugs.webkit.org/show_bug.cgi?id=229683
rdar://59571151
Reviewed by Wenson Hsieh.
The swipe keyboard tutorial comes up on first launch. Set the defaults to prevent
that from happening and interfering with tests.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
2021-08-30 Alex Christensen <achristensen@webkit.org>
Migrate PrivateClickMeasurements from ResourceLoadStatistics database to new database
https://bugs.webkit.org/show_bug.cgi?id=229646
Reviewed by Kate Cheney.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(webViewWithResourceLoadStatisticsEnabledInNetworkProcess):
(addValuesToTable):
(earliestTimeToSend):
(addAttributedPCMv1):
(addUnattributedPCMv1):
(addAttributedPCMv2):
(addUnattributedPCMv2):
(addAttributedPCMv3):
(addUnattributedPCMv3):
(dumpedPCM):
(pollUntilPCMIsMigrated):
(emptyObservationsDBPath):
(cleanUp):
(createAndPopulateObservedDomainTable):
(setUp):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-shm: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-wal: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-shm: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-wal: Removed.
2021-08-30 Alex Christensen <achristensen@webkit.org>
WKWebViewConfiguration._loadsSubresources=NO should prevent preconnecting
https://bugs.webkit.org/show_bug.cgi?id=229684
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/Preconnect.mm:
(TestWebKitAPI::verifyPreconnectDisabled):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):
2021-08-30 Aakash Jain <aakash_jain@apple.com>
ews might mark build as successful if JSC tests fail to run
https://bugs.webkit.org/show_bug.cgi?id=229634
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(RunJSCTestsWithoutPatch.evaluateCommand):
(AnalyzeJSCTestsResults.start):
(AnalyzeJSCTestsResults.retry_build): Method to retry build.
(AnalyzeJSCTestsResults.report_failure):
* CISupport/ews-build/steps_unittest.py: Added unit-tests.
2021-08-30 Lauro Moura <lmoura@igalia.com>
[WPE][webkitpy] Sanitize browser name testcase environment
https://bugs.webkit.org/show_bug.cgi?id=229667
Reviewed by Carlos Garcia Campos.
Around 2021-08-19, the WPE release bot changed its environment to
ensure WPE_BROWSER points to MiniBrowser while Cog webdriver support
was not present. Since then, the WPE webkitpy test
test_browser_name_with_cog_built was failing, as the host envvar
affected the code being tested.
This commits ensures the variable is empty for proper testing.
* Scripts/webkitpy/port/wpe_unittest.py:
(WPEPortTest.test_browser_name_with_cog_built):
2021-08-29 Diego Pino Garcia <dpino@igalia.com>
[GTK][WPE] Add ICU 63.1 to JHBuild minimal dependencies
https://bugs.webkit.org/show_bug.cgi?id=229607
Reviewed by Carlos Alberto Lopez Perez.
* jhbuild/jhbuild-minimal.modules:
* jhbuild/patches/icudata-stdlibs.patch: Added.
2021-08-27 Patrick Griffis <pgriffis@igalia.com>
[GTK] Simplify run-gtk-tests handling of the a11y service
https://bugs.webkit.org/show_bug.cgi?id=229620
Reviewed by Carlos Garcia Campos.
The service is DBusActivatable so it doesn't make sense to manually
find and start every binary ourselves and then wait for the
service to appear. We can simply call it and let the system
manage the service as it normally would in the environment it
normally would.
* Scripts/run-gtk-tests:
(GtkTestRunner.__init__):
(GtkTestRunner):
(GtkTestRunner._ensure_accessibility_service_is_running):
(GtkTestRunner._setup_testing_environment):
2021-08-27 Stephan Szabo <stephan.szabo@sony.com>
[PlayStation][CMake] Add control over whether JavaScriptCore should be shared
https://bugs.webkit.org/show_bug.cgi?id=229591
Reviewed by Don Olmstead.
Add frameworks to test applications to build with an object library version
of JavaScriptCore.
* TestWebKitAPI/CMakeLists.txt:
2021-08-27 Ryan Haddad <ryanhaddad@apple.com>
[EWS] Do not notify Apple bot watchers about failures seen on Igalia bots
https://bugs.webkit.org/show_bug.cgi?id=229630
Reviewed by Aakash Jain.
* CISupport/ews-build/send_email.py:
(send_email_to_bot_watchers):
2021-08-27 Alex Christensen <achristensen@webkit.org>
Add UIEventAttribution SPI that uses PrivateClickMeasurementAttributionEphemeral::Yes
https://bugs.webkit.org/show_bug.cgi?id=229623
Reviewed by John Wilander.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-08-27 Yijia Huang <yijia_huang@apple.com>
Add a new email address to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=229628
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-08-27 Alex Christensen <achristensen@webkit.org>
Separate PrivateClickMeasurement database from ResourceLoadStatistics database and add SPI to set its location
https://bugs.webkit.org/show_bug.cgi?id=229527
Reviewed by Kate Cheney.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(TEST):
2021-08-27 Chris Dumez <cdumez@apple.com>
Extend API test coverage to make sure didFailProvisionalLoad is not called upon COOP process swap
https://bugs.webkit.org/show_bug.cgi?id=229610
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-08-27 Chris Dumez <cdumez@apple.com>
REGRESSION (r281516): imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=229501
<rdar://problem/82346152>
Reviewed by Darin Adler.
In case of a COOP process-swap, the old process gets a didFailProvisionalLoadWithErrorForFrame delegate call. We want to ignore
this call in WKTR's injected bundle since it causes the test to dump its output too eagerly, before the test has had a chance
to run in the new process.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
(WTR::InjectedBundlePage::didCommitLoadForFrame):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
2021-08-27 Kate Cheney <katherine_cheney@apple.com>
PrivateClickMeasurementManager::firePendingAttributionRequests() is crashing in debug
https://bugs.webkit.org/show_bug.cgi?id=229551
Reviewed by John Wilander.
We pre-fill the PCM database with data for this test but don't clear
it once the test is over. This causes crashes in other tests.
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):
2021-08-27 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add pull-request command (Part 6)
https://bugs.webkit.org/show_bug.cgi?id=229089
<rdar://problem/81908751>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add commit, add and push commands.
(Git.commit): Create new commit from staged files.
(Git.add): Stage modified files.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:
(BitBucket.__init__): Add pull_requests.
(BitBucket.request): Add ability to list and edit pull requets.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.__init__): Add pull_requests.
(GitHub.request): Add ability to list and edit pull requets.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Add PullRequest.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.parser): Add '--add' and '--no-add' to allow user to specify how modified files
are incorperated into the pull-request.
(PullRequest.create_commit): Based on currently modified files, either create a new commit or
add those files to an existing commit.
(PullRequest.branch_point): Determine when this branch diverged from a production branch.
(PullRequest.main): Create branch, create commit on branch, push branch and either create or
update a pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.find):
(BitBucket.PRGenerator.create):
(BitBucket.PRGenerator.update):
(BitBucket.__init__): Add pull_request generator.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.find):
(GitHub.PRGenerator.create):
(GitHub.PRGenerator.update):
(GitHub.__init__): Add pull_request generator.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
(Scm.PRGenerator.__init__):
(Scm.PRGenerator.find):
(Scm.PRGenerator.create):
(Scm.PRGenerator.update):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestDoPullRequest.setUp):
(TestDoPullRequest.test_svn):
(TestDoPullRequest.test_no_modified):
(TestDoPullRequest.test_staged):
(TestDoPullRequest.test_modified):
(TestDoPullRequest.test_github):
(TestDoPullRequest.test_github_update):
(TestDoPullRequest.test_stash):
(TestDoPullRequest.test_stash_update):
2021-08-27 Jonathan Bedard <jbedard@apple.com>
[run-webkit-tests] Use Python 3 (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=226658
<rdar://problem/78882016>
Reviewed by Ryan Haddad.
* CISupport/ews-build/steps.py:
(RunWebKitTests): Change invocation to Python 3.
* CISupport/ews-build/steps_unittest.py:
(test_success): Change invocation to Python 3.
(test_warnings): Ditto.
2021-08-26 Yusuke Suzuki <ysuzuki@apple.com>
[JSC] op_put_private_name should use modern IC and remove ByValInfo
https://bugs.webkit.org/show_bug.cgi?id=229544
Reviewed by Saam Barati.
* Scripts/run-jsc-benchmarks:
2021-08-26 Jonathan Bedard <jbedard@apple.com>
[kill-old-processes] Invoke with Python 3
https://bugs.webkit.org/show_bug.cgi?id=229576
<rdar://problem/82397885>
Rubber-stamped by Darin Adler.
* CISupport/build-webkit-org/steps.py:
(KillOldProcesses): Invoke with Python 3.
* CISupport/build-webkit-org/steps_unittest.py:
(TestKillOldProcesses.test_success):
(TestKillOldProcesses.test_failure):
* CISupport/ews-build/steps.py:
(KillOldProcesses): Invoke with Python 3.
* CISupport/ews-build/steps_unittest.py:
* CISupport/kill-old-processes: Change shebang to Python 3.
2021-08-26 Ryan Haddad <ryanhaddad@apple.com>
watchOS simulator image missing on bot watchers dashboard
https://bugs.webkit.org/show_bug.cgi?id=229587
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.watchos-simulator-7 img.logo):
2021-08-26 Aakash Jain <aakash_jain@apple.com>
[EWS] compile-webkit-without-patch failed, but bot ran layout tests anyway and blamed the patch for a pre-existing failure
https://bugs.webkit.org/show_bug.cgi?id=229533
Reviewed by Jonathan Bedard.
When the compile-webkit-without-patch step fails, instead of running further layout-tests, retry the build and email
bot watcher's. The retried build will hopefully be picked up by other bot eventually. This is similar to what we do
in case of other infrastructure issues like kill-old-processes step failure.
* CISupport/ews-build/steps.py:
(CompileWebKitWithoutPatch.__init__): Added retry_build_on_failure parameter.
(CompileWebKitWithoutPatch.evaluateCommand): If build failed unexpectedly, retry it and email bot watchers.
(CompileWebKitWithoutPatch.send_email_for_unexpected_build_failure):
(ReRunWebKitTests.evaluateCommand):
(ReRunAPITests.evaluateCommand):
2021-08-26 Simon Fraser <simon.fraser@apple.com>
Add to run-webkit-tests a --expect-pass argument as a synonym for --force
https://bugs.webkit.org/show_bug.cgi?id=229581
Reviewed by Wenson Hsieh.
I am eternally confused that -f and --force are different things. Add --expect-pass
as a synonym for --force to reduce my confusion.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
2021-08-26 Wenson Hsieh <wenson_hsieh@apple.com>
TestWebKitAPI._WKActivatedElementInfo.InfoForRotatedImage is failing on iOS 15
https://bugs.webkit.org/show_bug.cgi?id=229531
rdar://82100466
Reviewed by Said Abou-Hallawa.
Due to changes in underlying system frameworks in iOS 15, the red "corner" of the rotated image in this test now
ends up with a color of 0xFFF51800 instead of 0xFFF51900. Resolve this by refactoring the test so that it's
robust against these kinds of minute differences.
To achieve this, we first run the test over a version of the test image without EXIF rotation data (test.jpg) to
measure the expected values of the red, green, yellow and blue corners; we then verify that these color values
are present in the corresponding rotated corners of the image with EXIF rotation.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/img-with-rotated-image.html: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/test.jpg: Added.
2021-08-26 Chris Dumez <cdumez@apple.com>
REGRESSION (r281516): [AppleSilicon WK2] fast/loader/reload-zero-byte-plugin.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=229532
<rdar://problem/82370692>
Unreviewed, partial revert of r281516 to drop the changes to WebKitTestRunner's injected bundle
as I suspect this is what caused this regression. The WKTR changes were made to try and address
the flakiness of imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html
but it turns out that the test is still flaky with the WKTR change.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
2021-08-26 Jonathan Bedard <jbedard@apple.com>
[run-webkit-tests] Use Python 3 (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=226658
<rdar://problem/78882016>
Reviewed by Aakash Jain.
* CISupport/build-webkit-org/steps.py:
(RunWebKitTests): Change invocation to Python 3.
* CISupport/build-webkit-org/steps_unittest.py:
* CISupport/kill-old-processes:
(main): run-webkit-tests may be invoked with Python 3.
2021-08-25 Wenson Hsieh <wenson_hsieh@apple.com>
Remove some iOS-specific compile-time guards that are no longer needed
https://bugs.webkit.org/show_bug.cgi?id=229500
Reviewed by Tim Horton.
Remove this workaround, which was only required to keep an API test passing on iOS 13.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
(overrideKeyboardDelegateSupportsImagePaste): Deleted.
2021-08-25 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Use Python 3 in CI
https://bugs.webkit.org/show_bug.cgi?id=229498
<rdar://problem/82342387>
Reviewed by Aakash Jain.
* CISupport/build-webkit-org/steps.py:
(ShowIdentifier.start): Invoke git-webkit with Python 3.
* CISupport/build-webkit-org/steps_unittest.py:
(TestShowIdentifier.test_success):
(TestShowIdentifier.test_failure):
* CISupport/ews-build/steps.py:
(ShowIdentifier.start): Invoke git-webkit with Python 3.
* CISupport/ews-build/steps_unittest.py:
2021-08-25 Jonathan Bedard <jbedard@apple.com>
[resultsdbpy] Handle E configuration comparisons
https://bugs.webkit.org/show_bug.cgi?id=229477
<rdar://problem/82316775>
Reviewed by Stephanie Lewis.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.compare): Ignore "E" version names in both directions.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.
2021-08-25 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS 15] editing/input/cocoa/autocorrect-on.html times out when run after editing/input/cocoa/autocorrect-off.html
https://bugs.webkit.org/show_bug.cgi?id=229486
rdar://82191308
Reviewed by Tim Horton.
The layout test (autocorrect-on.html) fails when run immediately after autocorrect-off.html, in the same
directory. This occurs because autocorrect-on.html attempts to verify that typing a period after "Tset" will
autocorrect to "Test"; however, the previous test disables autocorrection and types "Tset.", which causes UIKit
keyboard autocorrection code to add "Tset" to its lexicon. This means that we end up not autocorrecting to
"Test" in `autocorrect-on.html`.
In the past (r265376), to mitigate this, we set `-[UIKeyboardImpl correctionLearningAllowed]` to `NO`. However,
after what appears to be a recent TextInput change, this fails to prevent the test runner from learning "Tset"
while running autocorrect-off.html.
We take a more heavy-handed approach in this mitigation, and instead use swizzling to prevent UIKeyboardImpl
from notifying kbd when text candidates are "accepted".
* WebKitTestRunner/ios/TestControllerIOS.mm:
(overrideSyncInputManagerToAcceptedAutocorrection):
(WTR::TestController::platformResetStateToConsistentValues):
2021-08-24 Alan Bujtas <zalan@apple.com>
[ iOS ] TestWebKitAPI.DocumentEditingContext.Request* tests are failing
https://bugs.webkit.org/show_bug.cgi?id=229446
<rdar://problem/82295496>
Unreviewed.
Adjusting the test case after r281463 to match the new wrapping behavior.
* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(TEST):
2021-08-24 Jonathan Bedard <jbedard@apple.com>
[run-webkit-tests] Use Python 3 (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=226658
<rdar://problem/78882016>
Reviewed by Dewei Zhu.
* Scripts/run-webkit-tests: Change shebang to Python 3.
2021-08-24 Chris Dumez <cdumez@apple.com>
[WK2] Implement process-swapping based on Cross-Origin-Opener-Policy HTTP header
https://bugs.webkit.org/show_bug.cgi?id=229203
<rdar://problem/82047686>
Reviewed by Alex Christensen.
Add API test coverage to validate that we are indeed process-swapping.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONScheme addMappingFromURLString:toData:withCOOPValue:]):
(-[PSONScheme webView:startURLSchemeTask:]):
2021-08-24 Jonathan Bedard <jbedard@apple.com>
[kill-old-processes] Hardcode directory for stale simulator files
https://bugs.webkit.org/show_bug.cgi?id=229464
<rdar://problem/82148711>
Reviewed by Stephanie Lewis.
* CISupport/kill-old-processes:
(main):
2021-08-24 Alex Christensen <achristensen@webkit.org>
REGRESSION (r281473): [ iOS & MacOS ] TestWebKitAPI.ProcessSwap.NavigateToInvalidURL is timing out
https://bugs.webkit.org/show_bug.cgi?id=229447
Reviewed by Chris Dumez.
Check that a JS error was thrown instead of checking that the navigation doesn't go through.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2021-08-23 John Wilander <wilander@apple.com>
PCM: Support ephemeral measurement with non-persistent WebCore::PrivateClickMeasurement
https://bugs.webkit.org/show_bug.cgi?id=228984
<rdar://problem/81778213>
Reviewed by Kate Cheney.
This patch adds support for ephemeral measurement with non-persistent
WebCore::PrivateClickMeasurement for direct response advertising.
Such advertising means there is only one pending click, held in memory,
and only stored right before the triggering event causes attribution
reports to be scheduled.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPrivateClickMeasurementEphemeralMeasurementForTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setPrivateClickMeasurementEphemeralMeasurementForTesting):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2021-08-23 Cameron McCormack <heycam@apple.com>
Preserve color space when getting current color in DisplayList::DrawGlyphsRecorder
https://bugs.webkit.org/show_bug.cgi?id=229024
<rdar://problem/81828477>
Reviewed by Sam Weinig.
Change existing CGColor -> WebCore::Color conversions to be explicit
about lossily converting to sRGB.
* TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm:
(TEST):
2021-08-23 Wenson Hsieh <wenson_hsieh@apple.com>
editing/selection/ios/select-text-in-existing-selection.html fails on iOS 15
https://bugs.webkit.org/show_bug.cgi?id=229411
rdar://80385434
Reviewed by Tim Horton.
After the changes in rdar://70851909, UIKit's text selection interaction (which encompasses the loupe text
interaction gesture) is no longer allowed to transition to `Began` state when long pressing inside an existing
text selection. This causes us to no longer enter floating caret mode (via loupe gesture) and change the
selection when triggering a long press in selected text, which causes this layout test to fail.
This layout test was originally intended to test a fix for text selection via trackpad on iPadOS failing to
begin when clicking and dragging inside text that has already been selected. At that time, I intentionally wrote
this test in a way that didn't involve the trackpad at all, and instead simply exercised the codechange in
`-[WKContentView textInteractionGesture:shouldBeginAtPoint:]` by synthesizing touches.
Since UIKit no longer supports this behavior, we can rewrite this test to be more robust by calling and checking
the value of `-textInteractionGesture:shouldBeginAtPoint:` in an API test. This patch deletes the existing
layout test, and replaces it with an API test that directly exercises the SPI on `UIWKInteractionViewProtocol`.
Note that the original bug that was fixed by the change that came along with this failing test remains fixed,
because trackpad-based text selection on iPadOS uses `UITextLoupeCursorBehavior` rather than
`UITextLoupeTouchBehavior`, which (unlike the former) contains logic to explicitly avoid starting the loupe
text interaction when long pressing inside of selected text.
Test: UIWKInteractionViewProtocol.TextInteractionCanBeginInExistingSelection
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(-[TestWKWebView synchronouslyRequestTextInputContextsInRect:]): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:
(-[TestWKWebView synchronouslyRequestTextInputContextsInRect:]): Deleted.
Drive-by fix: also fix a build warning by pulling duplicate implementations of this testing helper method into
a common location in `WKWebView (TestWebKitAPI)`, inside of `TestWKWebView.h`.
* TestWebKitAPI/Tests/WebKitCocoa/editable-responsive-body.html: Added.
* TestWebKitAPI/Tests/ios/UIWKInteractionViewProtocol.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[WKWebView synchronouslyRequestTextInputContextsInRect:]):
* TestWebKitAPI/ios/UIKitSPI.h:
2021-08-23 Peng Liu <peng.liu6@apple.com>
Add a new option '--show-window' to run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=229253
Reviewed by Simon Fraser.
Add the new option so that we can let WKTR show a window with webview.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/driver.py:
(Driver.cmd_line):
* WebKitTestRunner/Options.cpp:
(WTR::handleOptionShowWindow):
(WTR::OptionsHandler::OptionsHandler):
(WTR::handleOptionShowWebView): Deleted.
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::shouldShowWindow const):
(WTR::TestOptions::shouldShowWebView const): Deleted.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::finishCreatingPlatformWebView):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
* WebKitTestRunner/win/PlatformWebViewWin.cpp:
(WTR::PlatformWebView::setWindowFrame):
2021-08-23 Jonathan Bedard <jbedard@apple.com>
[Cygwin] Support Python 3 in run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=229360
<rdar://problem/82192362>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest): Skip some tests on cygwin.
* Scripts/webkitpy/common/system/abstractexecutive.py:
(AbstractExecutive.command_for_printing): Strings might be bytes on some platforms.
* Scripts/webkitpy/common/system/path.py:
(_CygPath.convert): Cygwin path process is not unicode.
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo._win_version_str): Return Windows version string as unicode string.
2021-08-22 Yusuke Suzuki <ysuzuki@apple.com>
[JSC] Remove already-shipped wasm option flags
https://bugs.webkit.org/show_bug.cgi?id=229386
Reviewed by Ross Kirsling.
* Scripts/run-jsc-stress-tests:
2021-08-22 Lauro Moura <lmoura@igalia.com>
[WPE][WebDriver] Basic fullscreen support for the headless backend
https://bugs.webkit.org/show_bug.cgi?id=229380
Reviewed by Adrian Perez de Castro.
r280774 added support for fullscreen in the WindowViewBackend, but
many webdriver tests started failing as they run in the headless
backend.
This commits adds basic support in HeadlessBackend to make some
tests pass. Currently, just storing the fullscreen state and
forwarding the events to the WPE backend functions.
A number of tests are still failing due to the missing multiple window
support (required through the `session` fixtures), but also there are
still some failing that expect the view to be started in
non-fullscreen mode, which does not happen in the headless backend.
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::onDOMFullScreenRequest):
(WPEToolingBackends::HeadlessViewBackend::dispatchFullscreenEvent):
* wpe/backends/HeadlessViewBackend.h:
2021-08-22 Yusuke Suzuki <ysuzuki@apple.com>
[JSC] Remove already-shipped JS feature flags
https://bugs.webkit.org/show_bug.cgi?id=229387
Reviewed by Ross Kirsling.
* Scripts/run-jsc-benchmarks:
2021-08-22 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add pull-request command (Part 5)
https://bugs.webkit.org/show_bug.cgi?id=229089
<rdar://problem/81908751>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.modified): Return a list of modified files in the current checkout.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add 'git diff' mock commands.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_modified):
(TestGit.test_modified_no_staged):
(TestGit.test_modified_staged):
2021-08-22 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add pull-request command (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=229089
<rdar://problem/81908751>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): Match BitBucket ssh urls when constructing remotes.
2021-08-21 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add pull-request command (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=229089
<rdar://problem/81908751>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version, export pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest.State):
(PullRequest.create_body): Create pull-request body from commits and comment.
(PullRequest.parse_body): Turn a body from a pull-request into a comment string and partial commits.
(PullRequest.__init__):
(PullRequest.__repr__):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestPullRequest):
(TestPullRequest.test_representation):
(TestPullRequest.test_create_body_single):
(TestPullRequest.test_parse_body_single):
(TestPullRequest.test_create_body_multiple):
(TestPullRequest.test_parse_body_multiple):
(TestPullRequest.test_create_body_empty):
(TestPullRequest.test_parse_body_empty):
(TestPullRequest.test_create_body_comment):
(TestPullRequest.test_parse_body_single):
2021-08-21 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Single characters don't get shaped in the fast text codepath
https://bugs.webkit.org/show_bug.cgi?id=186804
Reviewed by Alan Bujtas.
Huge thanks to Laurence Penney to contributing this test font!!!
* Scripts/webkitpy/common/config/contributors.json:
2021-08-21 Daniel Kolesa <dkolesa@igalia.com>
[GLIB] Do not assume log success in apply-build-revision-to-files
https://bugs.webkit.org/show_bug.cgi?id=229335
Reviewed by Philippe Normand.
If the origin reference does not exist for any reason, this will
fail the build. Since we have no reference point, just assume
unknown like if it wasn't a git repo.
* glib/apply-build-revision-to-files.py:
(get_build_revision):
2021-08-20 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add pull-request command (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=229089
<rdar://problem/81908751>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add 'check-ref-format' and 'checkout -b'.
(Git.checkout): Add ability to create branch.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Add Branch command.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.parser): Allow user to specify engineering branch name.
(Branch.normalize_issue): Turn provided string into eng branch if it isn't already.
(Branch.main): Create eng branch from current checkout state.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
(TestBranch):
(TestBranch.setUp):
(TestBranch.test_basic_svn):
(TestBranch.test_basic_git):
(TestBranch.test_prompt_git):
(TestBranch.test_invalid_branch):
2021-08-20 Alex Christensen <achristensen@webkit.org>
Make UIEventAttribution tests less platform dependent
https://bugs.webkit.org/show_bug.cgi?id=229323
Reviewed by John Wilander.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::exampleURL):
(TestWebKitAPI::runBasicEventAttributionTest):
(TestWebKitAPI::TEST):
2021-08-20 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add pull-request command (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=229089
<rdar://problem/81908751>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Sort programs, add aliases.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(Command): Add alias
(FilteredCommand): Inherit from Command.
2021-08-20 Jon Lee <jonlee@apple.com>
Teach run-webkit-tests to print a summary of test status
https://bugs.webkit.org/show_bug.cgi?id=200556
Reviewed by Simon Fraser.
Add a new option to print a summary listing test expectation health.
It uses the same expected results as --print-expectations.
To run it: run-webkit-tests --print-summary
You can pass the same arguments as normal run-webkit-tests and it will
return stats based on the tests collected.
It also outputs a .csv file with the data.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.print_expectations): Gather the tests. Note whether the test
is marked as skip, pass, flaky, or fail, the definitions of which are
dictated by model.get_tests_with_result_type(). Output the results to
command line as well as to file.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Add the new option.
It goes through the same path as --print-expectations.
2021-08-20 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Forward unknown args to log and blame
https://bugs.webkit.org/show_bug.cgi?id=229342
<rdar://problem/82178743>
Rubber-stamped 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): Both log and blame might be passed options that need to be forwarded to git/svn.
2021-08-20 Carlos Alberto Lopez Perez <clopez@igalia.com>
REGRESSION(r274166): [GTK] It broke run-javascriptcore-tests causing all tests to use lot of memory
https://bugs.webkit.org/show_bug.cgi?id=229321
Unreviewed, reverting r274166 because it caused JSC tests to use too much memory.
Reverted changeset:
"[GTK] Reenable -fvisibility=hidden"
https://bugs.webkit.org/show_bug.cgi?id=181916
https://commits.webkit.org/r274166
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/glib/TestExpectations.json:
2021-08-20 Carlos Alberto Lopez Perez <clopez@igalia.com>
[build.webkit.org] GTK-Linux-64-bit-Release-Skip-Failing-Tests worker should run only layout tests
https://bugs.webkit.org/show_bug.cgi?id=229312
Reviewed by Jonathan Bedard.
Add a new factory for testing only layout tests and make this bot use it.
* CISupport/build-webkit-org/config.json:
* CISupport/build-webkit-org/factories.py:
(TestLayoutFactory):
(TestLayoutFactory.__init__):
* CISupport/build-webkit-org/factories_unittest.py:
(TestExpectedBuildSteps):
2021-08-20 Carlos Alberto Lopez Perez <clopez@igalia.com>
[ews-build.webkit.org] Add unit test with the expected build steps for each queue
https://bugs.webkit.org/show_bug.cgi?id=229319
Reviewed by Aakash Jain.
Add a unit test listing all the expected build steps for each queue
like the one added in r281286 for build.webkit.org
Also remove the previous unit tests to not duplicate test functionality.
And replace doble-quotes with single-ones on the test for build.webkit.org
* CISupport/build-webkit-org/factories_unittest.py:
(TestExpectedBuildSteps):
(TestExpectedBuildSteps.test_all_expected_steps):
(TestExpectedBuildSteps.test_unnecessary_expected_steps):
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
(TestExpectedBuildSteps.setUp):
(TestExpectedBuildSteps.test_all_expected_steps):
(TestExpectedBuildSteps.test_unnecessary_expected_steps):
2021-08-20 Youenn Fablet <youenn@apple.com>
Remove all WTR output before Content-Type:text/plain for WebRTC tests in case of known excessive logging
https://bugs.webkit.org/show_bug.cgi?id=229188
Reviewed by Jonathan Bedard.
Some logging beneath WebKit is making WebRTC tests flaky.
While we work on the cause of this bug, we can still beef-up our test output clean up steps to handle this logging.
Instead of stripping lines based on a known pattern, which does not always work as per current results,
we can simply remove all logging before the 'Content-Type:text/plain\n' string that WebKitTestRunner is adding before
printing the text generated by the test itself.
We update webkitpy scripts accordingly and add this new clean-up for:
- tests that have webrtc in their name
- tests whose output contain some known logging strings like 'LRP' or 'Negotiation String'.
This should hopefully be more robust while not hiding real regressions.
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner):
* Scripts/webkitpy/port/base.py:
(Port.logging_detectors_to_strip_text_start):
* Scripts/webkitpy/port/driver.py:
(DriverOutput.strip_text_start_if_needed):
* Scripts/webkitpy/port/mac.py:
(MacPort.logging_patterns_to_strip):
(MacPort.logging_detectors_to_strip_text_start):
2021-08-19 Carlos Alberto Lopez Perez <clopez@igalia.com>
[build.webkit.org] Port old unit test with the expected build steps to the new buildbot
https://bugs.webkit.org/show_bug.cgi?id=229311
Reviewed by Aakash Jain.
Port the test that checked every worker and the expected steps to the new buildbot version.
Also delete the file steps_unittest_old.py because the gross of the other tests contained in
this old file are already ported in the current steps_unittests.py
* CISupport/build-webkit-org/factories_unittest.py: Added.
(TestExpectedBuildSteps):
(TestExpectedBuildSteps.setUp):
(TestExpectedBuildSteps.test_all_expected_results):
(TestExpectedBuildSteps.test_unnecessary_expected_results):
* CISupport/build-webkit-org/steps_unittest_old.py: Removed.
2021-08-19 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Remove support for the meaningful tap heuristic
https://bugs.webkit.org/show_bug.cgi?id=229298
rdar://82130066
Reviewed by Tim Horton.
Remove test runner support for testing the meaningful tap heuristic.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::installDidHandleTapCallback): Deleted.
(WTR::TestRunner::callDidHandleTapCallback): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didHandleTap): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didHandleTap): Deleted.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView _didTapAtPoint:withResult:]): Deleted.
2021-08-19 Megan Gardner <megan_gardner@apple.com>
Turn on TestWebKitAPI.WKAttachmentTests.CopyAndPasteBetweenWebViews as it is now passing again.
https://bugs.webkit.org/show_bug.cgi?id=204969
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):
2021-08-19 Andres Gonzalez <andresg_22@apple.com>
Rename AccessibilityUIElement::setSelectedVisibleTextRange to setSelectedTextMarkerRange for naming consistency and maintainability.
https://bugs.webkit.org/show_bug.cgi?id=229290
<rdar://problem/82128453>
Reviewed by Chris Fleizach.
Renamed this method for consistency and to reflect what it is actually
doing. The goal is to avoid confusion with methods for VisiblePosition,
VisibleSelection and so forth, which are Core objects not exposed to AX
clients.
* DumpRenderTree/AccessibilityUIElement.cpp:
(setSelectedTextMarkerRangeCallback):
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::getJSClass):
(setSelectedVisibleTextRangeCallback): Deleted.
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setSelectedTextMarkerRange):
(AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::setSelectedTextMarkerRange):
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Deleted.
2021-08-19 Jonathan Bedard <jbedard@apple.com>
[run-webkit-tests] Handle json crash logs (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=229288
<rdar://problem/77074039>
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs._parse_darwin_crash_log): Attempt to parse crash logs as json, since Monterey .ips
(CrashLogs._find_newest_log_darwin.is_crash_log):
* Scripts/webkitpy/common/system/crashlogs_unittest.py:
2021-08-19 Carlos Garcia Campos <cgarcia@igalia.com>
document.hasFocus() returns true for unfocused pages
https://bugs.webkit.org/show_bug.cgi?id=229139
Reviewed by Adrian Perez de Castro.
Add a unit tests to check document.hasFocus() returns false when a web view is in the active window, but not focused.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST): Ensure web view is focused as required by credentials container.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewDocumentFocus):
(beforeAll):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView focus]):
2021-08-18 David Kilzer <ddkilzer@apple.com>
Bug 229265: run-webkit-tests --leaks should check for leaks in the GPU process
<https://webkit.org/b/229265>
<rdar://problem/82101453>
Reviewed by Alex Christensen.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::findAndDumpWebKitProcessIdentifiers):
- Include the GPU process PID if it's enabled when sending a
list of PIDs back to run-webkit-tests.
(WTR::TestController::gpuProcessName): Add.
* WebKitTestRunner/TestController.h:
(WTR::TestController::databaseProcessName): Delete.
- The implementation was removed a while ago.
(WTR::TestController::gpuProcessName): Add.
2021-08-18 Jonathan Bedard <jbedard@apple.com>
[run-webkit-tests] Remember failures when repeating test
https://bugs.webkit.org/show_bug.cgi?id=229217
<rdar://problem/81919223>
Reviewed by Ryan Haddad.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.update_summary_with_result): Replace existing result with unexpected result so
that unexpected results always take precedence over expected ones.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.add): Do not replace existing result.
2021-08-18 Lauro Moura <lmoura@igalia.com>
REGRESSION(r279169) [WebDriver] WPT Tools now requires python3 to launch the server
https://bugs.webkit.org/show_bug.cgi?id=229248
Reviewed by Chris Dumez.
239066@main updated the layout test WPT tools to
94d018bb5d7c0d46df7ba1 and this version requires Python3 to run the
WPT server.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
(WebDriverW3CWebServer.start):
2021-08-18 Andres Gonzalez <andresg_22@apple.com>
Add layout test for WebAccessibilityObjectWrapper handler for attribute AXLineForTextMarker on MacOS.
https://bugs.webkit.org/show_bug.cgi?id=229220
<rdar://problem/82057459>
Reviewed by Chris Fleizach.
Added AccessibilityUIElement::lineIndexForTextMarker.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::lineIndexForTextMarker const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::lineIndexForTextMarker const):
2021-08-18 Jonathan Bedard <jbedard@apple.com>
[git-webkit] "IndexError: list index out of range" using log
https://bugs.webkit.org/show_bug.cgi?id=229232
Reviewed by Ryan Haddad.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager):
2021-08-18 Michael Catanzaro <mcatanzaro@gnome.org>
REGRESSION(r280382): [GTK] 2.33.3 does not build with gtk-doc enabled, installs broken pkg-config files
https://bugs.webkit.org/show_bug.cgi?id=229152
Reviewed by Philippe Normand.
* glib/apply-build-revision-to-files.py:
(main):
2021-08-18 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add CallByNeed object
https://bugs.webkit.org/show_bug.cgi?id=229148
<rdar://problem/81817705>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Defer object.
* Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py: Added.
(CallByNeed):
(CallByNeed.__init__):
(CallByNeed.__getattribute__): Depending on the request attribute, either return it or attempt to
resolve the underlying value before returning the attribute of the resolved value.
(CallByNeed.value): Resolve and return underlying object.
(CallByNeed.__call__): Ditto.
(CallByNeed.__repr__): Resolve object and return representation.
(CallByNeed.__str__): Resolve object and return string conversion.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/call_by_need_unittest.py: Added.
(TestCallByNeed):
(TestCallByNeed.test_basic):
(TestCallByNeed.test_string_conversion):
(TestCallByNeed.test_attribute_forwarding):
(TestCallByNeed.test_failed_attribute_forwarding):
2021-08-18 Martin Robinson <mrobinson@webkit.org>
[Flatpak SDK] Increase the startup performance of webkit-flatpak
https://bugs.webkit.org/show_bug.cgi?id=229185
Reviewed by Philippe Normand.
Improve flatpakutils.py by ensuring that we don't make redundant
calls to flatpak during initialization of the data structures. This
saves 5 seconds on every call to build-webkit and run-webkit-tests.
Before:
$ time ./Tools/Scripts/webkit-flatpak -c true
real 0m6,297s
user 0m0,786s
sys 0m0,513s
After:
$ time ./Tools/Scripts/webkit-flatpak -c true
real 0m1,243s
user 0m0,375s
sys 0m0,162s
* flatpak/flatpakutils.py:
(FlatpakPackages.__init__): Separate the update into another
method so that it can be called directly when a package is installed.
Add new packages directly to self.packages.
(FlatpakRepos.__init__): Ensure that we only update our repositories
and package list once we've initialized our list of repositories.
(FlatpakRepos.add): Return True if this method actually changed anything
and accept a parameter determining whether an update is done to
the repository and package list.
(FlatpakRepos.is_package_installed): Added this method which replaces
FlatpakRepo.is_app_installed.
(FlatpakRepo.__init__): Remove the app registry because it is duplicated
by FlatpakPackages.
(FlatpakPackage.is_installed): Now call FlatpakRepos.is_package_installed.
(WebkitFlatpak._reset_repository): Set up both repositories here and
pass then as part of the FlatpakRepos constructor.
(WebkitFlatpak.main): Separate out the check which deletes the Flatpak
repository from the one that checks if the packages are installed. This
makes sure we don't install packages and then immediately delete them.
(WebkitFlatpak.check_installed_packages): rename _get_packages to _get_dependency_packages
in order to make it clear that it doesn't return installed packages.
(WebkitFlatpak._get_dependency_packages): Ditto.
(WebkitFlatpak.install_all): Ditto.
(FlatpakRepo.is_app_installed): Deleted.
(WebkitFlatpak._get_packages): Deleted.
2021-08-17 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Return SourceFileLoader in find_module
https://bugs.webkit.org/show_bug.cgi?id=229172
<rdar://problem/82006256>
Reviewed by Stephanie Lewis.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall.find_module): Return SourceFileLoader object in Python 3.
2021-08-17 Lauro Moura <lmoura@igalia.com>
[GLIB] Avoid getting stuck searching for revision in some cases
https://bugs.webkit.org/show_bug.cgi?id=229199
Reviewed by Philippe Normand.
With an empty .git/svn, the `git svn info` command might get stuck.
* glib/apply-build-revision-to-files.py:
(get_build_revision):
2021-08-16 Lauro Moura <lmoura@igalia.com>
REGRESSION(r281079) [GLIB] API test WebKitWebsiteData/deviceidhashsalt is not waiting for title change
https://bugs.webkit.org/show_bug.cgi?id=229174
Reviewed by Carlos Garcia Campos.
r281079 changed the helper method waitUntilTitleChangedTo to
immediately return if the current title is already the expected one.
While this is working fine in other tests, the deviceidhashsalt tries
to load the same page twice. As the title does not change, the call
returns right away, before the expected side effects of the load
happen.
This commit adds a dummy "about:blank" call between both original
calls to make sure we track the title change correctly.
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataDeviceIdHashSalt):
2021-08-16 Andres Gonzalez <andresg_22@apple.com>
Expose [WebAccessibilityObjectWrapper lineRectsAndText] on MacOS.
https://bugs.webkit.org/show_bug.cgi?id=229045
<rdar://81819301>
Reviewed by Chris Fleizach.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::attributedStringForElement):
(WTR::AccessibilityUIElement::lineRectsAndText const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::lineRectsAndText const):
2021-08-16 Ryosuke Niwa <rniwa@webkit.org>
Add thread safe version of CanMakeCheckedPtr
https://bugs.webkit.org/show_bug.cgi?id=229018
Reviewed by Geoffrey Garen.
Added a unit test for CanMakeThreadSafeCheckedPtr
* TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:
(TestWebKitAPI.ThreadSafeCheckedPtrObject)
(WTF_CheckedPtr.CanMakeThreadSafeCheckedPtr): Added.
2021-08-16 Alex Christensen <achristensen@webkit.org>
Fix Catalyst TestWebKitAPI build
https://bugs.webkit.org/show_bug.cgi?id=229091
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Configurations/Base.xcconfig:
Search the correct SDK paths.
* TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:
(TestWebKitAPI::TEST):
Use soft linking for VisionKitCore like we do elsewyere.
2021-08-16 Philippe Normand <pnormand@igalia.com>
[WPE][GTK] Clean build broken with python3 after r280382
https://bugs.webkit.org/show_bug.cgi?id=228628
Reviewed by Adrian Perez de Castro.
The webkitpy autoinstall doesn't reliably work when it's triggered from concurrent
processes. Replace webkitpy usage in apply-build-revision-to-files.py script with explicit
calls to svnversion, git svn info or git log -1, depending on the kind of SCM checkout.
* glib/apply-build-revision-to-files.py:
(get_build_revision):
(main):
2021-08-16 David Kilzer <ddkilzer@apple.com>
"make analyze" should run clang static analyzer in deep mode
<https://webkit.org/b/229127>
<rdar://problem/81960587>
Reviewed by Alexey Proskuryakov.
* DumpRenderTree/Scripts/generate-derived-sources.sh:
* WebKitTestRunner/Scripts/generate-derived-sources.sh:
- Treat "analyze" the same as "build" for "ACTION" environment
variable.
2021-08-16 Philippe Normand <pnormand@igalia.com>
[GLib] Enable mediastream setting if it's enabled at build-time
https://bugs.webkit.org/show_bug.cgi?id=229134
Reviewed by Adrian Perez de Castro.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings):
2021-08-16 David Kilzer <ddkilzer@apple.com>
Fix ASan+UBSan builds with Xcode 13
<https://webkit.org/b/229122>
Reviewed by Alexey Proskuryakov.
* Scripts/webkitdirs.pm:
(XcodeOptions):
- Use asan+ubsan.xcconfig when both are enabled.
* sanitizer/asan+ubsan.xcconfig: Add.
2021-08-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r281077.
https://bugs.webkit.org/show_bug.cgi?id=229137
broke GTK/WPE builds
Reverted changeset:
"[WPE][GTK] Clean build broken with python3 after r280382"
https://bugs.webkit.org/show_bug.cgi?id=228628
https://commits.webkit.org/r281077
2021-08-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Test WebKitWebView/page-visibility is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=214804
Reviewed by Adrian Perez de Castro.
Do not wait for title change if the title already changed.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewPageVisibility):
* TestWebKitAPI/glib/TestExpectations.json:
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::waitUntilTitleChangedTo):
(WebViewTest::waitUntilTitleChanged):
2021-08-16 Philippe Normand <pnormand@igalia.com>
[WPE][GTK] Clean build broken with python3 after r280382
https://bugs.webkit.org/show_bug.cgi?id=228628
Reviewed by Adrian Perez de Castro.
The webkitpy autoinstall doesn't reliably work when it's triggered from concurrent
processes. Replace webkitpy usage in apply-build-revision-to-files.py script with explicit
calls to svnversion, git svn info or git log -1, depending on the kind of SCM checkout.
* glib/apply-build-revision-to-files.py:
(get_build_revision):
(main):
2021-08-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK distcheck build
* gtk/manifest.txt.in: Add missingImage@3x.png to the tarball.
2021-08-15 Miguel Gomez <magomez@igalia.com>
[GTK][WPE] Add API to pass WebKitMemoryPressureHandler parameters to the network processes
https://bugs.webkit.org/show_bug.cgi?id=228227
Reviewed by Carlos Garcia Campos.
Added an API test for webkit_website_data_manager_set_memory_pressure_settings().
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(MemoryPressureTest::setup):
(MemoryPressureTest::teardown):
(MemoryPressureTest::loadFailedCallback):
(MemoryPressureTest::waitUntilLoadFailed):
(testMemoryPressureSettings):
(beforeAll):
2021-08-15 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS 15] editing/selection/ios/select-all-in-readonly-input-does-not-overflow.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=229126
rdar://80384801
Reviewed by Tim Horton.
This test exercises the ability to cause platform selection views to show up after tapping the web view while a
DOM selection is set. In this codepath, selection views are installed when the web view becomes first responder,
when we call into `-[UIWKTextInteractionAssistant activateSelection]`; the call to `-becomeFirstResponder`, in
turn, comes from UIKit's internal `UITextTapRecognizer` gesture, which recognizes the single tap and makes the
content view first responder.
In the case where this test fails, the synthesized tap gesture fails to activate the text tap recognizer; this
happens because the timing of when the `UITextTapRecognizer` gets reset (i.e. `-_resetGestureRecognizer`) races
against the timing of when the synthesized touch event is sent to the gesture recognizer. When the touch is
delivered to the gesture *before* the text tap gesture is reset, we end up timing out because the text tap
gesture's action never fires and makes the content view first responder.
To ensure that we don't lose this race and time out, we augment the existing mechanism in
`UIScriptControllerIOS::waitForSingleTapToReset()` to wait for *all* enabled single tap (and single touch)
gestures to reset, instead of only waiting for the web view's synthetic click gesture. Importantly, this
includes `UITextTapRecognizer`, which ensures that the touches are delivered to the gesture only after the text
tap gesture has been reset (and transitions to Possible state).
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::waitForSingleTapToReset const):
Instead of using testing SPI (`-_doAfterResettingSingleTapGesture:`) to wait for the single tap to reset, we can
just directly iterate through all the gestures on the content view and wait for all enabled single tap gestures
to transition back to Possible state.
2021-08-13 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Fix SVN relative URL parsing
https://bugs.webkit.org/show_bug.cgi?id=229075
<rdar://problem/81868773>
Reviewed by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.branch): Check if relative URL path contains local path before stripping local path.
2021-08-13 Lauro Moura <lmoura@igalia.com>
[WPE] WebExtension API test /webkit/WebKitWebView/web-process-crashed is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=229067
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
(testWebKitWebViewProcessCrashed): Make warnings non-fatal while waiting for the crash.
* TestWebKitAPI/glib/TestExpectations.json: Remove expectation
2021-08-13 Martin Robinson <mrobinson@webkit.org>
Get lint-test-expectations passing
https://bugs.webkit.org/show_bug.cgi?id=228999
Reviewed by Ryan Haddad.
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
(LayoutTestFinder._is_test_file): Added a list of patterns for tests to skip
and ensured that 'boot.xml' and 'root.xml' (spurious files created during
the run of the WebKit1 bot) are on the list.
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py:
(LayoutTestFinderTests.test_is_test_file): Added a test for the changes.
2021-08-12 Lauro Moura <lmoura@igalia.com>
[WPE] Gardening web-process-crashed API test failure
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-08-12 Chris Dumez <cdumez@apple.com>
REGRESSION (iPadOS 14): [ iPadOS wk2 ] TestWebKitAPI.ServiceWorkers.SuspendNetworkProcess is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217714
<rdar://problem/70296664>
Reviewed by Geoffrey Garen.
Give the database some time to get written out to disk before we try and suspend the network process, to try
and address the flakiness.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2021-08-12 Wenson Hsieh <wenson_hsieh@apple.com>
[ iOS Debug] 3 editing/pasteboard/smart-paste-paragraph tests are flaky failing
https://bugs.webkit.org/show_bug.cgi?id=228285
rdar://81118724
Reviewed by Tim Horton and Aditya Keerthi.
These three editing tests occasionally fail when synthesizing a double-tap gesture in order to select a word in
editable content. This happens because unless UIKit has observed at least one keypress event (e.g. from a
previous editing test), it presents the software keyboard underneath `-[UIKeyboardImpl showKeyboardIfNeeded]`
when setting the selection via UITextSelectionInteraction. This causes the input view frame to expand from the
collapsed (UCB) height of 44pt to the full software keyboard height, which in turn causes the second touch in
the synthesized double tap gesture to _sometimes_ hit-test to the wrong location, resulting in these test
failures.
To mitigate this, ensure that we have consistent behavior in layout tests when changing the text selection in
editable content by directly setting a TextInput default to make the keyboard behave as if it has previously
seen a keypress via the hardware keyboard.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
2021-08-12 Patrick Angle <pangle@apple.com>
Add myself (Patrick Angle) to watchlist for Inspector code changes
https://bugs.webkit.org/show_bug.cgi?id=229046
Reviewed by Darin Adler.
* Scripts/webkitpy/common/config/watchlist:
2021-08-12 Sam Weinig <weinig@apple.com>
Allow testing of the final UIView tree on iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=229016
Reviewed by Tim Horton.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::uiViewTreeAsText const):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::uiViewTreeAsText const):
Pipe new _uiViewTreeAsText SPI through to UIScriptController, matching the pattern
established by scrollingTreeAsText.
2021-08-12 Devin Rousso <drousso@apple.com>
Fix some `NSAttributedString` inconsistencies between WK1 and WK2
https://bugs.webkit.org/show_bug.cgi?id=229013
<rdar://problem/81215696>
Reviewed by Timothy Hatcher.
* TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm: Added.
(TEST.NSAttributedStringWebKitAdditions.DefaultFontSize):
(TEST.NSAttributedStringWebKitAdditions.MultipleParagraphs):
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2021-08-12 Youenn Fablet <youenn@apple.com>
Adopt span in RTCRtpSFrameTransform
https://bugs.webkit.org/show_bug.cgi?id=229029
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebCore/RTCRtpSFrameTransformerTests.cpp:
(TestWebKitAPI::TEST):
2021-08-12 Chris Dumez <cdumez@apple.com>
Unreviewed API test build fix with recent MacOS SDK.
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(verifyCertificateAndPublicKey):
2021-08-12 Jonathan Bedard <jbedard@apple.com>
[check-github-mirror-integrity] Differentiate between slow sync and collapsed commits
https://bugs.webkit.org/show_bug.cgi?id=229004
<rdar://problem/81795644>
Reviewed by Aakash Jain.
* Scripts/check-github-mirror-integrity: Use commit timestamps to differentiate between a slow sync between svn.webkit.org
and GitHub and git-svn combining commits
2021-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Simplify TestWebKitAccessibility
https://bugs.webkit.org/show_bug.cgi?id=229032
Reviewed by Michael Catanzaro.
We don't really need to have a different process to test a11y. We can remove AccessibilityTestServer and use the
same test executable. That way we don't need to spawn a process and use DBus for the communication.
* TestWebKitAPI/Tests/WebKitGtk/AccessibilityTestServer.cpp: Removed.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(AccessibilityTest::findTestApplication): Find the accessible application corresponding to the test executable.
(AccessibilityTest::waitUntilChildrenRemoved): Use the WebViewTest main loop.
(testAtspiBasicHierarchy): Use WebViewTest::loadHtml.
* TestWebKitAPI/glib/PlatformGTK.cmake:
* TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:
(main): Set the program name to the executable name. It helps to a11y test to find the accessible app.
2021-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] run-gtk-tests always fails to start accessibility daemons
https://bugs.webkit.org/show_bug.cgi?id=229031
Reviewed by Michael Catanzaro.
This is because it uses exec_prefix variable from atspi2 pkg-config file to try to find the executables, but
atspi2 pkg-config file doesn't have a exec_prefix variable anymore. It was always set to $prefix, so we can just
use prefix variable instead.
* Scripts/run-gtk-tests:
(GtkTestRunner._lookup_atspi2_binary):
2021-08-12 Youenn Fablet <youenn@apple.com>
Implement SFrameTransform error handling
https://bugs.webkit.org/show_bug.cgi?id=228947
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebCore/RTCRtpSFrameTransformerTests.cpp:
(TestWebKitAPI::TEST):
2021-08-11 Peng Liu <peng.liu6@apple.com>
[ BigSur Debug ] TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource is flaky, hitting ASSERTION FAILED: !isInRoutingArbitrationForToken(token)
https://bugs.webkit.org/show_bug.cgi?id=227728
<rdar://problem/80237464>
Reviewed by Jer Noble.
* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
2021-08-11 Youenn Fablet <youenn@apple.com>
Media element is not always autoplaying when going from background to foreground if it is initially not in viewport
https://bugs.webkit.org/show_bug.cgi?id=228955
rdar://81751653
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
2021-08-11 Lauro Moura <lmoura@igalia.com>
[WPE] Handle escape key in wpeKeySymForKeyRef
https://bugs.webkit.org/show_bug.cgi?id=228981
Reviewed by Carlos Garcia Campos.
Some dialog tests were failing due to "escape" key ref being
translated to the 'e' keysym.
Covered by existing tests.
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::wpeKeySymForKeyRef):
2021-08-10 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Stop relying on device.plist for simulated device state
https://bugs.webkit.org/show_bug.cgi?id=228974
<rdar://problem/81749547>
Reviewed by Stephanie Lewis.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager):
(SimulatedDeviceManager.populate_available_devices): Device state check is now shared between simulators.
(SimulatedDeviceManager._disambiguate_device_type): Only extract hardware family and type from candidate.
(SimulatedDevice.__init__): Device state check is now shared between simulators.
(SimulatedDevice.state): Use 'xcrun simctl list' instead of device.plist.
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
(SimulatedDeviceTest.change_state_to): Deleted.
(SimulatedDeviceTest.test_swapping_devices): Deleted.
2021-08-10 Cameron McCormack <heycam@apple.com>
Restore color profiles correctly on displays with multiple named modes
https://bugs.webkit.org/show_bug.cgi?id=228313
<rdar://problem/81146417>
Reviewed by Alexey Proskuryakov.
Look up a device's current color profile by checking the default mode
rather than assuming it is "1". The device info dictionary returned
by ColorSyncDeviceCopyDeviceInfo has this shape:
{
CustomProfiles = {
ModeName1 = "file:///path/to/custom/profile.ics";
};
FactoryProfiles = {
DeviceDefaultProfileID = "ModeName1";
ModeName1 = {
DeviceModeDescription = "Mode Name 1";
DeviceProfileURL = "file:///path/to/factory/profile1.ics";
};
ModeName2 = {
DeviceModeDescription = "Mode Name 2";
DeviceProfileURL = "file:///path/to/factory/profile2.ics";
};
};
}
where CustomProfiles is only present if a custom profile has been
selected, and the default mode name is "1". Displays connected over
HDMI don't use the default mode name.
* DumpRenderTree/mac/LayoutTestHelper.m:
(colorProfileURLForDisplay):
2021-08-09 Jonathan Bedard <jbedard@apple.com>
[resultsdbpy] Add results-summary API
https://bugs.webkit.org/show_bug.cgi?id=226894
<rdar://problem/79155181>
Reviewed by Aakash Jain.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py:
(APIRoutes.__init__): Add aggregate-results endpoint.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:
(commit_for_query): Add decorator which converts a set of arguments into a single commit.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:
(TestController):
(TestController.summarize_test_results): Given a single commit and suite/test combination, compute
the liklihood of each potential result.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller_unittest.py:
(TestControllerTest.test_summarize_general): Added.
(TestControllerTest.test_summarize_specific): Added.
(TestControllerTest.test_summarize_expectations): Added.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:
(CommitContext.find_commits_in_range): Use ascended table if user only provides lower bound.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:
(CommitContextTest.test_stash_commits_before): Verify upper bound.
(CommitContextTest.test_svn_commits_before): Ditto.
(CommitContextTest.test_stash_commits_after): Verify lower bound.
(CommitContextTest.test_svn_commits_after): Ditto.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html: Add aggregate-results
documentation.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.
2021-08-10 Tim Horton <timothy_horton@apple.com>
macCatalyst: Flexible viewport tests that dump the window size fail because it doesn't match iPad
https://bugs.webkit.org/show_bug.cgi?id=228964
Reviewed by Darin Adler.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformConfigureViewForTest):
For platforms where we control the size of the window/scene, resize it
to match the chosen default testing iPad size (768x1024), but with the
default testing iPad's status bar subtracted out, and the current platform's
added in, so that the end result is a WKWebView of identical size to
one on the default testing iPad.
2021-08-10 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Color `log` output
https://bugs.webkit.org/show_bug.cgi?id=228662
<rdar://problem/81344181>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Terminal.
* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: Added.
(Terminal):
(Terminal.assert_writeable_stream): Assert that the provided object is a writable stream.
(Terminal.supports_color): Check if the provided file supports colored output.
(Terminal.isatty): Check if a stream is an atty, both according to the stream itself and our override.
(Terminal.override_atty): Allow callers to override and declare explicitly if a stream is an atty.
(Terminal.Text): Group text colors and styles.
(Terminal.Style): Group functions modifying style of a stream.
(Terminal.Style.enabled): Check if styled printing is enabled on a stream.
(Terminal.Style.disable): Disable styled printing on a stream.
(Terminal.Style.enable): Enable styled printing on a stream.
(Terminal.Style.is_styled): Check if a stream is currently styled.
(Terminal.Style.__init__): Construct a text style.
(Terminal.Style.__repr__): Output the terminal characters styling a stream.
(Terminal.Style.set): Apply style to a stream.
(Terminal.Style.apply): Apply style to a stream, unapply when exiting context.
* Scripts/libraries/webkitscmpy/setup.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py: Pass isatty to child process.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager): Pass isatty to child process, ask 'more' to display colors.
(FilteredCommand.main): Color header and error.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py: Pass isatty to child process.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py: Override atty behavior.
2021-08-10 Ben Nham <nham@apple.com>
Fix nested resource load tracepoints
https://bugs.webkit.org/show_bug.cgi?id=228242
Reviewed by Alex Christensen.
Use page and resource ids to properly handle nested main resource and subresource load
tracepoint intervals.
* Tracing/SystemTracePoints.plist:
2021-08-10 Kimmo Kinnunen <kkinnunen@apple.com>
Scripts/generate-derived-sources.sh: line 19: [: binary operator expected while building Source/WebKit
https://bugs.webkit.org/show_bug.cgi?id=228908
Reviewed by Per Arne Vollan.
* DumpRenderTree/Scripts/generate-derived-sources.sh:
* WebKitTestRunner/Scripts/generate-derived-sources.sh:
Quote the use of CC so that future copy-paste does not make the same mistake
as this bug.
2021-08-10 Devin Rousso <drousso@apple.com>
[macOS] REGRESSION(r278850): modifying `playbackRate` via JS on a TouchBar mac only sometimes works and also causes the `defaultPlaybackRate` to change
https://bugs.webkit.org/show_bug.cgi?id=228939
<rdar://problem/80427578>
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST.VideoControlsManager.VideoControlsManagerDoesNotChangeValuesExposedToJavaScript): Added.
2021-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
caret-color does not work on first click in ios
https://bugs.webkit.org/show_bug.cgi?id=228859
rdar://81674787
Reviewed by Tim Horton.
Make it possible to test this bug by adding a UIScriptController hook to request the background color of the
current selection view's caret view, as serialized CSS text. See LayoutTests/ChangeLog for more details.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::selectionCaretBackgroundColor const):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::selectionCaretBackgroundColor const):
2021-08-07 Aakash Jain <aakash_jain@apple.com>
[ews] Limit the size of error context buffer
https://bugs.webkit.org/show_bug.cgi?id=228900
Reviewed by Alexey Proskuryakov.
* CISupport/ews-build/steps.py:
(BuildLogLineObserver.outLineReceived): Limit the lines for additional context to 50 lines.
2021-08-07 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] Web process crashes when detaching Document with uncommitted marked text
https://bugs.webkit.org/show_bug.cgi?id=228841
rdar://79960890
Reviewed by Ryosuke Niwa.
Make a small adjustment to DumpRenderTree, such that TextInputController targets the selected frame (or the main
frame, if there is no DOM selection). This behavior matches that of WebKitTestRunner, and allows layout tests
that use TextInputController to simulate setting marked text inside subframes.
* DumpRenderTree/mac/TextInputControllerMac.m:
(-[TextInputController selectedOrMainFrame]):
(-[TextInputController textInput]):
2021-08-07 Aakash Jain <aakash_jain@apple.com>
[ews] Ensure file handle is not leaked in loadConfig.py
https://bugs.webkit.org/show_bug.cgi?id=228866
Reviewed by Alexey Proskuryakov.
* CISupport/build-webkit-org/loadConfig.py:
(loadBuilderConfig):
* CISupport/ews-build/loadConfig.py:
(loadBuilderConfig):
2021-08-06 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add setup function
https://bugs.webkit.org/show_bug.cgi?id=225985
<rdar://problem/78226729>
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): Key should be pulled from environment variable with key_name in it.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git): Move config regexes.
(Git.__init__): Add `git remote add`, `git config` and `git fetch fork`.
(Git.config): Add user.email to default configuration.
(Git.edit_config): Modify configuration file.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub): Add list of forks.
(GitHub.__enter__): Correctly mock token.
(GitHub.request): Add fork check and fork addition.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Add setup function.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.credentials): Strip email domain, guide user on token permissions.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: Added.
(Setup.github): Ensure that GitHub credentials are in the keychain.
(Setup.git): Set the user for the repository, along with merge strategy.
(Setup.parser):
(Setup.main):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(test_config): Change user name.
(test_global_config): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: Added.
(TestSetup):
(TestSetup.setUp):
(TestSetup.test_svn):
(TestSetup.test_github):
(TestSetup.test_git):
(TestSetup.test_github_checkout):
2021-08-06 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][WebKitTestRunner] WTR::PlatformWebView leaks m_view (WKViewRef)
https://bugs.webkit.org/show_bug.cgi?id=228857
Reviewed by Don Olmstead.
Windows WebKitTestRunner leaked a lot of object because it leaked
WebKit::WebView that retains WebKit::WebPageProxy.
* WebKitTestRunner/win/PlatformWebViewWin.cpp:
(WTR::PlatformWebView::~PlatformWebView): Release m_view.
2021-08-06 Youenn Fablet <youenn@apple.com>
[GPUP] Test WebKit2.CrashGPUProcessAfterApplyingConstraints fails when Media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=228759
<rdar://problem/81529641>
Reviewed by Geoffrey Garen.
* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
Reenable test.
2021-08-06 Aakash Jain <aakash_jain@apple.com>
[ews] Make config.json compact
https://bugs.webkit.org/show_bug.cgi?id=228862
Reviewed by Jonathan Bedard.
* CISupport/ews-build/config.json:
2021-08-05 Diego Pino Garcia <dpino@igalia.com>
[buildbot] Add new post-commit bot to build WPE on Ubuntu-LTS
https://bugs.webkit.org/show_bug.cgi?id=228535
Reviewed by Alexey Proskuryakov.
Currently we only had a bot to build WebKitGTK on Ubuntu LTS. This is
not enough to detect build regressions in WPE.
* CISupport/build-webkit-org/config.json:
2021-08-05 Kate Cheney <katherine_cheney@apple.com>
LoadWebArchive.FailNavigation1 test is a false positive
https://bugs.webkit.org/show_bug.cgi?id=228848
<rdar://problem/81587448>
Reviewed by Brent Fulgham.
Update LoadWebArchive.FailNavigation1 to test the case of a webarchive
being loaded with a host for better test coverage.
* TestWebKitAPI/Tests/mac/load-web-archive-1.html:
2021-08-05 Ryan Haddad <ryanhaddad@apple.com>
REGRESSION (r279855): TestWebKitAPI.AppleLanguagesTest.UpdateAppleLanguages is failing
https://bugs.webkit.org/show_bug.cgi?id=228309
Unreviewed test gardening.
This test has been skipped on Apple Silicon because of timeouts, and
now it is a flaky failure on Intel machines. Disable it outright for
the time be ing.
* TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm:
(TEST_F):
2021-08-05 Zan Dobersek <zdobersek@igalia.com>
run-jsc-stress-tests: detect the riscv64 architecture
https://bugs.webkit.org/show_bug.cgi?id=228817
Reviewed by Adrian Perez de Castro.
* Scripts/run-jsc-stress-tests: Detect the riscv64 architecture when
examining ELF binaries. For the moment, this architecture should be
marked as not supporting FTL.
2021-08-04 Peng Liu <peng.liu6@apple.com>
[Catalina][GPUP] Some API tests fail after GPU Process features are enabled
https://bugs.webkit.org/show_bug.cgi?id=228589
Reviewed by Jer Noble.
* TestWebKitAPI/Tests/WebKitCocoa/AudioBufferSize.mm:
(TestWebKitAPI::TEST):
2021-08-04 Jonathan Bedard <jbedard@apple.com>
[check-github-mirror-integrity] Store remote cache in checkout
https://bugs.webkit.org/show_bug.cgi?id=228792
<rdar://problem/81527357>
Reviewed by Aakash Jain.
* Scripts/check-github-mirror-integrity: Use the local checkout to store the svn.webkit.org, if possible.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
(Svn.__init__): Allow caller to define cache path.
(Svn._cache_path): Deleted.
2021-08-04 Jonathan Bedard <jbedard@apple.com>
[check-github-mirror-integrity] Compare current time to canonical time
https://bugs.webkit.org/show_bug.cgi?id=228787
<rdar://problem/81524499>
Reviewed by Aakash Jain.
* Scripts/check-github-mirror-integrity: If the mirror isn't in line with the canonical repository, we should
check against the current time, not the time of last commit on the mirror.
2021-08-03 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Tweak the formatting for passing NSArrays to TextStreams
https://bugs.webkit.org/show_bug.cgi?id=228766
Reviewed by Simon Fraser.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.cpp: Added.
(TEST):
* TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.mm: Added.
(TEST):
2021-08-04 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add shared terminal input code
https://bugs.webkit.org/show_bug.cgi?id=226024
<rdar://problem/78261645>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Export Terminal object, bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): Use Terminal.input.
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/__init__.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/terminal.py: Added.
(Terminal):
(Terminal.input): Mocking input and raw_input requires so specialized knowledge,
so we should generalize it.
* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: Added.
(Terminal):
(Terminal.input): Python 2/3 compatible input function.
(Terminal.choose): Generic multiple-choice input prompt.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py: Added.
(TerminalTests):
(TerminalTests.test_choose_basic):
(TerminalTests.test_choose_strict):
(TerminalTests.test_choose_default):
(TerminalTests.test_choose_triple):
(TerminalTests.test_choose_number):
* Scripts/webkitpy/common/system/user.py:
(User.prompt): Use Terminal.input.
(User.prompt_with_multiple_lists): Ditto.
(User.prompt_with_list): Ditto.
(User.confirm): Ditto.
* Scripts/webkitpy/common/system/user_mock.py:
(MockUser.prompt): Use Terminal.input.
(MockUser.prompt_with_list): Ditto.
2021-08-04 Andres Gonzalez <andresg_22@apple.com>
Add contributor to accessibility watchlist.
https://bugs.webkit.org/show_bug.cgi?id=228775
Reviewed by Chris Fleizach.
* Scripts/webkitpy/common/config/watchlist: Added andresg_22@apple.com to accessibility watchlist.
2021-08-03 Risul Islam <risul_islam@apple.com>
Add functions for parsing URL query string
https://bugs.webkit.org/show_bug.cgi?id=228122
Reviewed by Darin Adler.
Added the test functions required for parsing URL query string.
* TestWebKitAPI/Tests/WTF/URL.cpp:
(TestWebKitAPI::TEST_F):
2021-08-03 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Handle case where no existing simulators are defined
https://bugs.webkit.org/show_bug.cgi?id=228758
<rdar://problem/81484040>
Reviewed by Ryan Haddad.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._disambiguate_device_type): If there are no available devices,
find the newest device identifier which matches the requested type.
2021-08-03 Jonathan Bedard <jbedard@apple.com>
[build.webkit.org] Simulator temp files filling up disk (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=228335
<rdar://problem/81171840>
Reviewed by Ryan Haddad.
* CISupport/kill-old-processes:
(main): Use tempdir environment variable, link to underlying bug.
2021-08-03 Jer Noble <jer.noble@apple.com>
WebKitTestRunner should dump current results in the case of a timeout
https://bugs.webkit.org/show_bug.cgi?id=228706
<rdar://79154019>
Reviewed by Jonathan Bedard.
When WKTR encounters a timeout, it current prints a "PID UNRESPONSIVE" and "FAIL: timed out" message,
but the WebContent process may not actually be unresponsive; it may just be waiting for an event
which hasn't fired, or a condition to become true. In these cases, it would be very helpful to see
the results of the test so far, so as to diagnose what is keeping the test from running to completion.
When, in the WKTR process, TestInvocation's "waitToDumpWatchdogTimer" fires, first try sending a message
to the InjectedBundle, requesting it to "ForceImmediateCompletion". Only if this message fails to be
acted upon will WKTR print the "PID UNRESPONSIVE" message.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::TestInvocation):
(WTR::TestInvocation::waitToDumpWatchdogTimerFired):
(WTR::TestInvocation::initializeWaitForPostDumpWatchdogTimerIfNeeded):
(WTR::TestInvocation::invalidateWaitForPostDumpWatchdogTimer):
(WTR::TestInvocation::waitForPostDumpWatchdogTimerFired):
(WTR::TestInvocation::done):
* WebKitTestRunner/TestInvocation.h:
2021-08-03 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Narrow set of terminated simulator processes
https://bugs.webkit.org/show_bug.cgi?id=228752
<rdar://problem/81479508>
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager.initialize_devices): Only check Simulator.app.
(SimulatedDeviceManager.tear_down): Only kill Simulator.app processes.
(SimulatedDevice._delete): Print error if `simctl delete` fails, but continue.
2021-08-03 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Add access to `git config`
https://bugs.webkit.org/show_bug.cgi?id=228597
<rdar://problem/81283644>
Reviewed by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.config): Return git configuration as dictionary.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(test_config): Test repository configuration.
(test_global_config): Test global configuration.
2021-08-03 Jonathan Bedard <jbedard@apple.com>
[check-github-mirror-integrity] Handle slow Svn query
https://bugs.webkit.org/show_bug.cgi?id=228741
Reviewed by Aakash Jain.
* Scripts/check-github-mirror-integrity: Pull commit from GitHub before Subversion.
2021-08-03 Philippe Normand <pnormand@igalia.com>
[WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake
https://bugs.webkit.org/show_bug.cgi?id=228290
Reviewed by Michael Catanzaro.
The apply-build-revision-to-files.py script wasn't expanding the BUILD_REVISION beyond the
first run, because it processes files generated by CMake already, and expanding the
BUILD_REVISION once prevents further expansions. So the proposed solution is to always
expand BuildRevision.h.in from that script, and for .pc files, to restore the BUILD_REVISION
template before updating the file.
* glib/apply-build-revision-to-files.py:
(main):
2021-08-02 Peng Liu <peng.liu6@apple.com>
[GPUP] RemoteAudioSession::setPreferredBufferSize() does not change its preferredBufferSize
https://bugs.webkit.org/show_bug.cgi?id=228720
Reviewed by Jer Noble.
* TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
(TEST_F):
2021-08-02 Alex Christensen <achristensen@webkit.org>
Don't change invalid baseURLs from loadData or loadHTMLString to about:blank
https://bugs.webkit.org/show_bug.cgi?id=228717
<rdar://79909343>
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
(TEST):
2021-08-02 Kevin Neal <kevin_neal@apple.com>
[results.webkit.org] Fix incorrect conditional check
https://bugs.webkit.org/show_bug.cgi?id=228666
Reviewed by Jonathan Bedard.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:
2021-08-02 Ryosuke Niwa <rniwa@webkit.org>
Add CheckedRef
https://bugs.webkit.org/show_bug.cgi?id=227164
Reviewed by Geoffrey Garen.
Added some unit tests for CheckedRef and updated the unit tests
for CheckedPtr per the removal of makeCheckedPtr.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:
(WTF_CheckedPtr.CheckedRef): Added
* TestWebKitAPI/Tests/WTF/CheckedRef.cpp: Added.
(TestWebKitAPI..CheckedObject): Added.
(TestWebKitAPI..DerivedCheckedObject): Added.
(WTF_CheckedRef.Basic): Added.
(WTF_CheckedRef.DerivedClass): Added.
(WTF_CheckedRef.HashSet): Added.
2021-08-02 Russell Epstein <repstein@apple.com>
Add basestring compatibility for Python3 in webkitcorepy.
https://bugs.webkit.org/show_bug.cgi?id=228707
Reviewed by Jonathan Bedard.
* Scripts/libraries/webkitcorepy/setup.py: Bumped version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/string_utils.py: Added
basestring compatibility for Python3.
2021-08-02 Lauro Moura <lmoura@igalia.com>
[GLIB] Make CORS allowlist test wait for promise resolution
https://bugs.webkit.org/show_bug.cgi?id=228695
Reviewed by Michael Catanzaro.
r278456 introduced a CORS allow list test that tries to fetch a
resource using the fetch() function, which returns a promise. This is
working on GTK but in WPE the test fails as the promise is not yet
resolved by the time the test variable is checked.
This commit changes the test to actually report the promise failure
through catch() and wait for its resolution before checking the values.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewCORSAllowlist):
2021-08-01 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][DumpRenderTree] Clean up IndexedDB files between tests
https://bugs.webkit.org/show_bug.cgi?id=228692
Reviewed by Ryosuke Niwa.
storage/indexeddb/getdatabases.html was failing because it counted
up the remaining databases of previous tests.
Mac DRT removes IndexedDB after the testing (Bug 192796, r240358).
Win DRT also should do it.
* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest): Call TestRunner::clearAllDatabases after the testing.
2021-07-31 Alexander Mikhaylenko <alexm@gnome.org>
Add myself (Alexander Mikhaylenko) to contributors.json as a committer
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-07-30 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Forward errors from log and blame
https://bugs.webkit.org/show_bug.cgi?id=228621
<rdar://problem/81297642>
Rubber-stamped by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.main): If the exit code is non-zero, print all errors.
2021-07-30 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Not all platforms support more -F
https://bugs.webkit.org/show_bug.cgi?id=228619
<rdar://problem/81296290>
Reviewed by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager): Only pass -F to more on Darwin.
2021-07-29 Carlos Alberto Lopez Perez <clopez@igalia.com>
[WPE][GTK] build broken with python2 after r280382
https://bugs.webkit.org/show_bug.cgi?id=228629
Reviewed by Philippe Normand.
Fix compatibility with python2.
* glib/apply-build-revision-to-files.py:
(main):
2021-07-29 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Handle relative paths in filtered commands
https://bugs.webkit.org/show_bug.cgi?id=228606
<rdar://problem/81289748>
Reviewed by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager): Child process should use the same current working directory.
(FilteredCommand.main): Convert any file names to their absolute paths.
2021-07-29 Tim Horton <timothy_horton@apple.com>
Simplify ImageDiff SDK logic
https://bugs.webkit.org/show_bug.cgi?id=228603
<rdar://problem/81281548>
Reviewed by Sam Weinig.
* ImageDiff/Makefile:
For any non-macOS SDK, build a macOS ImageDiff (because we use it on the host, not the target).
2021-07-29 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Return remote objects from remote() function
https://bugs.webkit.org/show_bug.cgi?id=226980
<rdar://problem/79299760>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.url): Add function to return remote url directly.
(Git.remote): Construct the appropriate remote object.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.url): Add function to return the remote url directly.
(Svn.remote): Construct the appropriate remote object.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_url):
(TestGit.test_remote):
(TestGit.test_remote_github):
(TestGit.test_remote_bitbucket):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestLocalSvn.test_url):
(TestLocalSvn.test_remote):
2021-07-29 Peng Liu <peng.liu6@apple.com>
[Catalina][GPUP] Some API tests fail after GPU Process features are enabled
https://bugs.webkit.org/show_bug.cgi?id=228589
Reviewed by Aakash Jain.
Disable a few API tests while the investigation is ongoing.
* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
* TestWebKitAPI/Tests/WebKitCocoa/AudioBufferSize.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm:
(TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
(TEST_F):
2021-07-29 Aakash Jain <aakash_jain@apple.com>
Send email notification when VerifyGitHubIntegrity step fails
https://bugs.webkit.org/show_bug.cgi?id=228592
Reviewed by Jonathan Bedard.
* CISupport/ews-build/emails.json:
* CISupport/ews-build/send_email.py:
(send_email_to_github_admin):
* CISupport/ews-build/steps.py:
(VerifyGitHubIntegrity):
(VerifyGitHubIntegrity.evaluateCommand):
(VerifyGitHubIntegrity.send_email_for_github_issue):
2021-07-29 Jonathan Bedard <jbedard@apple.com>
[git-webkit] Add identifiers to 'log' and 'blame'
https://bugs.webkit.org/show_bug.cgi?id=228027
<rdar://problem/80691164>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
(Scm.from_path): Pass all kwargs to local SCM object.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Add Blame and Log commands.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py: Added.
(Blame): Invoke pager.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand): Shared command that handles replace hashes/revisions in
an SCM command with identifiers.
(FilteredCommand.parser): Allow user to change the prefered commit representation.
(FilteredCommand.pager): Pass output through more if called from a terminal.
(FilteredCommand.main): Modify output of provided command to replace commit representation
with the preffered commit representation.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py: Added.
(Log): Invoke pager.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py: Added.
(TestLog):
(TestLog.setUp):
(TestLog.test_git):
(TestLog.test_git_svn):
(TestLog.test_git):
2021-07-29 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Catch AttributeError when getting password
https://bugs.webkit.org/show_bug.cgi?id=228590
<rdar://problem/81278799>
Reviewed by Aakash Jain.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): Catch AttributeError.
2021-07-29 Aakash Jain <aakash_jain@apple.com>
[ews] VerifyGitHubIntegrity step fails with an exception
https://bugs.webkit.org/show_bug.cgi?id=228587
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(VerifyGitHubIntegrity): Fixed the base class.
(VerifyGitHubIntegrity.getResultSummary): Drive-by fix to improve error message.
* CISupport/ews-build/steps_unittest.py: Added unit-tests.
2021-07-29 Michael Catanzaro <mcatanzaro@gnome.org>
[WPE][GTK] .asc file extension is appended to filename of text/plain downloads
https://bugs.webkit.org/show_bug.cgi?id=228566
Reviewed by Adrian Perez de Castro.
* TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(serverCallback):
(testDownloadTextPlainMIMEType):
(beforeAll):
* TestWebKitAPI/Tests/WebKitGLib/resources/text: Added.
2021-07-28 Ryosuke Niwa <rniwa@webkit.org>
makeWeakPtr should support Ref and RefPtr as the argument
https://bugs.webkit.org/show_bug.cgi?id=228574
Reviewed by Wenson Hsieh.
Added unit tests for makeWeakPtr<T> on Ref<T> and RefPtr<T>.
* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::BaseObjectWithRefAndWeakPtr): Added.
(TestWebKitAPI::BaseObjectWithRefAndWeakPtr::create): Added.
(TestWebKitAPI::BaseObjectWithRefAndWeakPtr::someFunction):
(TestWebKitAPI::DerivedObjectWithRefAndWeakPtr): Added.
(TestWebKitAPI::DerivedObjectWithRefAndWeakPtr::create):
(WTF_WeakPtr.MakeWeakPtrTakesRef): Added.
(WTF_WeakPtr.MakeWeakPtrTakesRefPtr): Added.
2021-07-28 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add hybridmethod decorator
https://bugs.webkit.org/show_bug.cgi?id=225991
<rdar://problem/78230701>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py:
(hybridmethod): Similar to the "classmethod" decorator, except this decorator allows the
decorated functions to differentiate between being called by the class and an instance
of the class.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py:
(TestHybrid):
(TestHybrid.is_type):
(TestHybrid.test_type):
(TestHybrid.test_instance):
2021-07-28 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Fix race condition in TaskPool unittests (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=227455
<rdar://problem/79873003>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest.test_invalid_shutdown): Deleted.
2021-07-28 Jonathan Bedard <jbedard@apple.com>
[ews-build.webkit.org] Verify GitHub integrity in commit queue
https://bugs.webkit.org/show_bug.cgi?id=228563
<rdar://problem/81230685>
Reviewed by Aakash Jain.
* CISupport/ews-build/factories.py:
(CommitQueueFactory.__init__): Add VerifyGitHubIntegrity.
* CISupport/ews-build/factories_unittest.py:
(TestCommitQueueFactory.test_commit_queue_factory):
* CISupport/ews-build/steps.py:
(CheckPatchStatusOnEWSQueues.start):
(VerifyGitHubIntegrity):
(VerifyGitHubIntegrity.__init__):
(VerifyGitHubIntegrity.getResultSummary):
* Scripts/check-github-mirror-integrity: Import webkitscmpy from webkitpy.
2021-07-28 Alex Christensen <achristensen@webkit.org>
WebSocket: Safari on iOS 15 beta 3 is sending invalid close frame
https://bugs.webkit.org/show_bug.cgi?id=228329
Reviewed by Youenn Fablet.
* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):
2021-07-28 Philippe Normand <pnormand@igalia.com>
[WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake
https://bugs.webkit.org/show_bug.cgi?id=228290
Reviewed by Michael Catanzaro.
* MiniBrowser/gtk/main.c:
(main): Use generated BuildRevision.h header.
* glib/apply-build-revision-to-files.py: Added.
(main):
2021-07-28 Diego Pino Garcia <dpino@igalia.com>
[WPE] Add missing required dependencies to build WPE
https://bugs.webkit.org/show_bug.cgi?id=228530
Reviewed by Adrian Perez de Castro.
Script Tools/wpe/install-dependencies was not installing all the required
package dependencies necessary to build WPE. There were several
packages missing or other ones which were only present in the
WebKitGTK list of package dependencies (moved to GLIB).
* glib/dependencies/apt:
* gtk/dependencies/apt:
* wpe/dependencies/apt:
2021-07-27 Devin Rousso <drousso@apple.com>
[Modern Media Controls] [macOS] Overflow button still shows as `on` even after contextmenu is dismissed
https://bugs.webkit.org/show_bug.cgi?id=228310
<rdar://problem/81124786>
Reviewed by Wenson Hsieh.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView dismissActiveMenu]):
(-[TestRunnerWKWebView immediatelyDismissContextMenuIfNeeded]):
(-[TestRunnerWKWebView _dismissAllContextMenuInteractions]): Added.
2021-07-27 Diego Pino Garcia <dpino@igalia.com>
[GTK][WPE] Fix wrong path to GLIB dependencies introduced in r280354.
Unreviewed follow-up fix.
* gtk/dependencies/apt:
* gtk/dependencies/dnf:
* gtk/dependencies/pacman:
* wpe/dependencies/apt:
* wpe/dependencies/dnf:
* wpe/dependencies/pacman:
2021-07-27 Jonathan Bedard <jbedard@apple.com>
[build.webkit.org] Simulator temp files filling up disk
https://bugs.webkit.org/show_bug.cgi?id=228335
<rdar://problem/81171840>
Reviewed by Aakash Jain.
* CISupport/kill-old-processes:
(main): Delete stale simulator files.
2021-07-27 Aakash Jain <aakash_jain@apple.com>
Add .gitignore file for CISupport
https://bugs.webkit.org/show_bug.cgi?id=228113
Reviewed by Jonathan Bedard.
* CISupport/.gitignore: Added.
2021-07-27 Diego Pino Garcia <dpino@igalia.com>
[GTK][WPE] Move WebKitGTK and WPE dependency packages to a common GLIB list
https://bugs.webkit.org/show_bug.cgi?id=228326
Reviewed by Adrian Perez de Castro.
WebKitGTK and WPE share many dependency packages. Until now each port
maintained its own list of dependencies. It was a common mistake to
add a new package dependency to one of the ports but not to the other
one.
This patch adds a common GLIB for dependency packages, which can help
prevent mistakes like the one described above.
* glib/dependencies/apt: Copied from Tools/wpe/dependencies/apt.
* glib/dependencies/dnf: Copied from Tools/wpe/dependencies/dnf.
* glib/dependencies/pacman: Copied from Tools/wpe/dependencies/pacman.
* gtk/dependencies/apt:
* gtk/dependencies/dnf:
* gtk/dependencies/pacman:
* wpe/dependencies/apt:
* wpe/dependencies/dnf:
* wpe/dependencies/pacman:
2021-07-27 Kevin Neal <kevin_neal@apple.com>
[results.webkit.org] Tooltips should remain visible when hovering over commit representations
https://bugs.webkit.org/show_bug.cgi?id=228330
Reviewed by Jonathan Bedard.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(xAxisFromScale):
2021-07-27 Diego Pino Garcia <dpino@igalia.com>
[GTK][WPE] Organize list of package dependencies into separated files
https://bugs.webkit.org/show_bug.cgi?id=228276
Reviewed by Adrian Perez de Castro.
When deploying a new bot from scratch for Ubuntu LTS, which builds
using system libraries, I realized the list of package dependencies
for WPE is not exhaustive.
This patch refactorizes the package dependencies list putting each
group of dependencies on its own file depending on platform (apt, dnf,
pacman and brew).
On a follow-up step I plan to put in common the WebKitGTK and WPE
dependencies plus add the missing WPE package dependencies. Also I'll
remove the duplicated packages that are currently happening in the
dependencies list of several platforms.
* gtk/dependencies/apt: Added.
* gtk/dependencies/brew: Added.
* gtk/dependencies/dnf: Added.
* gtk/dependencies/pacman: Added.
* gtk/install-dependencies:
* wpe/dependencies/apt: Added.
* wpe/dependencies/dnf: Added.
* wpe/dependencies/pacman: Added.
* wpe/install-dependencies:
2021-07-26 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS Monterey] Pressing Fn+E should present the emoji picker when editing
https://bugs.webkit.org/show_bug.cgi?id=228300
rdar://77558672
Reviewed by Tim Horton.
Add a new API test that simulates a keypress for "Fn+E" with a main menu that contains a system menu item for
that key binding; the test then verifies that text was not inserted into the page as a result.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/KeyboardEventTests.mm: Added.
(-[KeyboardTestMenu _containsItemMatchingEvent:includingDisabledItems:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView typeCharacter:]):
(-[TestWKWebView typeCharacter:modifiers:]):
2021-07-26 Yusuke Suzuki <ysuzuki@apple.com>
Unreviewed, speculative revert of r280193
https://bugs.webkit.org/show_bug.cgi?id=228142
* TestWebKitAPI/Tests/WTF/StringView.cpp:
* TestWebKitAPI/Tests/WTF/Vector.cpp:
2021-07-26 Alex Christensen <achristensen@webkit.org>
WKUserContentController.removeAllScriptMessageHandlers() doesn't release the message handlers
https://bugs.webkit.org/show_bug.cgi?id=228271
Reviewed by Sihui Liu.
* TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TEST):
2021-07-26 Kate Cheney <katherine_cheney@apple.com>
ServiceWorkerRegistration.unregister method fails in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=227524
<rdar://problem/80264108>
Reviewed by Youenn Fablet.
API test coverage. Drive-by fix to remove unnecessary WKWebView
configuration flags from tests that don't need them.
Note this will also fix https://bugs.webkit.org/show_bug.cgi?id=227531
where updating an existing worker fails after registering 3 domains,
but writing a test for that would require registering service workers
on 3 domains that are not localhost or a loopback IP address, which
we currently do not have infrastructure for.
Testing unregister was only possible because the script URL passed in
during the unregister job is null, so it does not get caught in the
localhost/loopback IP address check, unlike the update case.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TEST):
(-[SWInAppBrowserPrivacyMessageHandler userContentController:didReceiveScriptMessage:]):
2021-07-25 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Unified field is unselected after focusing URL bar if text was selected in a fixed position container
https://bugs.webkit.org/show_bug.cgi?id=228269
rdar://80556392
Reviewed by Tim Horton.
We already have some very basic support for installing and removing native text fields in the view hierarchy,
through `TestRunner::(add|remove)ChromeInputField()`. In order to support the new layout test, we additionally
implement the ability to:
- Set text inside the native chrome input field that was installed using `addChromeInputField()`.
- Select all text inside the chrome input field.
- Query the chrome input field for the currently selected text.
We only support iOS for the time being, with stubs on other platforms, since the new test that uses this
functionality is iOS-specific; if needed in the future for a similar test on other platforms, we can implement
the stubbed testing hooks on TestRunner and PlatformWebView as well.
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setTextInChromeInputField):
(TestRunner::selectChromeInputField):
(TestRunner::getSelectedTextInChromeInputField):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setTextInChromeInputField):
(TestRunner::selectChromeInputField):
(TestRunner::getSelectedTextInChromeInputField):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::postSetTextInChromeInputField):
(WTR::InjectedBundle::postSelectChromeInputField):
(WTR::InjectedBundle::postGetSelectedTextInChromeInputField):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setTextInChromeInputField):
(WTR::TestRunner::selectChromeInputField):
(WTR::TestRunner::getSelectedTextInChromeInputField):
(WTR::TestRunner::callSetTextInChromeInputFieldCallback):
(WTR::TestRunner::callSelectChromeInputFieldCallback):
(WTR::TestRunner::callGetSelectedTextInChromeInputFieldCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::setTextInChromeInputField):
(WTR::PlatformWebView::selectChromeInputField):
(WTR::PlatformWebView::getSelectedTextInChromeInputField):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::chromeInputField):
Additionally do some light refactoring by pulling out logic for grabbing the chrome input field (i.e. a view
with a tag of 1 under the window) out into a separate helper method. Use this helper in a few places below.
(WTR::PlatformWebView::addChromeInputField):
(WTR::PlatformWebView::setTextInChromeInputField):
(WTR::PlatformWebView::selectChromeInputField):
(WTR::PlatformWebView::getSelectedTextInChromeInputField):
(WTR::PlatformWebView::removeChromeInputField):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::setTextInChromeInputField):
(WTR::PlatformWebView::selectChromeInputField):
(WTR::PlatformWebView::getSelectedTextInChromeInputField):
* WebKitTestRunner/win/PlatformWebViewWin.cpp:
(WTR::PlatformWebView::setTextInChromeInputField):
(WTR::PlatformWebView::selectChromeInputField):
(WTR::PlatformWebView::getSelectedTextInChromeInputField):
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::setTextInChromeInputField):
(WTR::PlatformWebView::selectChromeInputField):
(WTR::PlatformWebView::getSelectedTextInChromeInputField):
2021-07-24 Devin Rousso <drousso@apple.com>
[iOS] REGRESSION(r277505): `-[WKWebView underPageBackgroundColor]` also changes the scroll bar color
https://bugs.webkit.org/show_bug.cgi?id=228259
<rdar://problem/80116822>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:
(TEST.WKWebViewUnderPageBackgroundColor.MatchesScrollView):
2021-07-23 Andres Gonzalez <andresg_22@apple.com>
Add a method to WebAccessibilityObjectWrapper so that clients can retrieve the text of each line and their corresponding bounding rectangles.
https://bugs.webkit.org/show_bug.cgi?id=228251
Reviewed by Chris Fleizach.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::lineRectsAndText const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::lineRectsAndText const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
(WTR::makeJSArray):
2021-07-23 Alex Christensen <achristensen@webkit.org>
Make WKContentRuleListStore respond to same selectors as _WKUserContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=228253
Reviewed by Brian Weinstein.
* TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:
(TEST_F):
2021-07-23 Truitt Savell <tsavell@apple.com>
Migrate iOS 15 expectations to OpenSource and bump version numbers
https://bugs.webkit.org/show_bug.cgi?id=228202
Reviewed by Ryan Haddad.
* Scripts/webkitpy/port/ios.py:
(IOSPort):
* Scripts/webkitpy/port/ios_device_unittest.py:
* Scripts/webkitpy/port/ios_simulator_unittest.py:
(IOSSimulatorTest.make_port):
(IOSSimulatorTest.test_layout_test_searchpath_with_apple_additions):
(IOSSimulatorTest.test_layout_test_searchpath_without_apple_additions):
(IOSSimulatorTest.test_layout_searchpath_wih_device_type):
* Scripts/webkitpy/port/ios_testcase.py:
(IOSTest.make_port):
2021-07-22 Truitt Savell <tsavell@apple.com>
Migrate Monterey expectations to OpenSource and bump version numbers
https://bugs.webkit.org/show_bug.cgi?id=228090
Reviewed by Ryan Haddad.
* Scripts/webkitpy/port/mac.py:
(MacPort):
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_monterey_baseline_search_path):
(MacTest.test_big_sur_baseline_search_path): Deleted.
2021-07-22 Yusuke Suzuki <ysuzuki@apple.com>
Micro-optimize innerHTML
https://bugs.webkit.org/show_bug.cgi?id=228142
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):
2021-07-22 Peng Liu <peng.liu6@apple.com>
[ BigSur Debug ] TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource is flaky, hitting ASSERTION FAILED: !isInRoutingArbitrationForToken(token)
https://bugs.webkit.org/show_bug.cgi?id=227728
Unreviewed API test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
2021-07-22 Frédéric Wang <fwang@igalia.com>
nullptr crash in ApplyStyleCommand::applyRelativeFontStyleChange
https://bugs.webkit.org/show_bug.cgi?id=223974
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp: Update FIXME.
2021-07-22 Philippe Normand <pnormand@igalia.com>
[GLib] Expose API to access/modify capture devices states
https://bugs.webkit.org/show_bug.cgi?id=227902
Reviewed by Carlos Garcia Campos.
The GTK MiniBrowser is now able to show media capture indicators, through the URI entry. A
new API test was added, checking support for getDisplayMedia().
* MiniBrowser/gtk/BrowserTab.c:
(decidePermissionRequest):
* MiniBrowser/gtk/BrowserWindow.c:
(webViewMediaCaptureStateChanged):
(webViewUriEntryIconPressed):
(browserWindowSwitchTab):
* TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
(testWebViewUserMediaPermissionRequests):
(testWebViewAudioOnlyUserMediaPermissionRequests):
(testWebViewDisplayUserMediaPermissionRequests):
(beforeAll):
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(displayCaptureChanged):
(WebViewTest::waitUntilDisplayCaptureStateChangedTo):
(microphoneCaptureChanged):
(WebViewTest::waitUntilMicrophoneCaptureStateChangedTo):
(cameraCaptureChanged):
(WebViewTest::waitUntilCameraCaptureStateChangedTo):
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
2021-07-21 Alexey Proskuryakov <ap@apple.com>
MiniBrowser xcconfig should include ccache.xcconfig conditionally
https://bugs.webkit.org/show_bug.cgi?id=228126
Reviewed by Tim Horton.
* MiniBrowser/Configurations/DebugRelease.xcconfig:
2021-07-21 Miguel Gomez <magomez@igalia.com>
[GTK][WPE] Allow the user to configure the MemoryPressureHandler inside the web process
https://bugs.webkit.org/show_bug.cgi?id=222738
Reviewed by Carlos Garcia Campos.
Add a test for WebKitMemoryPressureSettings API and to test WebKitWebContext with
non default WebKitMemoryPressureSettings values.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(MemoryPressureTest::setup):
(MemoryPressureTest::teardown):
(MemoryPressureTest::webProcessTerminatedCallback):
(MemoryPressureTest::waitUntilWebProcessTerminated):
(testMemoryPressureSettings):
(beforeAll):
* TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::Test):
2021-07-21 Aditya Keerthi <akeerthi@apple.com>
Crash in -[WKWebView takeSnapshotWithConfiguration:completionHandler:] when taking empty snapshots
https://bugs.webkit.org/show_bug.cgi?id=228134
rdar://80146087
Reviewed by Chris Dumez.
Added a test to verify the crash no longer occurs.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm:
(-[TestSnapshotWrapper takeSnapshotWithWebView:configuration:completionHandler:]):
(TEST):
2021-07-20 Saam Barati <sbarati@apple.com>
Don't run ftl-eager-no-cjit on debug builds
https://bugs.webkit.org/show_bug.cgi?id=228118
Reviewed by Mark Lam.
Many debug JSC stress tests time out intermittently. All I see are under
the ftl-eager-no-cjit mode.
* Scripts/run-jsc-stress-tests:
2021-07-20 Ayumi Kojima <ayumi_kojima@apple.com>
Adding myself to Contributors.json
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-07-20 Eric Hutchison <ehutchison@apple.com>
Adding myself to Contributors.json.
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-07-20 Tim Horton <timothy_horton@apple.com>
REGRESSION (r278062): Misplaced text in Wikipedia search field
https://bugs.webkit.org/show_bug.cgi?id=228098
<rdar://problem/80495165>
Reviewed by Simon Fraser.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/cg/GraphicsContextTestsCG.cpp: Added.
(TestWebKitAPI::greenImage):
(TestWebKitAPI::TEST):
Add a test for the issue described in the WebCore ChangeLog.
2021-07-20 Sam Sneddon <gsnedders@apple.com>
Change referrer-policy default to strict-origin-when-cross-origin
https://bugs.webkit.org/show_bug.cgi?id=218909
Reviewed by Chris Dumez.
This matches the behavior of other browsers.
Covered by existing tests and web platform tests we haven't imported yet.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST):
2021-07-20 Aakash Jain <aakash_jain@apple.com>
EWS should send email notification when a bot goes out of disk space
https://bugs.webkit.org/show_bug.cgi?id=216489
Reviewed by Ryan Haddad.
* CISupport/ews-build/steps.py:
(CleanUpGitIndexLock.start):
(CleanUpGitIndexLock.send_email_for_git_issue):
2021-07-20 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Update myself (vjaquez) as committer in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=228103
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-07-19 Ryan Haddad <ryanhaddad@apple.com>
[build.webkit.org] lldb-webkit-test is failing on Catalina queues
https://bugs.webkit.org/show_bug.cgi?id=227946
Reviewed by Aakash Jain.
The changes to lldb-webkit-test to support the Python 3 version of lldb present in the
Big Sur-aligned Xcode have made it incompatible with Catalin's Python 2 version.
Rather than creating and defending the results for two different versions of the lldb-webkit-test
script, disable this test step for Catalina.
* CISupport/build-webkit-org/factories.py:
(TestFactory.__init__):
2021-07-19 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed infrastructure fix, remove bot that is out for hardware repair.
* CISupport/ews-build/config.json:
2021-07-18 David Kilzer <ddkilzer@apple.com>
Ignore weak external symbols in clang coverage builds using check-for-weak-vtables-and-externals
<https://webkit.org/b/228063>
<rdar://problem/80477138>
Reviewed by Alexey Proskuryakov.
* Scripts/check-for-weak-vtables-and-externals:
- Ignore weak symbols from llvm when building with
coverage enabled. This fixes the build.
* coverage/coverage.xcconfig:
(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Remove.
- Can't use -unexported_symbol and -exported_symbol
together, so remove this.
2021-07-16 Kate Cheney <katherine_cheney@apple.com>
WKWebView javascript injection doesn't work if app includes WKAppBoundDomains
https://bugs.webkit.org/show_bug.cgi?id=227589
<rdar://problem/80327452>
Reviewed by Brent Fulgham.
Added new tests. Removed localhost and 127.0.0.1 from the Info.plist
to avoid false positive tests. Replace them with other domains so we
still test the max count.
* TestWebKitAPI/Info.plist:
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TEST):
2021-07-16 Alex Christensen <achristensen@webkit.org>
Prevent HSTS tracking mitigation for top level navigation requests
https://bugs.webkit.org/show_bug.cgi?id=227936
Reviewed by Brady Eidson.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm: Added.
(TestWebKitAPI::hasRadar80550123):
(TestWebKitAPI::hstsWebViewAndDelegate):
(TestWebKitAPI::hstsServer):
(TestWebKitAPI::TEST):
2021-07-16 Alex Christensen <achristensen@webkit.org>
Network access prevention SPI should prevent preconnecting, and it should first allow injected bundle to change request
https://bugs.webkit.org/show_bug.cgi?id=228044
<rdar://72995136>
Reviewed by Tim Horton.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/Preconnect.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/SchemeChangingPlugIn.mm: Added.
(-[SchemeChangingPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[SchemeChangingPlugIn webProcessPlugInBrowserContextController:frame:willSendRequest:redirectResponse:]):
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
2021-07-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r279916.
https://bugs.webkit.org/show_bug.cgi?id=228037
some of tests are timing out
Reverted changeset:
"Convert small JIT pool tests into executable fuzzing"
https://bugs.webkit.org/show_bug.cgi?id=226279
https://commits.webkit.org/r279916
2021-07-16 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Provide API to access SVN cache
https://bugs.webkit.org/show_bug.cgi?id=228000
<rdar://problem/80646471>
Reviewed by Dewei Zhu.
Create a Svn cache with the same API as the Git cache. This allows
git and svn to share logic when inserting identifiers in `log` and `blame`.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.Cache.path): Path to cahce file.
(Svn.Cache.populate): Fill cache from `svn log` operation.
(Svn.Cache.to_hash): Svn is unaware of hashes, and can never map them.
(Svn.Cache.to_revision): Map identifiers to revisions.
(Svn.Cache.to_identifier): Map revisions to identifiers.
(Svn.__init__): Use cache object instead of _metadata_cache.
(Svn._commit_count): Access cache object.
(Svn._branch_for): Ditto.
(Svn.commit): Ditto.
(Svn._cache_path): Deleted.
(Svn._cache_revisions): Deleted.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestLocalSvn.test_revision_cache):
2021-07-16 Philippe Normand <pnormand@igalia.com>
[GStreamer] RealtimeMediaSourceCenter and VideoEncoder are not libwebrtc-specific
https://bugs.webkit.org/show_bug.cgi?id=228020
Reviewed by Xabier Rodriguez-Calvar.
* Scripts/webkitpy/style/checker.py:
2021-07-16 Angelos Oikonomopoulos <angelos@igalia.com>
Bundle libraries for remote execution in run-jsc-benchmarks
https://bugs.webkit.org/show_bug.cgi?id=227579
Reviewed by Carlos Alberto Lopez Perez.
Similarly to run-jsc-stress-tests, introduce a bundling step that
ships all library dependencies to the remote system when using
run-jsc-benchmarks --remote.
This patch factors out the code to
- lookup the ELF interpreter/libraries and to
- strip the rpath and create a wrapper script
from generate-bundle and places it webkitpy/binary_bundling.
It also introduces a simpler script that only bundles a single
binary (bundle-binary) and switches run-jsc-benchmarks and
run-jsc-stress-tests to use it.
It also updates run-jsc-benchmark to propagate any environment
variables intended for consumption by the JSC binary.
* Scripts/generate-bundle: Factor out reusable bundling code.
* Scripts/run-jsc-benchmarks: Do bundling and variable propagation.
* Scripts/run-jsc-stress-tests: Switch to bundle-binary.
* Scripts/webkitpy/binary_bundling/__init__.py: Added.
* Scripts/webkitpy/binary_bundling/bundle.py: Added.
(BinaryBundler):
(BinaryBundler.__init__):
(BinaryBundler.destination_dir):
(BinaryBundler.copy_and_remove_rpath):
(BinaryBundler.generate_wrapper_script):
* Scripts/webkitpy/binary_bundling/ldd.py: Added.
(SharedObjectResolver):
(SharedObjectResolver.__init__):
(SharedObjectResolver._run_cmd_and_get_output):
(SharedObjectResolver._get_interpreter_objname):
(SharedObjectResolver._get_libs_and_interpreter):
(SharedObjectResolver._ldd_recursive_get_libs_and_interpreter):
(SharedObjectResolver.get_libs_and_interpreter):
* Scripts/bundle-binary: Added.
* Scripts/generate-bundle:
* Scripts/run-jsc-benchmarks:
* Scripts/run-jsc-stress-tests:
* Scripts/webkitpy/binary_bundling/__init__.py: Added.
* Scripts/webkitpy/binary_bundling/bundle.py: Added.
(BinaryBundler):
(BinaryBundler.__init__):
(BinaryBundler.destination_dir):
(BinaryBundler.copy_and_remove_rpath):
(BinaryBundler.generate_wrapper_script):
* Scripts/webkitpy/binary_bundling/ldd.py: Added.
(SharedObjectResolver):
(SharedObjectResolver.__init__):
(SharedObjectResolver._run_cmd_and_get_output):
(SharedObjectResolver._get_interpreter_objname):
(SharedObjectResolver._get_libs_and_interpreter):
(SharedObjectResolver._ldd_recursive_get_libs_and_interpreter):
(SharedObjectResolver.get_libs_and_interpreter):
2021-07-16 Philippe Normand <pnormand@igalia.com>
[GStreamer] LibWebRTC files should be in libwebrtc/gstreamer
https://bugs.webkit.org/show_bug.cgi?id=227991
Reviewed by Xabier Rodriguez-Calvar.
* Scripts/webkitpy/style/checker.py:
2021-07-15 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, update my status in contributors.json to reviewer.
* Scripts/webkitpy/common/config/contributors.json:
2021-07-15 Aakash Jain <aakash_jain@apple.com>
Add unit-tests for InstallBuiltProduct step
https://bugs.webkit.org/show_bug.cgi?id=227990
Reviewed by Philippe Normand.
* CISupport/build-webkit-org/steps_unittest.py:
* CISupport/ews-build/steps_unittest.py:
2021-07-15 Aakash Jain <aakash_jain@apple.com>
[iOS]TestWebKitAPI.InAppBrowserPrivacy.AppBoundDomainAllowsServiceWorkers is failing
https://bugs.webkit.org/show_bug.cgi?id=227918
<rdar://problem/80535625>
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: Disabled the test for now to speed up EWS.
2021-07-14 Brent Fulgham <bfulgham@apple.com>
[iOS & Mac Big Sur Release] Two SOAuthorizationSubFrame API tests are failing
https://bugs.webkit.org/show_bug.cgi?id=227925
<rdar://problem/80543830>
Reviewed by Kate Cheney.
In Bug 227729 I added a number of extra tests that an Extensible SSO delegate method
was called. I did a search/paste and added them to all SSO flows without much detailed
analysis. Testing shows that on Simulator, these delegate are not always called, perhaps
because the test case involves loads to live websites that might take longer than the
hard-coded timeout used to move to the next step of the test.
Because these failures are slowing down our EWS, I'm removing these two checks. We
can consider adding them back if we need such checks in the future.
* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(TestWebKitAPI::TEST):
2021-07-14 Kevin Neal <kevin_neal@apple.com>
[Tools] linkify first line of commit message in tooltip
https://bugs.webkit.org/show_bug.cgi?id=227968
<rdar://problem/80596878>
Reviewed by Jonathan Bedard.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(xAxisFromScale):
2021-07-14 Keith Miller <keith_miller@apple.com>
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-07-14 Aakash Jain <aakash_jain@apple.com>
Add step name and description to InstallBuiltProduct build step
https://bugs.webkit.org/show_bug.cgi?id=227935
Reviewed by Carlos Alberto Lopez Perez.
* CISupport/build-webkit-org/steps.py:
(InstallBuiltProduct):
* CISupport/ews-build/steps.py:
(InstallBuiltProduct):
2021-07-13 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Handle failed `git log` process
https://bugs.webkit.org/show_bug.cgi?id=227709
<rdar://problem/80520002>
Rubber-stamped by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.populate): Do not populate cache if `git log` fails.
2021-07-13 Alex Christensen <achristensen@webkit.org>
>4K Referer should have tailing /
https://bugs.webkit.org/show_bug.cgi?id=227795
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST):
2021-07-13 Said Abou-Hallawa <said@apple.com>
[CG] REGRESSION(r278863): The destination rectangle is truncated when the sub-image is used
https://bugs.webkit.org/show_bug.cgi?id=227614
<rdar://79840643>
Reviewed by Simon Fraser.
Add an API test to test drawing an ImageBuffer into another and both
have the logicalSize scaled such that they have pixels.
* TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp:
(TestWebKitAPI::TEST):
2021-07-13 Kevin Neal <kevin_neal@apple.com>
[results.webkit.org] linkify urls in commit messages
https://bugs.webkit.org/show_bug.cgi?id=227549
<rdar://problem/79988762>
Reviewed by Jonathan Bedard.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:
(thead.tbody.rows.map.):
(thead.tbody.rows.map):
(CommitTable):
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js:
2021-07-13 Aakash Jain <aakash_jain@apple.com>
[build.webkit.org] Upload layout-tests results immediately after running layout-tests
https://bugs.webkit.org/show_bug.cgi?id=227889
Reviewed by Carlos Alberto Lopez Perez.
* CISupport/build-webkit-org/factories.py:
2021-07-13 Kate Cheney <katherine_cheney@apple.com>
Allow layout tests to specify app initiated loads or not
https://bugs.webkit.org/show_bug.cgi?id=227825
<rdar://problem/80355582>
Reviewed by Brent Fulgham.
Add a test option that specifies whether the test should mark the
main page navigation as app-initiated or not.
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::isAppInitiated const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
2021-07-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Expose support for client certificate auth
https://bugs.webkit.org/show_bug.cgi?id=200805
Reviewed by Michael Catanzaro.
Add a simple implementation in MiniBrowser using a file chooser to ask for the certificate from a file and unit
tests for the client certificate request. Unfortunately we can't easily test pin certificates.
* MiniBrowser/gtk/BrowserTab.c:
(certificateDialogResponse):
(webViewAuthenticate):
(browserTabConstructed):
* TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:
(ClientSideCertificateTest::acceptCertificateCallback):
(ClientSideCertificateTest::requestStartedCallback):
(ClientSideCertificateTest::authenticateCallback):
(ClientSideCertificateTest::ClientSideCertificateTest):
(ClientSideCertificateTest::~ClientSideCertificateTest):
(ClientSideCertificateTest::authenticate):
(ClientSideCertificateTest::acceptCertificate):
(ClientSideCertificateTest::waitForAuthenticationRequest):
(testClientSideCertificate):
(beforeAll):
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
* TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h:
(WebKitTestServer::soupServer const):
2021-07-12 Filip Pizlo <fpizlo@apple.com> and Yusuke Suzuki <ysuzuki@apple.com>
New malloc algorithm
https://bugs.webkit.org/show_bug.cgi?id=226404
Reviewed by Yusuke Suzuki.
Disable the IsoHeap tests if we're using libpas. Libpas has its own tests.
* TestWebKitAPI/Tests/WTF/bmalloc/IsoHeap.cpp:
2021-07-12 Garrett Davidson <garrett_davidson@apple.com>
_WKWebAuthenticationPanel escapes slashes in origin
https://bugs.webkit.org/show_bug.cgi?id=227724
rdar://80232742
Reviewed by Kate Cheney.
Update both the makeCredential and getAssertion tests to use an origin.
WebAuthenticationPanel.GetAssertionLA:
This test wasn't using an origin or RPID. Update it to use both. This means both
clientDataJSON and authenticatorData changed. Update both to the new expected
values, using as much plaintext as possible.
WebAuthenticationPanel.MakeCredentialLA:
This test should have caught this issue, but the origin being passed here isn't
valid, because it didn't have a scheme. Per the WebAuthn spec, origins used by
WebAuthn MUST start with "https://". Also update this test to use plaintext
instead of base64 for clientDataJSON.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-07-12 Tim Horton <timothy_horton@apple.com>
BifurcatedGraphicsContext can't draw text
https://bugs.webkit.org/show_bug.cgi?id=227883
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
Add a test ensuring that we get DrawGlyphs commands on both contexts.
2021-07-12 Jonathan Bedard <jbedard@apple.com>
[run-api-tests] Use Python 3 (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=225427
<rdar://problem/77584713>
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-07-12 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Add a new GTK layout tester bot to build.webkit.org that runs with --skip-failing-tests switch
https://bugs.webkit.org/show_bug.cgi?id=227744
Reviewed by Jonathan Bedard.
On the EWS the layout tests run with this switch --skip-failing-tests
which changes the order in which tests are run (those expected to fail
are not scheduled). I think this may be causing different results on
other tests (like unexpected failures or unexpected flakies).
Having a bot in build.webkit.org running with this switch will help
to detect and garden those cases.
* CISupport/build-webkit-org/config.json:
2021-07-12 Jer Noble <jer.noble@apple.com>
[Cocoa] Incorrect deprecation declaration for -[WKWebView closeAllMediaPresentations:]
https://bugs.webkit.org/show_bug.cgi?id=227860
<rdar://80376777>
Reviewed by Sam Weinig.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm:
(TEST):
2021-07-12 Wenson Hsieh <wenson_hsieh@apple.com>
[watchOS] Make a few additional adjustments to support system minimum layout margins
https://bugs.webkit.org/show_bug.cgi?id=227859
rdar://80113612
Reviewed by Tim Horton.
Add support for simulating arbitrary horizontal (trailing and leading) values for `-systemMinimumLayoutMargin`
in WebKitTestRunner, via a new "horizontalSystemMinimumLayoutMargin" test option. By default, this is 0.
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::horizontalSystemMinimumLayoutMargin const):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(-[PlatformWebViewController systemMinimumLayoutMargins]):
Override this UIViewController method and replace the leading and trailing layout margin values with the values
from test options.
(WTR::PlatformWebView::PlatformWebView):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
Additionally make a slight adjustment here to avoid calling `-setContentInset` on the scroll view in between
tests if the content insets aren't changing. This is needed in order for the new layout test to work on watchOS.
2021-07-09 Myles C. Maxfield <mmaxfield@apple.com>
SVGImageForContainer reports true for is<SVGImage>() but it doesn't inherit from SVGImage
https://bugs.webkit.org/show_bug.cgi?id=227807
Reviewed by Said Abou-Hallawa.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/SVGImageCasts.cpp: Added.
(TestWebKitAPI::TEST):
2021-07-09 Carlos Alberto Lopez Perez <clopez@igalia.com>
[webkitcorepy] run-webkit-tests may hang with python2 after r271683
https://bugs.webkit.org/show_bug.cgi?id=227715
Reviewed by Philippe Normand.
When an exception is raised from a worker if the workers are terminated
via a SIGKILL signal that later causes the task-queue to hang at close().
The issue is not reproducible with python3. So keep the same behaviour for
python3, and for python2 just use terminate() to stop the workers.
* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(TaskPool.__exit__):
2021-07-08 Yijia Huang <yijia_huang@apple.com>
Add Yijia Huang as a committer
https://bugs.webkit.org/show_bug.cgi?id=227814
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-07-08 Brent Fulgham <bfulgham@apple.com>
[Cocoa] Expose SPI to opt out of Extensible SSO authentication
https://bugs.webkit.org/show_bug.cgi?id=227729
<rdar://problem/75647892>
Reviewed by Tim Horton.
Add a new test to confirm that Extenstible SSO authentication flows are bypassed when the new WKPreference
is used. Updated other tests to confirm that the SSO delegate is called when expected.
* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(-[TestSOAuthorizationDelegate _webView:decidePolicyForSOAuthorizationLoadWithCurrentPolicy:forExtension:completionHandler:]):
(resetState):
(TestWebKitAPI::TEST):
2021-07-08 Kate Cheney <katherine_cheney@apple.com>
Clean up App Privacy Report code
https://bugs.webkit.org/show_bug.cgi?id=227326
<rdar://problem/79696849>
Reviewed by Brent Fulgham.
Delete testing functions related to attribution context. Move App
Privacy Report tests into their own file.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Added.
(TEST):
(catch):
(function):
(-[SWAppInitiatedRequestMessageHandler userContentController:didReceiveScriptMessage:]):
* TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReportPlugIn.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm.
(-[AppPrivacyReportPlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]):
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(-[SWAppBoundRequestMessageHandler userContentController:didReceiveScriptMessage:]): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/app-privacy-report-iframe.html: Added.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::didLoadAppInitiatedRequest):
(WTR::TestRunner::didLoadNonAppInitiatedRequest):
(WTR::TestRunner::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestRunner::callDidReceiveAppBoundRequestContextDataForDomainCallback): Deleted.
(WTR::TestRunner::didLoadAppBoundRequest): Deleted.
(WTR::TestRunner::didLoadNonAppBoundRequest): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didLoadAppInitiatedRequest):
(WTR::TestController::didLoadNonAppInitiatedRequest):
(WTR::TestController::clearAppPrivacyReportTestingData):
(WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestController::didLoadAppBoundRequest): Deleted.
(WTR::TestController::didLoadNonAppBoundRequest): Deleted.
(WTR::TestController::clearAppBoundNavigationData): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveAppBoundRequestContextDataForDomain): Deleted.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::didLoadAppInitiatedRequest):
(WTR::TestController::didLoadNonAppInitiatedRequest):
(WTR::TestController::clearAppPrivacyReportTestingData):
(WTR::TestController::appBoundRequestContextDataForDomain): Deleted.
(WTR::TestController::didLoadAppBoundRequest): Deleted.
(WTR::TestController::didLoadNonAppBoundRequest): Deleted.
(WTR::TestController::clearAppBoundNavigationData): Deleted.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView _didLoadAppInitiatedRequest:]):
(-[TestRunnerWKWebView _didLoadNonAppInitiatedRequest:]):
(-[TestRunnerWKWebView _appBoundNavigationDataForDomain:completionHandler:]): Deleted.
(-[TestRunnerWKWebView _didLoadAppBoundRequest:]): Deleted.
(-[TestRunnerWKWebView _didLoadNonAppBoundRequest:]): Deleted.
2021-07-08 Garrett Davidson <garrett_davidson@apple.com>
Update the WebAuthenticationPanel.GetAssertionLA test to expect the right value
https://bugs.webkit.org/show_bug.cgi?id=227726
rdar://80073404
Reviewed by Kate Cheney.
This test covers the changed code, but expects the wrong value. The existing
expectation was the base64 encoded string:
{"challenge":"AQIDBAECAwQBAgMEAQIDBAECAwQBAgMEAQIDBAECAwQ","origin":"","type":"webauthn.create"}
The "type" field is clearly incorrect here. Update the test to expect the right
value, and change the expectation to a plaintext string instead of base64 encoded,
to make issues like this easier to spot in the future.
While here, also remove an outdated comment.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-07-07 John Wilander <wilander@apple.com>
PCM: Add error logging for CryptoKit operations
https://bugs.webkit.org/show_bug.cgi?id=227731
<rdar://80221057>
Reviewed by Brent Fulgham.
Resolves three FIXMEs for error logging in PCM's CryptoKit operations.
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
Now expects an optional string instead of a bool from the function
calls which means EXPECT_TRUE has become EXPECT_FALSE. The optional
string is non-nullopt if it carries an error message.
* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:
(TestWebKitAPI::TEST):
Now expects an optional string instead of a bool from the function
calls which means EXPECT_TRUE has become EXPECT_FALSE. The optional
string is non-nullopt if it carries an error message.
2021-07-07 John Wilander <wilander@apple.com>
PCM: API test PrivateClickMeasurement.ValidBlindedSecret is failing on platforms with RSABSSA
https://bugs.webkit.org/show_bug.cgi?id=227777
<rdar://80291822>
Reviewed by Kate Cheney.
* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:
(TestWebKitAPI::TEST):
The test was looking for the value of JSON key "source_secret_token"
which should be "source_unlinkable_token". This patch fixes that and
renames the local variable accordingly.
2021-07-07 Ling Ho <lingho@apple.com>
Remove proxy server setting from Buildbot configuration
https://bugs.webkit.org/show_bug.cgi?id=227768
Reviewed by Aakash Jain.
* CISupport/build-webkit-org/steps.py:
(DownloadBuiltProduct.start):
2021-07-07 Aakash Jain <aakash_jain@apple.com>
[build.webkit.org] Add unit-tests for RunWebKit1Tests
https://bugs.webkit.org/show_bug.cgi?id=227658
Reviewed by Alexey Proskuryakov.
* CISupport/build-webkit-org/steps_unittest.py:
2021-07-06 Harshil Ratnu <hratnu@apple.com>
Add myself (Harshil Ratnu) to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=227653
Reviewed by Devin Rousso.
* Scripts/webkitpy/common/config/contributors.json: Added myself.
2021-07-06 Alex Christensen <achristensen@webkit.org>
loadSimulatedRequest: should do same delegate callbacks as loadHTMLString and loadData
https://bugs.webkit.org/show_bug.cgi?id=227599
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:
(TEST):
2021-07-05 Philippe Normand <pnormand@igalia.com>
[GTK] Installs in wrong directory on the bots
https://bugs.webkit.org/show_bug.cgi?id=227684
Reviewed by Aakash Jain.
The patch landed in r279563 induced a typo in the installation prefix path option passed to
build-webkit. Then the built-product-archive was failing to find the header andn pkgconfig
files to pack. This patch fixes the issue.
* CISupport/build-webkit-org/steps.py:
(CompileWebKit.start):
* CISupport/build-webkit-org/steps_unittest.py:
(TestCompileWebKit.test_success_gtk):
2021-07-05 Philippe Normand <pnormand@igalia.com>
[GTK] Pack header and .pc files in the built-product archive
https://bugs.webkit.org/show_bug.cgi?id=227526
Reviewed by Michael Catanzaro.
The header files and pkg-config files needed to build WebKitGTK apps are now included in the
built product zip file. As they're text files the impact on the zip size should not be
significant. In order to support this, two changes are introduced for the GTK build bot:
- build-webkit is now called with a --prefix option
- a new build step has been added, which installs the built files in the given prefix directory
Then built-product-archive can simply pack files from the install prefix directory.
Additionally the .a (potentially big) files are now excluded from the zip archive.
* CISupport/build-webkit-org/factories.py:
(BuildFactory.__init__):
* CISupport/build-webkit-org/steps.py:
(CompileWebKit.start):
(InstallBuiltProduct):
* CISupport/built-product-archive:
* Scripts/install-built-product: Added.
2021-07-04 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Augment -_webView:didNotHandleTapAsMeaningfulClickAtPoint: to include meaningful taps
https://bugs.webkit.org/show_bug.cgi?id=227666
rdar://80094962
Reviewed by Tim Horton.
Update the layout test harness to use the replacement SPI instead of the newly deprecated SPI. See
WebKit/ChangeLog for more details.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::installDidHandleTapCallback):
(WTR::TestRunner::callDidHandleTapCallback):
(WTR::TestRunner::installDidNotHandleTapAsMeaningfulClickCallback): Deleted.
(WTR::TestRunner::callDidNotHandleTapAsMeaningfulClickCallback): Deleted.
Rename this to just DidHandleTapCallback, and make it take a boolean argument indicating whether the tap was
handled as a meaningful click.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didHandleTap):
(WTR::TestController::didNotHandleTapAsMeaningfulClick): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didHandleTap):
(WTR::TestInvocation::didNotHandleTapAsMeaningfulClick): Deleted.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView _didTapAtPoint:withResult:]):
(-[TestRunnerWKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]): Deleted.
2021-07-04 Ben Nham <nham@apple.com>
Add support for parsing Competitive PLT results to compare-results
https://bugs.webkit.org/show_bug.cgi?id=227470
Reviewed by Per Arne Vollan.
Modify the script to understand the competitive PLT JSON results produced by the perf bots.
* Scripts/compare-results:
(plt5Breakdown):
(competitivePLTBreakdown):
(PLT5Results):
(detectCompetitivePLT):
(CompetitivePLTResults):
(CompetitivePLTResults.calculate_time_for_run):
(detectBenchmark):
(biggerIsBetter):
(main):
2021-07-02 Aakash Jain <aakash_jain@apple.com>
Delete unused BuildSlaveSupport symlink
https://bugs.webkit.org/show_bug.cgi?id=227644
Reviewed by Dewei Zhu.
* BuildSlaveSupport: Symlink removed.
2021-07-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r279494.
https://bugs.webkit.org/show_bug.cgi?id=227628
Broke api test
TestWebKitAPI.WKWebView.LoadSimulatedRequestUpdatesBackForwardList
Reverted changeset:
"loadSimulatedRequest: should do same delegate callbacks as
loadHTMLString and loadData"
https://bugs.webkit.org/show_bug.cgi?id=227599
https://commits.webkit.org/r279494
2021-07-02 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GTK] media/event-attributes.html fails if mixer is not at 100%
https://bugs.webkit.org/show_bug.cgi?id=83704
Reviewed by Philippe Normand.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues): GStreamer
ports use fakesink to avoid sound output and setting the page
volume to 0 creates trouble with volume events. Let's avoid it in
GStreamer ports.
2021-07-01 Jonathan Bedard <jbedard@apple.com>
[run-webkit-tests] Set software_variant from runtime
https://bugs.webkit.org/show_bug.cgi?id=227600
<rdar://problem/80052263>
Reviewed by Stephanie Lewis.
* Scripts/webkitpy/xcode/device_type.py:
(DeviceType._define_software_variant_from_hardware_family):
(DeviceType.check_consistency):
(DeviceType.__contains__):
* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest.test_from_string):
(DeviceTypeTest.test_contained_in):
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._create_device_with_runtime):
2021-07-01 Alex Christensen <achristensen@webkit.org>
loadSimulatedRequest: should do same delegate callbacks as loadHTMLString and loadData
https://bugs.webkit.org/show_bug.cgi?id=227599
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:
(TEST):
2021-07-01 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Cache identifiers in Git checkouts (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=225616
<rdar://problem/77789230>
Reviewed by Dewei Zhu.
Python 2's Subprocess is 10x slower than Python 3, which means generating
the cache is impractical in Python 2.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.__init__): Disable cache on Python 2 by default.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(test_cache): Force Git to use cache.
(test_revision_cache): Ditto.
2021-07-01 Jonathan Bedard <jbedard@apple.com>
[clean-webkit] Exclude autoinstalled directory
https://bugs.webkit.org/show_bug.cgi?id=227588
<rdar://problem/80033943>
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.discard_untracked_files): Never discard the autoinstalled directory.
2021-07-01 Ryan Haddad <ryanhaddad@apple.com>
[Stress Test EWS] Temporarily disable GuardMalloc test mode to avoid false positives
https://bugs.webkit.org/show_bug.cgi?id=227595
Reviewed by Aakash Jain.
Since the infrastructure issue in webkit.org/b/227365 is causing false positives on this queue,
disable it until we can investigate and address the root cause.
* CISupport/ews-build/factories.py:
(StressTestFactory.__init__):
* CISupport/ews-build/factories_unittest.py:
(TestStressTestFactory.test_stress_test_factory):
2021-07-01 Wenson Hsieh <wenson_hsieh@apple.com>
Selecting or dragging images that contain recognizable text is difficult in Mail compose
https://bugs.webkit.org/show_bug.cgi?id=227544
Reviewed by Devin Rousso.
See WebKit/ChangeLog for more details.
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
Link against VisionKitCore on iOS 15+ and macOS 12+.
* TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig:
Update WebKitTargetConditionals to be consistent with the other target conditions in WebKit, so that we can use
`IOS_SINCE_15` in TestWebKitAPI.xcconfig.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm: Added.
Add new API tests that trigger the image analysis gesture recognizer and check whether or not we requested image
analysis from VisionKit.
(TestWebKitAPI::swizzledLocationInView):
(TestWebKitAPI::swizzledProcessRequest):
2021-07-01 Philippe Normand <pnormand@igalia.com>
[WPE] Pack Cog modules in built-product archive
https://bugs.webkit.org/show_bug.cgi?id=227527
Reviewed by Žan Doberšek.
* CISupport/built-product-archive: Cog now ships its platform plugins in a dedicated modules
directory, which we need to include in the zip archive.
2021-06-30 Chris Dumez <cdumez@apple.com>
Regression(r278737): WebContent crash when calling [WKWebView loadHTMLString:] with an invalid URL
https://bugs.webkit.org/show_bug.cgi?id=227560
<rdar://79815425>
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
(TEST):
2021-06-30 Saam Barati <sbarati@apple.com>
Turn off data ICs by default
https://bugs.webkit.org/show_bug.cgi?id=227334
<rdar://problem/79802812>
Reviewed by Yusuke Suzuki.
* Scripts/run-jsc-stress-tests:
2021-06-30 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Cache identifiers in Git checkouts
https://bugs.webkit.org/show_bug.cgi?id=225616
<rdar://problem/77789230>
Reviewed by Dewei Zhu.
Computing identifiers in git can be slow, especially if you need to compute
multiple. Caching all identifiers for a branch is not much more expensive than calculating a single identifier. Additionally, caching all identifiers
lets us build a performant subversion mapping, bypassing git-svn.
* Scripts/libraries/webkitcorepy/setup.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache): Class holding a cache allowing quick mapping between hashes, identifiers and revisions.
(Git.Cache.__init__): Load cache from json file on disk.
(Git.Cache.path): Path to location of cache on disk.
(Git.Cache._fill): Populate revision and hash to identifier dictionaries.
(Git.Cache.populate): Parse git-log and populate cache.
(Git.Cache.hash): Given an identifier or revision, find the hash.
(Git.Cache.revision): Given an identifier or hash, find the revision.
(Git.Cache.identifier): Given a hash or revision, determine the identifier.
(Git.__init__): Instantiate cache.
(Git.commit): Check cache before running expensive commands.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add `git log` mock.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_tag): Surpress logging.
(TestGit.test_checkout): Ditto.
(TestGit.test_no_log): Ditto.
(TestGit.test_order): Ditto.
(test_cache): Verify identifier cache.
(test_revision_cache): Verify revision cache.
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(SummarizedResultsTest.test_svn_revision_git): Surpress logging.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_commits_for_upload_git_svn): Surpress logging.
2021-06-30 Megan Gardner <megan_gardner@apple.com>
Add ID and versioning support for AppHighlights
https://bugs.webkit.org/show_bug.cgi?id=227279
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:
(TestWebKitAPI::createAppHighlightWithHTML):
(TestWebKitAPI::createWebViewForAppHighlightsWithHTML):
(TestWebKitAPI::TEST):
2021-06-30 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] [Live Text] "Text from Camera" should not be shown in callout bar when selecting text
https://bugs.webkit.org/show_bug.cgi?id=227535
rdar://79936981
Reviewed by Devin Rousso.
Add an API test to exercise the change. See WebKit ChangeLog for more detail.
* TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:
(canPerformActionWithSender):
(TEST):
2021-06-30 Zhifei Fang <zhifei_fang@apple.com>
[webkit.css] make the active tab more obvious
https://bugs.webkit.org/show_bug.cgi?id=227515
Reviewed by Jonathan Bedard.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:
(.tabs .tab.active .link):
2021-06-29 Zhifei Fang <zhifei_fang@apple.com>
Add new argument of device os version for reporting JavaScriptCore test result
https://bugs.webkit.org/show_bug.cgi?id=227363
Reviewed by Dewei Zhu.
* Scripts/run-javascriptcore-tests:
(configurationForUpload):
2021-06-29 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add NestedFuzzyDict
https://bugs.webkit.org/show_bug.cgi?id=227150
<rdar://problem/79475464>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py: Added.
(NestedFuzzyDict):
(NestedFuzzyDict.assert_valid_key): Ensure that the provided key is fuzz-able.
(NestedFuzzyDict.__init__): Construct the object the same way a dictionary is constructed.
(NestedFuzzyDict.__getitem__): Split provided keyname and fuzzy match the second part.
(NestedFuzzyDict.get): Ditto.
(NestedFuzzyDict.getitem): Return the complete keyname and value.
(NestedFuzzyDict.__setitem__): Add value to dictionary.
(NestedFuzzyDict.update): Given a dictionary, insert it's contents into this object.
(NestedFuzzyDict.keys): Iterate through all keys in the object.
(NestedFuzzyDict.values): Iterate through all values in the object.
(NestedFuzzyDict.items): Iterate through all key/value pairs in the object.
(NestedFuzzyDict.dict): Return a standard dictionary with the contents of this object.
(NestedFuzzyDict.__repr__):
(NestedFuzzyDict.__str__):
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/nested_fuzzy_dict_unittest.py: Added.
(TestNestedFuzzyDict):
(TestNestedFuzzyDict.test_constructor):
(TestNestedFuzzyDict.test_index):
(TestNestedFuzzyDict.test_get):
(TestNestedFuzzyDict.test_getitem):
(TestNestedFuzzyDict.test_set):
(TestNestedFuzzyDict.test_dict):
2021-06-29 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add MeasureTime python tool
https://bugs.webkit.org/show_bug.cgi?id=227313
<rdar://problem/79689588>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Export MeasureTime object.
* Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py: Added.
(MeasureTime): Provide class which logs time elapsed in context.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/measure_time_unittest.py: Added.
(MeasureTimeTests):
2021-06-28 Wenson Hsieh <wenson_hsieh@apple.com>
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 W.D. Xiong <w_xiong@apple.com>
Add wdx to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=227466
Unreviewed
* Scripts/webkitpy/common/config/contributors.json: Add wdx as committer
2021-06-28 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Add test suite with temp directory
https://bugs.webkit.org/show_bug.cgi?id=227327
<rdar://problem/79697909>
Reviewed by Stephanie Lewis.
We had some duplicated code which set up, then cleaned up a temporary
directory associated with a test. This should really be owned by a
base class shared between multiple test suites.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/testing.py: Added.
(PathTestCase): Create a temporary directory before a test starts, delete it after.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
(TestCanonicalize): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py:
(TestCheckout): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
(TestFind): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/scm_unittest.py:
(TestScm): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_git_svn_unittest.py:
(TestSetupGitSvn): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestLocalSvn): Adopt PathTestCase.
2021-06-28 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Fix race condition in TaskPool unittests
https://bugs.webkit.org/show_bug.cgi?id=227455
<rdar://problem/79873003>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest.test_invalid_shutdown): Increase worker load to 5 seconds.
2021-06-28 Alex Christensen <achristensen@webkit.org>
RELEASE_ASSERT hit in NetworkSessionCocoa::removeWebSocketTask when using WKWebViewConfiguration._attributedBundleIdentifier
https://bugs.webkit.org/show_bug.cgi?id=227420
<rdar://79609212>
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):
2021-06-28 Sam Weinig <weinig@apple.com>
Add helpers to create Spans from CFDataRef and NSData
https://bugs.webkit.org/show_bug.cgi?id=227217
Reviewed by Chris Dumez.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/cf/SpanCF.cpp: Added.
* TestWebKitAPI/Tests/WTF/cocoa/SpanCocoa.mm: Added.
Add tests for new asBytes() overloads.
2021-06-28 Philippe Normand <pnormand@igalia.com>
[webkitpy] Test timeouts not properly detected when running layout tests with Python 3
https://bugs.webkit.org/show_bug.cgi?id=227442
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/port/driver.py:
(Driver._check_for_driver_timeout): out_line contains a byte string, so test it as such.
2021-06-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] MiniBrowser: add an option to enable the web process sandbox
https://bugs.webkit.org/show_bug.cgi?id=227343
Reviewed by Michael Catanzaro.
* MiniBrowser/gtk/main.c:
(activate):
(main):
2021-06-28 Daniel Kolesa <dkolesa@igalia.com>
[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 <mmaxfield@apple.com>
[macOS] -[NSString _web_widthWithFont:] returns 0
https://bugs.webkit.org/show_bug.cgi?id=227385
<rdar://problem/79430938>
Reviewed by Simon Fraser.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/StringWidth.mm: Added.
(TEST):
2021-06-25 Ziran Sun <zsun@igalia.com>
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 <katherine_cheney@apple.com>
WKWebView loadSimulatedRequest does not set attribution value for url requests within html content
https://bugs.webkit.org/show_bug.cgi?id=227266
<rdar://problem/79316911>
Reviewed by Brent Fulgham.
API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
2021-06-24 Sihui Liu <sihui_liu@apple.com>
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 <pnormand@igalia.com>
[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 <mrobinson@webkit.org>
[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 <eocanha@igalia.com>
[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 <zdobersek@igalia.com>
[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 <katherine_cheney@apple.com>
Migrate App Privacy Report code from WebKitAdditions
https://bugs.webkit.org/show_bug.cgi?id=227045
<rdar://problem/74333287>
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
2021-06-23 Andres Gonzalez <andresg_22@apple.com>
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 <cdumez@apple.com>
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 <jbedard@apple.com>
[results.webkit.org] XSS vulnerability in configuration
https://bugs.webkit.org/show_bug.cgi?id=227267
<rdar://problem/74876210>
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 <sbarati@apple.com>
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 <tsavell@apple.com>
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 <kkinnunen@apple.com>
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 <kkinnunen@apple.com>
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 <cdumez@apple.com>
[WK2] Don't process-swap on navigations within the same non-HTTP(s) protocol
https://bugs.webkit.org/show_bug.cgi?id=227220
<rdar://79106461>
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 <jbedard@apple.com>
[results.webkit.org] XSS vulnerability in test name
https://bugs.webkit.org/show_bug.cgi?id=227235
<rdar://problem/77851775>
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 <katherine_cheney@apple.com>
Migrate App Privacy Report code from WebKitAdditions
https://bugs.webkit.org/show_bug.cgi?id=227045
<rdar://problem/74333287>
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
2021-06-21 Chris Dumez <cdumez@apple.com>
[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 <achristensen@webkit.org>
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 <kkinnunen@apple.com>
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 <achristensen@webkit.org>
REGRESSION (r275496): WebSocket Message too long when message is larger than 1mb
https://bugs.webkit.org/show_bug.cgi?id=227030
<rdar://problem/79370994>
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 <jbedard@apple.com>
[resultsdbpy] Adopt autoinstaller (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=227096
<rdar://problem/79418080>
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 <commit-queue@webkit.org>
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 <pnormand@igalia.com>
[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 <mark.lam@apple.com>
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 <Hironori.Fujii@sony.com>
[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 <jbedard@apple.com>
[resultsdbpy] Adopt autoinstaller
https://bugs.webkit.org/show_bug.cgi?id=227096
<rdar://problem/79418080>
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 <jbedard@apple.com>
[webkitcorepy] Retry downloads in Autoinstall
https://bugs.webkit.org/show_bug.cgi?id=227134
<rdar://problem/79462182>
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 <cdumez@apple.com>
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 <w_xiong@apple.com>
[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 <w_xiong@apple.com>
[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 <w_xiong@apple.com>
[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 <w_xiong@apple.com>
[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 <pvollan@apple.com>
[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 <achristensen@webkit.org>
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 <achristensen@webkit.org>
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 <eric.carlson@apple.com>
[Mac EWS] TestWebKitAPI.WebKit.AudioBufferSize is flaky timing out on EWS
https://bugs.webkit.org/show_bug.cgi?id=227046
<rdar://problem/79360787>
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 <aakash_jain@apple.com>
[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 <ddkilzer@apple.com>
REGRESSION (r278536): Wrong comment character used in coverage.xcconfig
* coverage/coverage.xcconfig:
- Change '#' to '//' to fix the comment.
2021-06-17 Oriol Brufau <obrufau@igalia.com>
[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 <cgarcia@igalia.com>
[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 <Hironori.Fujii@sony.com>
[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 <jbedard@apple.com>
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 <jbedard@apple.com>
[webkitscmpy] Support branch queries in mock git log
https://bugs.webkit.org/show_bug.cgi?id=225889
<rdar://problem/78122705>
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 <jbedard@apple.com>
[webkitscmpy] Cache more Git commands
https://bugs.webkit.org/show_bug.cgi?id=227082
<rdar://problem/79405244>
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 <aboya@igalia.com>
[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 <achristensen@webkit.org>
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 <jbedard@apple.com>
[git-webkit] Handle auth failures
https://bugs.webkit.org/show_bug.cgi?id=226999
<rdar://problem/79313850>
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 <achristensen@webkit.org>
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 <jbedard@apple.com>
[iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002
<rdar://problem/79316598>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Remove unneeded import.
2021-06-15 Diego Pino Garcia <dpino@igalia.com>
[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 <keith_miller@apple.com>
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 <ryanhaddad@apple.com>
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 <kkinnunen@apple.com>
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<WebCore::ImageBufferIOSurfaceBackend> *'`
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp: Added.
(TestWebKitAPI::TEST):
2021-06-11 Fujii Hironori <Hironori.Fujii@sony.com>
[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 <rniwa@webkit.org>
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 <cdumez@apple.com>
Unreviewed small API test failure fix after r278786.
* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
(TEST):
2021-06-11 Alex Christensen <achristensen@webkit.org>
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 <peng.liu6@apple.com>
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 <jbedard@apple.com>
[Monterey] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=226846
<rdar://problem/79095148>
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 <drousso@apple.com>
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 <jbedard@apple.com>
[check-webkit-style] failing in JS checker due to python byte string
https://bugs.webkit.org/show_bug.cgi?id=226925
<rdar://problem/79166108>
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 <tsavell@apple.com>
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 <megan_gardner@apple.com>
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 <jbedard@apple.com>
REGRESSION (r278454): [run-webkit-tests] worker is printed twice for each test in debug logging
https://bugs.webkit.org/show_bug.cgi?id=226895
<rdar://problem/79164077>
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 <achristensen@webkit.org>
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 <cfleizach@apple.com>
AX: TestWebKitAPI.WebKit.AccessibilityReduceMotion failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=226758
<rdar://problem/78984253>
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 <jbedard@apple.com>
[webkitcorepy] 6x performance improvement in Memoized
https://bugs.webkit.org/show_bug.cgi?id=226891
<rdar://problem/79151940>
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 <pnormand@igalia.com>
[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 <tsavell@apple.com>
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 <ysuzuki@apple.com>
[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 <svillar@igalia.com>
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 <cgambrell@apple.com>
Add personal email to Tools/Scripts/webkitpy/common/config/contributors.json
https://bugs.webkit.org/show_bug.cgi?id=226845
<rdar://problem/79095492>
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/common/config/contributors.json:
2021-06-09 Dewei Zhu <dewei_zhu@apple.com>
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 <Hironori.Fujii@sony.com>
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 <ysuzuki@apple.com>
[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 <dewei_zhu@apple.com>
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 <Hironori.Fujii@sony.com>
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 <antti@apple.com>
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 <ryanhaddad@apple.com>
[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 <weinig@apple.com>
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 <weinig@apple.com>
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 <pnormand@igalia.com>
[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 <jya@apple.com>
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 <pnormand@igalia.com>
[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 <jya@apple.com>
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 <achristensen@webkit.org>
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 <wenson_hsieh@apple.com>
Upstream WebKit support for Live Text
https://bugs.webkit.org/show_bug.cgi?id=226706
<rdar://problem/78933684>
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 <Hironori.Fujii@sony.com>
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 <Hironori.Fujii@sony.com>
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 <wenson_hsieh@apple.com>
[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 <cgarcia@igalia.com>
[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 <darin@apple.com>
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 <ddkilzer@apple.com>
Unexport llvm coverage symbols to fix build
<https://webkit.org/b/226684>
<rdar://problem/78906691>
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 <cdumez@apple.com>
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 <cdumez@apple.com>
Use Vector<uint8_t> instead of Vector<char> to store bytes in SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=226623
Reviewed by Darin Adler.
Use Vector<uint8_t> instead of Vector<char> 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 <achristensen@webkit.org>
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 <mrobinson@webkit.org>
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 <mcatanzaro@gnome.org>
[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 <aakash_jain@apple.com>
[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 <jbedard@apple.com>
[run-webkit-tests] Use webkitcorepy's TaskPool
https://bugs.webkit.org/show_bug.cgi?id=226234
<rdar://problem/78471695>
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 <cgarcia@igalia.com>
[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 <said@apple.com>
[MotionMark] Controller.filterOutOutliers() sorts the frameLengths array incorrectly
https://bugs.webkit.org/show_bug.cgi?id=226605
<rdar://77350238>
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 <ddkilzer@apple.com>
Weak external symbols found when building with Release+Coverage configuration
<https://webkit.org/b/226562>
<rdar://problem/78765608>
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 <commit-queue@webkit.org>
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 <jya@apple.com>
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 <rbuis@igalia.com>
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 <jbedard@apple.com>
[webkitcorepy] TaskPool shouldn't fork when 1 process is needed
https://bugs.webkit.org/show_bug.cgi?id=226506
<rdar://problem/78724554>
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 <w_xiong@apple.com>
[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 <cdumez@apple.com>
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 <jya@apple.com>
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 <davidson.garrettm@gmail.com>
[Cocoa] _WKAuthenticatorAssertionResponse should specify the attachment type used
https://bugs.webkit.org/show_bug.cgi?id=225519
<rdar://problem/76554090>
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 <keith_miller@apple.com>
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 <jbedard@apple.com>
[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 <rniwa@webkit.org>
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 <darin@apple.com>
Remove <wtf/Optional.h>
https://bugs.webkit.org/show_bug.cgi?id=226437
Reviewed by Chris Dumez.
* <many files>: Removed include of <wtf/Optional.h>.
2021-06-01 Chris Dumez <cdumez@apple.com>
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 <jya@apple.com>
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 <cfleizach@apple.com>
REGRESSION: (r277971) TestWebKitAPI.WebKit.AccessibilityReduceMotion is timing out
https://bugs.webkit.org/show_bug.cgi?id=226505
<rdar://problem/78721462>
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 <jbedard@apple.com>
[run-webkit-tests] Move helper out of Port instance
https://bugs.webkit.org/show_bug.cgi?id=226344
<rdar://problem/78575542>
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 <Hironori.Fujii@sony.com>
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 <cdumez@apple.com>
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
<rdar://problem/78623536>
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 <aakash_jain@apple.com>
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 <wenson_hsieh@apple.com>
[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 <darin@apple.com>
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.
* <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
2021-05-30 Jean-Yves Avenard <jya@apple.com>
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 <ryanhaddad@apple.com>
[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 <cdumez@apple.com>
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 <weinig@apple.com>
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 <darin@apple.com>
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 <achristensen@webkit.org>
Punycode encode U+0BE6 when not in context of other Tamil characters
https://bugs.webkit.org/show_bug.cgi?id=226409
<rdar://78160926>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):
2021-05-28 Zhifei Fang <zhifei_fang@apple.com>
[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 <matthew_gilligan@apple.com>
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 <zhifei_fang@apple.com>
[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 <drousso@apple.com>
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
<rdar://problem/78534076>
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 <jbedard@apple.com>
[webkitcorey] Gracefully handle CNTRL-C in TaskPool
https://bugs.webkit.org/show_bug.cgi?id=226238
<rdar://problem/78472148>
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 <darin@apple.com>
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.
* <many files>: Accept the renaming done by do-webcore-rename.
2021-05-27 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Use existing signal handler when printing stacktrace
https://bugs.webkit.org/show_bug.cgi?id=226236
<rdar://problem/78471882>
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 <Hironori.Fujii@sony.com>
[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 <timothy_horton@apple.com>
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 <peng.liu6@apple.com>
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 <angelos@igalia.com>
[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 <jya@apple.com>
Make MediaSession readystate enums all lowercase
https://bugs.webkit.org/show_bug.cgi?id=226213
<rdar://problem/78437011>
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm:
(TestWebKitAPI::TEST_F):
2021-05-26 Stephan Szabo <stephan.szabo@sony.com>
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 <don.olmstead@sony.com>
[CMake] Support USE_ANGLE_EGL on additional platforms
https://bugs.webkit.org/show_bug.cgi?id=224888
<rdar://problem/77280211>
Reviewed by Ken Russell.
Generate source listings for Metal and OpenGL ANGLE backends.
* Scripts/update-angle:
2021-05-26 Jonathan Bedard <jbedard@apple.com>
[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 <aakash_jain@apple.com>
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 <jbedard@apple.com>
[run-webkit-tests] Strip php support from webserver (Apache)
https://bugs.webkit.org/show_bug.cgi?id=226032
<rdar://problem/78269181>
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 <jbedard@apple.com>
[test-lldb-webkit] Update for Xcode 12.5
https://bugs.webkit.org/show_bug.cgi?id=226115
<rdar://problem/78331664>
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 <gsnedders@apple.com>
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 <cfleizach@apple.com>
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 <timothy_horton@apple.com>
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 <mark.lam@apple.com>
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 <keith_miller@apple.com>
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 <gsnedders@apple.com>
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 <darin@apple.com>
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 <lmoura@igalia.com>
[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 <cdumez@apple.com>
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 <mark.lam@apple.com>
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 <cfleizach@apple.com>
AX: Fix build failure for WK API WTF::String usage
https://bugs.webkit.org/show_bug.cgi?id=226204
<rdar://problem/78428840>
Reviewed by Tim Horton.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::injectAccessibilityPreference):
2021-05-24 Sam Weinig <weinig@apple.com>
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 <stephan.szabo@sony.com>
[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 <cfleizach@apple.com>
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 <darin@apple.com>
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 <commit-queue@webkit.org>
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 <cdumez@apple.com>
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 <angelos@igalia.com>
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 <cdumez@apple.com>
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<CheckedLock> doesn't subclass AbstractLocker which a lot of
JSC code passes as argument
- Locker<CheckedLock> has no move constructor
- Locker<CheckedLock> 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 <weinig@apple.com>
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 <cdumez@apple.com>
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<T>.
* 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 <aperez@igalia.com>
[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 <commit-queue@webkit.org>
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 <julian_a_gonzalez@apple.com>
[ 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 <cdumez@apple.com>
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<T>.
* 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 <cdumez@apple.com>
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 <aakash_jain@apple.com>
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 <eric.carlson@apple.com>
[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 <gsnedders@apple.com>
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 <julian_a_gonzalez@apple.com>
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 <achristensen@webkit.org>
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 <katherine_cheney@apple.com>
Mark ServiceWorkerThreadProxy with a default app-bound value
https://bugs.webkit.org/show_bug.cgi?id=223201
<rdar://problem/77664416>
Reviewed by Youenn Fablet.
Test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(-[SWAppBoundRequestMessageHandler userContentController:didReceiveScriptMessage:]):
2021-05-20 Aakash Jain <aakash_jain@apple.com>
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 <rmorisset@apple.com>
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 <gsnedders@apple.com>
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 <katherine_cheney@apple.com>
Unreviewed contributor name update.
* Scripts/webkitpy/common/config/contributors.json:
2021-05-20 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Forward booted simulators to children processes
https://bugs.webkit.org/show_bug.cgi?id=225933
<rdar://problem/78169900>
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 <gsnedders@apple.com>
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 <drousso@apple.com>
Add a way to create `"wheel"` events from gesture/touch events
https://bugs.webkit.org/show_bug.cgi?id=225788
<rdar://problem/76714308>
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 <wenson_hsieh@apple.com>
Unreviewed, try to fix the internal build after r277740
It seems `keyData` was intended to be a `String` rather than a `Vector<uint8_t>`.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
2021-05-19 Chris Dumez <cdumez@apple.com>
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 <darin@apple.com>
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 <aakash_jain@apple.com>
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 <weinig@apple.com>
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 <jbedard@apple.com>
[webkitpy] Deprecate webkitpy/tool/grammar.py
https://bugs.webkit.org/show_bug.cgi?id=225943
<rdar://problem/78180111>
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 <JonWBedard@gmail.com>
[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 <commit-queue@webkit.org>
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 <rmorisset@apple.com>
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 <commit-queue@webkit.org>
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 <akeerthi@apple.com>
[macOS] Titlebar separator doesn't show when WKWebView is scrolled
https://bugs.webkit.org/show_bug.cgi?id=220633
<rdar://problem/71094055>
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 <jbedard@apple.com>
[webkitpy] Forward booted simulators to children processes
https://bugs.webkit.org/show_bug.cgi?id=225933
<rdar://problem/78169900>
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 <aakash_jain@apple.com>
[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 <jbedard@apple.com>
[lint-test-expectations] Change shebang to Python 3
https://bugs.webkit.org/show_bug.cgi?id=225898
<rdar://problem/78130334>
Reviewed by Aakash Jain.
* Scripts/lint-test-expectations: Change shebang, remove version check.
2021-05-18 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com>
[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 <wenson_hsieh@apple.com>
[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 <katherine_cheney@apple.com>
WebFrameLoaderClient::dispatchWillSendRequest sometimes resets app-bound value
https://bugs.webkit.org/show_bug.cgi?id=225829
<rdar://problem/78034595>
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 <achristensen@webkit.org>
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 <jbedard@apple.com>
[webkitscmpy] Support testing on machines without svn installed
https://bugs.webkit.org/show_bug.cgi?id=225891
<rdar://problem/78126369>
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 <achristensen@webkit.org>
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 <aakash_jain@apple.com>
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 <achristensen@webkit.org>
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 <achristensen@webkit.org>
[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 <achristensen@webkit.org>
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 <jer.noble@apple.com>
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 <cdumez@apple.com>
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 <rniwa@webkit.org>
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 <weinig@apple.com>
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 <achristensen@webkit.org>
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 <aakash_jain@apple.com>
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 <cdumez@apple.com>
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 <jbedard@apple.com>
[WebKitTestRunner] Forward WebContent termination reason
https://bugs.webkit.org/show_bug.cgi?id=225818
<rdar://problem/78027164>
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 <jbedard@apple.com>
[run-webkit-tests] Handle missing simulator state plist
https://bugs.webkit.org/show_bug.cgi?id=225833
<rdar://problem/78036930>
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 <jbedard@apple.com>
Fix iOS 14.5 embedded build
https://bugs.webkit.org/show_bug.cgi?id=225835
<rdar://problem/78039315>
Reviewed by Dewei Zhu.
* Scripts/configure-xcode-for-embedded-development: Add mach.h, mach_error.h and task.h.
2021-05-14 Devin Rousso <drousso@apple.com>
Sampled Page Top Color: move logic out of `Document`
https://bugs.webkit.org/show_bug.cgi?id=225480
<rdar://problem/77984539>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm:
(TEST.SampledPageTopColor.MainDocumentChange): Added.
2021-05-14 Chris Dumez <cdumez@apple.com>
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 <cdumez@apple.com>
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 <cdumez@apple.com>
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 <jya@apple.com>
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 <weinig@apple.com>
REGRESSION(r277313): [ Debug ] 2 TestWebKitAPI.IPCTestingAPI (API-Tests) are constant timeouts
https://bugs.webkit.org/show_bug.cgi?id=225816
<rdar://problem/78025515>
Reviewed by Ryosuke Niwa.
* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
Update test for rename from ImageData to PixelBuffer.
2021-05-14 Devin Rousso <drousso@apple.com>
Promote `-[WKWebView _pageExtendedBackgroundColor]` SPI to `-[WKWebView underPageBackgroundColor]` API
https://bugs.webkit.org/show_bug.cgi?id=225615
<rdar://problem/76568094>
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 <drousso@apple.com>
[iOS] contextmenu hints can be clipped by the WKWebView
https://bugs.webkit.org/show_bug.cgi?id=224204
<rdar://problem/77089174>
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 <cdumez@apple.com>
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 <jbedard@apple.com>
[run-api-tests] Use Python 3 (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=225427
<rdar://problem/77584713>
Reviewed by Aakash Jain.
* Scripts/run-api-tests: Change she-bang to Python 3.
2021-05-14 Chris Dumez <cdumez@apple.com>
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 <cdumez@apple.com>
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 <jbedard@apple.com>
[webkitpy] Remove unused imports
https://bugs.webkit.org/show_bug.cgi?id=225776
<rdar://problem/77982408>
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 <jbedard@apple.com>
test-lldb-webkit failing with import of lldb
https://bugs.webkit.org/show_bug.cgi?id=225792
<rdar://problem/77993980>
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 <cgarcia@igalia.com>
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 <aakash_jain@apple.com>
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 <aakash_jain@apple.com>
[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 <cdumez@apple.com>
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 <achristensen@webkit.org>
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 <cdumez@apple.com>
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 <cdumez@apple.com>
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 <cdumez@apple.com>
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 <jbedard@apple.com>
[run-api-tests] Use Python 3 (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=225427
<rdar://problem/77584713>
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 <jbedard@apple.com>
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 <darin@apple.com>
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 <dbezhetskov@igalia.com>
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 <timothy_horton@apple.com>
ResizeReversePaginatedWebView fails on some OS versions on some hardware
https://bugs.webkit.org/show_bug.cgi?id=224699
<rdar://76782199>
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 <simon.fraser@apple.com>
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 <mmaxfield@apple.com>
[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 <aakash_jain@apple.com>
[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 <cdumez@apple.com>
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 <sihui_liu@apple.com>
[ BigSur Release ] TestWebKitAPI.IndexedDB.KillWebProcessWithOpenConnection is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=225372
<rdar://problem/77532291>
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 <jbedard@apple.com>
[TestWebKitAPI] Explicitly exit after completing tests
https://bugs.webkit.org/show_bug.cgi?id=225703
<rdar://problem/77673980>
Reviewed by Alexey Proskuryakov.
* TestWebKitAPI/ios/mainIOS.mm:
(main): Explicitly exit the testing process.
2021-05-12 Chris Dumez <cdumez@apple.com>
Queue notification permission requests for the same origin on WebKit side
https://bugs.webkit.org/show_bug.cgi?id=225701
<rdar://76804977>
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 <cdumez@apple.com>
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 <cdumez@apple.com>
Add SPI to suspend / resume a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=225333
<rdar://77462543>
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 <darin@apple.com>
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<uint64_t> instead of StringView::toUInt64Strict.
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: Ditto.
2021-05-11 Devin Rousso <drousso@apple.com>
[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 <commit-queue@webkit.org>
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 <wenson_hsieh@apple.com>
[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 <commit-queue@webkit.org>
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 <sihui_liu@apple.com>
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 <cdumez@apple.com>
Add SPI to suspend / resume a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=225333
<rdar://77462543>
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 <achristensen@webkit.org>
Add SPI to restrict networking to a set of hosts
https://bugs.webkit.org/show_bug.cgi?id=225426
<rdar://77571521>
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 <dpino@igalia.com>
[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 <angelos@igalia.com>
[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 <cdumez@apple.com>
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 <wenson_hsieh@apple.com>
[macOS] Allow immediate action gestures to begin when force clicking text inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=225600
<rdar://problem/77792365>
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 <katherine_cheney@apple.com>
Preflight requests not properly attributed as app-bound
https://bugs.webkit.org/show_bug.cgi?id=225596
<rdar://problem/77664272>
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 <cdumez@apple.com>
[iOS] Pages with service workers do not suspend promptly
https://bugs.webkit.org/show_bug.cgi?id=225598
<rdar://problem/77753717>
Reviewed by Youenn Fablet.
Update WebKit API test accordingly.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2021-05-10 Alex Christensen <achristensen@webkit.org>
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 <aakash_jain@apple.com>
[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 <achristensen@webkit.org>
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 <drousso@apple.com>
Add support for a `media` attribute on `<meta name="theme-color" content="...">`
https://bugs.webkit.org/show_bug.cgi?id=224389
<rdar://problem/74991621>
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 <darin@apple.com>
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<int> instead of String::toInt.
(WTR::AccessibilityUIElement::hierarchicalLevel const): Ditto.
2021-05-10 Alex Christensen <achristensen@webkit.org>
css-display-none actions from WKContentRuleList should apply to pages loaded with loadData and loadHTMLString
https://bugs.webkit.org/show_bug.cgi?id=225493
<rdar://77331789>
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
2021-05-10 Chris Dumez <cdumez@apple.com>
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 <akeerthi@apple.com>
[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
<rdar://problem/77537795>
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 <achristensen@webkit.org>
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 <raj.khem@gmail.com>
[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 <rniwa@webkit.org>
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 <mmaxfield@apple.com>
[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 <achristensen@webkit.org>
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 <cdumez@apple.com>
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 <cdumez@apple.com>
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 <bfulgham@apple.com>
[iOS] Make AccessibilityReduceMotion test case work on iOS
https://bugs.webkit.org/show_bug.cgi?id=225244
<rdar://problem/77589455>
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 <commit-queue@webkit.org>
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 <cgarcia@igalia.com>
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 <bfulgham@apple.com>
[iOS] Make AccessibilityReduceMotion test case work on iOS
https://bugs.webkit.org/show_bug.cgi?id=225244
<rdar://problem/77589455>
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 <rniwa@webkit.org>
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 <aakash_jain@apple.com>
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 <cdumez@apple.com>
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 <pnormand@igalia.com>
Unreviewed, WPE gardening
* TestWebKitAPI/glib/TestExpectations.json: Unflag test, wpebackend-fdo was downgraded in
the SDK revision r277166.
2021-05-06 Chris Dumez <cdumez@apple.com>
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 <lmoura@igalia.com>
[WPE] Garden web-process-crashed API test flakiness after SDK update
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-05-06 Chris Dumez <cdumez@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <jbedard@apple.com>
[webkit-patch] setup-git-clone uses master instead of main
https://bugs.webkit.org/show_bug.cgi?id=225460
<rdar://problem/77616439>
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 <cdumez@apple.com>
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 <fpizlo@apple.com>
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 <aakash_jain@apple.com>
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 <jbedard@apple.com>
[webkitcorepy] Add API to efficiently create a sequence of commits
https://bugs.webkit.org/show_bug.cgi?id=224890
<rdar://problem/76975733>
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 <cdumez@apple.com>
REGRESSION (r272414?): [macOS] TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=221742
<rdar://problem/74220428>
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 <gsnedders@apple.com>
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 <dpino@igalia.com>
[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 <jbedard@apple.com>
[run-api-tests] Use webkitcorepy's TaskPool
https://bugs.webkit.org/show_bug.cgi?id=225221
<rdar://problem/77352465>
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 <drousso@apple.com>
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 <aakash_jain@apple.com>
[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 <aboya@igalia.com>
[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 <drousso@apple.com>
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 <weinig@apple.com>
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 <cdumez@apple.com>
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 <cdumez@apple.com>
REGRESSION (r272414?): [macOS] TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=221742
<rdar://problem/74220428>
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 <cgarcia@igalia.com>
[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 <jiewen_tan@apple.com>
PCM: Find a way to validate source_secret_token and source_secret_token_signature
https://bugs.webkit.org/show_bug.cgi?id=224321
<rdar://problem/76695542>
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 <jbedard@apple.com>
[webkitscmpy] Scope classes used in TaskPool to object
https://bugs.webkit.org/show_bug.cgi?id=225361
<rdar://problem/77514131>
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 <cdumez@apple.com>
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 <achristensen@webkit.org>
localStorage changes aren't reflected between WKWebViews using WKWebViewConfiguration._groupIdentifier
https://bugs.webkit.org/show_bug.cgi?id=225344
<rdar://77496721>
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
(TEST):
2021-05-04 Aakash Jain <aakash_jain@apple.com>
[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 <katherine_cheney@apple.com>
Unreviewed, adding myself as a reviewer.
* Scripts/webkitpy/common/config/contributors.json:
2021-05-03 Kimmo Kinnunen <kkinnunen@apple.com>
[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 <cdumez@apple.com>
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 <jbedard@apple.com>
[webkitpy] Support pickling platforminfo
https://bugs.webkit.org/show_bug.cgi?id=225230
<rdar://problem/77384913>
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 <achristensen@webkit.org>
WKWebView: WKURLSchemeHandler request don't have Range headers for custom scheme videos
https://bugs.webkit.org/show_bug.cgi?id=203302
<rdar://63750321>
Reviewed by Jer Noble and Geoff Garen.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
2021-05-03 Fujii Hironori <Hironori.Fujii@sony.com>
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 <ntim@apple.com>
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 <wenson_hsieh@apple.com>
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 <jbedard@apple.com>
[webkitcorepy] Pass logging level to child processes
https://bugs.webkit.org/show_bug.cgi?id=225311
<rdar://problem/77457646>
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 <cdumez@apple.com>
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 <weinig@apple.com>
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 <aakash_jain@apple.com>
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 <youenn@apple.com>
Use OptionSet for MediaProducer::MutedStateFlags
https://bugs.webkit.org/show_bug.cgi?id=224550
<rdar://problem/76960294>
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
(TestWebKitAPI::TEST):
2021-05-01 Chris Dumez <cdumez@apple.com>
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 <aakash_jain@apple.com>
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 <aakash_jain@apple.com>
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 <wenson_hsieh@apple.com>
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 <clopez@igalia.com>
[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 <bfulgham@apple.com>
[Cocoa] Always extend access to local process HTTP/3 cache directory
https://bugs.webkit.org/show_bug.cgi?id=225171
<rdar://problem/76287224>
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 <kpiddington@apple.com>
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 <jbedard@apple.com>
[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 <wenson_hsieh@apple.com>
[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 <commit-queue@webkit.org>
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 <magomez@igalia.com>
[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 <jbedard@apple.com>
[webkitpy] Support pickling platforminfo
https://bugs.webkit.org/show_bug.cgi?id=225230
<rdar://problem/77384913>
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 <aakash_jain@apple.com>
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 <jbedard@apple.com>
[webkitscpy] Support arguments to TaskPool setup and teardown
https://bugs.webkit.org/show_bug.cgi?id=225220
<rdar://problem/77352340>
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 <darin@apple.com>
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 <rreapor@apple.com>
[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 <aakash_jain@apple.com>
[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 <aakash_jain@apple.com>
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 <gsnedders@apple.com>
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 <drousso@apple.com>
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
<rdar://problem/76251889>
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 <jbedard@apple.com>
[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 <rniwa@webkit.org>
When IPC testing API is enabled, GPU process shouldn't kill Web Process
https://bugs.webkit.org/show_bug.cgi?id=225143
<rdar://70692277>
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 <wenson_hsieh@apple.com>
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 <achristensen@webkit.org>
Add SPI to query whether a URL would be upgraded to HTTPS
https://bugs.webkit.org/show_bug.cgi?id=225154
<rdar://77269904>
Reviewed by Geoff Garen.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:
(TEST):
2021-04-28 Jonathan Bedard <jbedard@apple.com>
[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 <achristensen@webkit.org>
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 <kkinnunen@apple.com>
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 <aakash_jain@apple.com>
Delete unused iExploder
https://bugs.webkit.org/show_bug.cgi?id=225118
Rubber-stamped by Alexey Proskuryakov.
* iExploder: Removed.
2021-04-27 Kimmo Kinnunen <kkinnunen@apple.com>
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 <gsnedders@apple.com>
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 <gsnedders@apple.com>
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 <ryanhaddad@apple.com>
[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 <achristensen@webkit.org>
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 <angelos@igalia.com>
[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 <don.olmstead@sony.com>
[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 <aakash_jain@apple.com>
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 <wenson_hsieh@apple.com>
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 <katherine_cheney@apple.com>
ResourceLoadStatisticsDatabaseStore::aggregatedThirdPartyData() hangs for a long time
https://bugs.webkit.org/show_bug.cgi?id=225063
<rdar://problem/76248557>
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 <achristensen@webkit.org>
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 <aakash_jain@apple.com>
[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 <don.olmstead@sony.com>
[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 <don.olmstead@sony.com>
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 <eocanha@igalia.com>
[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 <rniwa@webkit.org>
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 <darin@apple.com>
Fix handling of overflow of /= and *= operators with double over Checked<uint64_t> 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 <twilco.o@protonmail.com>
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 <aakash_jain@apple.com>
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 <rniwa@webkit.org>
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 <twilco.o@protonmail.com>
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 <aakash_jain@apple.com>
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 <gsnedders@apple.com>
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 <aakash_jain@apple.com>
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 <youenn@apple.com>
Fix KVO for camera/microphone capture state WKWebView API
https://bugs.webkit.org/show_bug.cgi?id=224922
<rdar://problem/77008199>
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 <twilco.o@protonmail.com>
[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 <bburg@apple.com>
[Cocoa] re-enable test case WKInspectorDelegate.InspectorConfiguration
https://bugs.webkit.org/show_bug.cgi?id=224577
<rdar://70505272>
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 <lmoura@igalia.com>
Unreviewed. Gardening TestSSL flakiness
* TestWebKitAPI/glib/TestExpectations.json:
2021-04-22 Simon Fraser <simon.fraser@apple.com>
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 <ntim@apple.com>
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 <Hironori.Fujii@sony.com>
[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 <bburg@apple.com>
v2: REGRESSION(r266890): [Cocoa] Fix API::InspectorClient leak
https://bugs.webkit.org/show_bug.cgi?id=223899
<rdar://problem/75249282>
Reviewed by Devin Rousso.
Address post-review feedback.
* TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:
(TEST):
2021-04-22 Sam Sneddon <gsnedders@apple.com>
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 <wenson_hsieh@apple.com>
[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 <aakash_jain@apple.com>
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 <gsnedders@apple.com>
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 <gsnedders@apple.com>
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 <gsnedders@apple.com>
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 <mmaxfield@apple.com>
[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 <commit-queue@webkit.org>
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 <cdumez@apple.com>
Regression(r275887) open.spotify.com says Safari is not supported
https://bugs.webkit.org/show_bug.cgi?id=224905
<rdar://76982108>
Reviewed by Eric Carlson.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):
2021-04-21 Aakash Jain <aakash_jain@apple.com>
[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 <don.olmstead@sony.com>
[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 <cdumez@apple.com>
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 <gsnedders@apple.com>
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 <twilco.o@protonmail.com>
[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 <gsnedders@apple.com>
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 <simon.fraser@apple.com>
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 <lmoura@igalia.com>
[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=<repo>" and "-DWPE_COG_TAG=<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 <timothy_horton@apple.com>
Long-pressing a data detectors link causes the link to be followed
https://bugs.webkit.org/show_bug.cgi?id=224847
<rdar://problem/72889738>
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 <megan_gardner@apple.com>
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 <drousso@apple.com>
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 `<meta name="theme-color">`).
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2021-04-20 Tim Horton <timothy_horton@apple.com>
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 <katherine_cheney@apple.com>
Preconnect tasks and preflight checks do not correctly mark app-bound context string
https://bugs.webkit.org/show_bug.cgi?id=224779
<rdar://problem/76738879>
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 <basuke.suzuki@sony.com>
[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 <kkinnunen@apple.com>
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 <don.olmstead@sony.com>
[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 <aakash_jain@apple.com>
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 <achristensen@webkit.org>
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 <m.felsch@pengutronix.de>
[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 <cdumez@apple.com>
REGRESSION (r276189): GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is crashing
https://bugs.webkit.org/show_bug.cgi?id=224790
<rdar://problem/76869318>
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 <cdumez@apple.com>
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 <aakash_jain@apple.com>
[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 <bburg@apple.com>
Can't use Web Inspector on web views made by TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=147073
<rdar://problem/76708379>
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 <wtf/text/StringConcatenate.h>.
2021-04-19 Wenson Hsieh <wenson_hsieh@apple.com>
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 <timothy_horton@apple.com>
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 <cdumez@apple.com>
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 <pnormand@igalia.com>
Unreviewed, WPE Minibrowser build warning fix.
* MiniBrowser/wpe/main.cpp: No need to use typedef for this struct declaration.
2021-04-19 Kimmo Kinnunen <kkinnunen@apple.com>
Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards
https://bugs.webkit.org/show_bug.cgi?id=221614
<rdar://problem/74396781>
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 <zalan@apple.com>
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 <cdumez@apple.com>
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 <wenson_hsieh@apple.com>
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 <aakash_jain@apple.com>
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 <lmoura@igalia.com>
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 <bfulgham@apple.com>
Perform port blocking earlier in the load
https://bugs.webkit.org/show_bug.cgi?id=224525
<rdar://problem/75440591>
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 <cdumez@apple.com>
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 <jiewen_tan@apple.com>
Pass credential name to the WebAuthn UI during registration
https://bugs.webkit.org/show_bug.cgi?id=224697
<rdar://75803352>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
2021-04-16 Kate Cheney <katherine_cheney@apple.com>
Disable app-bound request API tests on specific OS versions
https://bugs.webkit.org/show_bug.cgi?id=223692
<rdar://problem/75787288>
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 <achristensen@webkit.org>
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 <twilco.o@protonmail.com>
[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 <cdumez@apple.com>
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 <aakash_jain@apple.com>
[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 <rego@igalia.com>
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 <youenn@apple.com>
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 <aakash_jain@apple.com>
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 <gsnedders@apple.com>
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 <jbedard@apple.com>
style checker should warn about adding new PHP files
https://bugs.webkit.org/show_bug.cgi?id=223905
<rdar://problem/76112036>
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 <gsnedders@apple.com>
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 <wenson_hsieh@apple.com>
WKContentView should become focused without requiring -[WKWebView canBecomeFocused] to return YES
https://bugs.webkit.org/show_bug.cgi?id=224613
<rdar://problem/76710314>
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 <jbedard@apple.com>
[results.webkit.org] Fully report git commits
https://bugs.webkit.org/show_bug.cgi?id=224519
<rdar://problem/76619007>
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 <beidson@apple.com>
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 <aakash_jain@apple.com>
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 <drousso@apple.com>
Promote `-[WKWebView _themeColor]` SPI to API
https://bugs.webkit.org/show_bug.cgi?id=224571
<rdar://problem/75231602>
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 <youenn@apple.com>
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 <achristensen@webkit.org>
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 <jbedard@apple.com>
[GitHub] Add script to verify integrity of the mirror
https://bugs.webkit.org/show_bug.cgi?id=224514
<rdar://problem/76613576>
Reviewed by Aakash Jain.
* Scripts/check-github-mirror-integrity: Added.
2021-04-14 Jonathan Bedard <jbedard@apple.com>
[results.webkit.org] Document ref API argument
https://bugs.webkit.org/show_bug.cgi?id=224435
<rdar://problem/76599481>
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 <katherine_cheney@apple.com>
Service worker soft-update loads not being marked app-bound
https://bugs.webkit.org/show_bug.cgi?id=223200
<rdar://problem/75438555>
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 <aakash_jain@apple.com>
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 <aakash_jain@apple.com>
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 <cgarcia@igalia.com>
[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 <magomez@igalia.com>
[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 <mmaxfield@apple.com>
[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 <achristensen@webkit.org>
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 <achristensen@webkit.org>
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 <ysuzuki@apple.com>
[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 <achristensen@webkit.org>
Remove SharedBuffer's equality operators with Ref<SharedBuffer>
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 <drousso@apple.com>
[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 <simon.fraser@apple.com>
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 <gsnedders@apple.com>
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 <cdumez@apple.com>
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 <cgarcia@igalia.com>
[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 <aakash_jain@apple.com>
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 <aakash_jain@apple.com>
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 <commit-queue@webkit.org>
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 <weinig@apple.com>
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 <angelos@igalia.com>
[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 <aakash_jain@apple.com>
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 <wenson_hsieh@apple.com>
REGRESSION (r271660): Tap highlight no longer shows when tapping clickable elements without touch event listeners
https://bugs.webkit.org/show_bug.cgi?id=224385
<rdar://problem/76462370>
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 <aakash_jain@apple.com>
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 <gsnedders@apple.com>
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 <akeerthi@apple.com>
[iOS][FCR] Use context menus for text input datalist dropdowns
https://bugs.webkit.org/show_bug.cgi?id=224287
<rdar://problem/76351317>
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 <jiewen_tan@apple.com>
PCM: Write more blinded secret tests
https://bugs.webkit.org/show_bug.cgi?id=222018
<rdar://problem/74674160>
Reviewed by John Wilander.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
Adds the new test.
2021-04-08 Alex Christensen <achristensen@webkit.org>
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 <timothy_horton@apple.com>
Safari unit tests sometimes fail an ASSERTion in IOSurface.mm's optionsFor32BitSurface()
https://bugs.webkit.org/show_bug.cgi?id=224351
<rdar://problem/76405354>
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 <achristensen@webkit.org>
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 <ddkilzer@apple.com>
REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when coverage/sanitizer switch is not set
<https://webkit.org/b/224343>
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-<option> is
explicitly set.
2021-04-08 Kate Cheney <katherine_cheney@apple.com>
Add test infrastructure for app bound request context string
https://bugs.webkit.org/show_bug.cgi?id=224311
<rdar://problem/76229003>
Reviewed by Brent Fulgham.
Layout test infrastructure.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::appBoundRequestContextDataForDomain):
(WTR::TestRunner::callDidReceiveAppBoundRequestContextDataForDomainCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::appBoundRequestContextDataForDomain):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveAppBoundRequestContextDataForDomain):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::appBoundRequestContextDataForDomain):
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView _appBoundNavigationDataForDomain:completionHandler:]):
2021-04-08 Aakash Jain <aakash_jain@apple.com>
Add webkit-patch support for fast-cq mode
https://bugs.webkit.org/show_bug.cgi?id=224286
Reviewed by Jonathan Bedard.
* Scripts/webkitpy/tool/steps/options.py:
(Options): Added --fast-cq parameter.
* Scripts/webkitpy/tool/steps/postdiff.py:
(PostDiff.options):
(PostDiff.run): Set the patch name appropriately for fast-cq mode.
* Scripts/webkitpy/common/net/bugzilla/attachment.py:
* Scripts/webkitpy/tool/commands/upload_unittest.py: Added unit test.
2021-04-08 Aakash Jain <aakash_jain@apple.com>
EWS should keep working when Bugzilla is down
https://bugs.webkit.org/show_bug.cgi?id=224336
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(BugzillaMixin.get_patch_json):
(BugzillaMixin.get_bug_json):
2021-04-08 Adam Roben <aroben@apple.com>
prepare-ChangeLog fails to find deleted functions in files with spaces in their path in Git repositories
https://bugs.webkit.org/show_bug.cgi?id=224303
Reviewed by Sam Weinig.
It would also print a bunch of errors like this on stderr:
fatal: ambiguous argument 'Foo/Bar.cpp': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
* Scripts/prepare-ChangeLog:
(originalFile): Quote the file path in the `git show` command we
construct.
2021-04-08 Truitt Savell <tsavell@apple.com>
Repalce bot187 with bot178 for CLoop tester.
rdar://76009577
Unreviewed infrustructure fix.
* CISupport/build-webkit-org/config.json:
2021-04-08 Sihui Liu <sihui_liu@apple.com>
Remove logging for investigating http/tests/IndexedDB/storage-limit-1.html failure
https://bugs.webkit.org/show_bug.cgi?id=223086
<rdar://problem/75591816>
Reviewed by Chris Dumez.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setQuotaLoggingEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setQuotaLoggingEnabled): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2021-04-08 Simon Fraser <simon.fraser@apple.com>
Copy-constructed Vectors should not have excess capacity
https://bugs.webkit.org/show_bug.cgi?id=224313
Reviewed by Darin Adler.
New API tests for testing capacity on copy-construct, with tests for copy-constructing
with various configs of inline capacity.
* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):
2021-04-08 Youenn Fablet <youenn@apple.com>
Update SFrame implementation to latest version
https://bugs.webkit.org/show_bug.cgi?id=224276
Reviewed by Eric Carlson.
Update tests according new way of deriving keys and generating the signature.
* TestWebKitAPI/Tests/WebCore/RTCRtpSFrameTransformerTests.cpp:
(TestWebKitAPI::TEST):
2021-04-07 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Handle multiple double-branch commits
https://bugs.webkit.org/show_bug.cgi?id=224251
<rdar://problem/76288547>
Reviewed by Dewei Zhu.
There are a few cases, namely on the safari-607-branch, where some commits where made both
on trunk and on a branch. In one notable case, two sequential commits were made this way.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn._cache_revisions): Handle multiple double-branch commits.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
(Svn._cache_revisions): Handle multiple double-branch commits.
2021-04-07 Aakash Jain <aakash_jain@apple.com>
commit-queue should perform git reset --hard between retry attempts
https://bugs.webkit.org/show_bug.cgi?id=224300
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(GitResetHard): Build step to perform git reset --hard.
(GitResetHard.start):
(PushCommitToWebKitRepo.evaluateCommand):
* CISupport/ews-build/steps_unittest.py: Added unit-test.
2021-04-07 Jonathan Bedard <jbedard@apple.com>
[build.webkit.org] Commit queue should post the identifier
https://bugs.webkit.org/show_bug.cgi?id=223829
<rdar://problem/75908321>
Reviewed by Aakash Jain.
* CISupport/ews-build/steps.py:
(PushCommitToWebKitRepo.url_for_revision): Use COMMITS_INFO_URL.
(PushCommitToWebKitRepo.url_for_identifier): Convert identifier
to commits.webkit.org URL.
(PushCommitToWebKitRepo.identifier_for_revision): Convert a commit
revision to an identifier string.
(PushCommitToWebKitRepo.comment_text_for_bug): Consult commits.webkit.org
to convert revision to identifier.
* CISupport/ews-build/steps_unittest.py:
2021-04-07 Aakash Jain <aakash_jain@apple.com>
git-webkit find doesn't work well with unicode characters in author name
https://bugs.webkit.org/show_bug.cgi?id=223686
Reviewed by Jonathan Bedard.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/find.py:
(Info.main): Added a try except block while printing author, since the script should still print rest of the info.
2021-04-07 Jonathan Bedard <jbedard@apple.com>
REGRESSION(r274366): webkitscmpy.test.svn_unittest.TestRemoteSvn.test_info fails in non-PDT timezones
https://bugs.webkit.org/show_bug.cgi?id=223606
Reviewed by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestRemoteSvn.test_info): Use utc shifted into PDT for consistency across timezones.
2021-04-07 Don Olmstead <don.olmstead@sony.com>
[CMake] Add WebKit::gtest target
https://bugs.webkit.org/show_bug.cgi?id=224203
Reviewed by Adrian Perez de Castro.
Use the WebKit::gtest target. Remove uses of ${THIRDPARTY_DIR}/gtest/include since the
target propagates those. Also remove the hack to get gtest definitions.
Don't include gtest with the TestJSC executable since it just uses GLib's testing
capabilities.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/config.h:
2021-04-07 Philippe Normand <pnormand@igalia.com>
[GStreamer] Videos start playing muted in epiphany with no unmute icon visible in tab, webkit_web_view_get_is_muted() returns incorrect results
https://bugs.webkit.org/show_bug.cgi?id=223195
Reviewed by Michael Catanzaro.
Adapt is-playing test, after muting the page, webkit_web_view_is_playing_audio() should
still return TRUE.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(IsPlayingAudioWebViewTest::periodicallyCheckIsPlayingForAWhile):
(testWebViewIsPlayingAudio):
2021-04-07 Philippe Normand <pnormand@igalia.com>
[Flatpak SDK] Enable LLVM extension
https://bugs.webkit.org/show_bug.cgi?id=223882
Reviewed by Adrian Perez de Castro.
The clang shipped by default in the FDO SDK is not usable for ASan, UBSan (and I guess TSan)
builds, but the Flatpak extension shipping LLVM11 allows this, even though UBSan builds
still fail (linking errors in JSC and WTF) and will require further investigation. Still,
having clang-11 in the SDK is an improvement.
This patch also adds support for cleaning up unused toolchain archives.
* flatpak/flatpakutils.py:
(run_sanitized):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.main):
(WebkitFlatpak.purge_unused_toolchains):
(WebkitFlatpak.pack_toolchain):
(WebkitFlatpak._get_packages):
2021-04-07 Alejandro G. Castro <alex@igalia.com>
[GTK][WPE] Wrong frame scrolled when view is horizontally scrolled with async scrolling enabled
https://bugs.webkit.org/show_bug.cgi?id=222900
Reviewed by Žan Doberšek.
We were not testing the async code path for WPE, it is important
we do it because it is the default option.
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
Activating AsyncOverflowScrollingEnabled.
2021-04-06 Myles C. Maxfield <mmaxfield@apple.com>
[GPU Process] Simplify DisplayList::Iterator part 5: Tweak the return type of DisplayList::Iterator::operator*()
https://bugs.webkit.org/show_bug.cgi?id=224148
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
(TestWebKitAPI::TEST):
2021-04-06 Jean-Yves Avenard <jya@apple.com>
Add jya@apple.com as committer.
https://bugs.webkit.org/show_bug.cgi?id=224254
Reviewed by Eric Carlson
* Scripts/webkitpy/common/config/contributors.json:
2021-04-06 Alex Christensen <achristensen@webkit.org>
Add U+0581 and U+0585 to list of Armenian characters that look like Latin characters
https://bugs.webkit.org/show_bug.cgi?id=224219
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):
2021-04-06 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION (r274610): Unable to drag images when image extraction is enabled
https://bugs.webkit.org/show_bug.cgi?id=224211
<rdar://problem/76229563>
Reviewed by Tim Horton.
Add support for some new testing infrastructure; see below for more details.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::isAnimatingDragCancel const):
Add a new testing hook to return whether or not the web view's drag interaction is currently animating a drag
cancel (i.e., the drag preview is animating back to its original frame).
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::dragInteractionPolicy const):
Add a test option that allows tests to override the drag interaction policy to "always-allow",
"always-disallow", and the default value. This option allows us to force drag and drop to be enabled when
testing on iPhone simulator.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::dragInteractionPolicy):
(WTR::TestController::platformResetStateToConsistentValues):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::isAnimatingDragCancel const):
2021-04-06 Yusuke Suzuki <ysuzuki@apple.com>
[WTF] Introduce FixedVector and use it for FixedOperands
https://bugs.webkit.org/show_bug.cgi?id=224171
Reviewed by Mark Lam.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/FixedVector.cpp: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::DestructorObserver::DestructorObserver):
(TestWebKitAPI::DestructorObserver::~DestructorObserver):
(TestWebKitAPI::DestructorObserver::operator=):
2021-04-06 Eric Carlson <eric.carlson@apple.com>
[macOS] Add MediaSessionCoordinator API test
https://bugs.webkit.org/show_bug.cgi?id=224140
<rdar://problem/76171173>
Reviewed by Jer Noble.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme:
* TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: Added.
(-[_WKMockMediaSessionCoordinator lastStateChange]):
(-[_WKMockMediaSessionCoordinator lastMethodCalled]):
(-[_WKMockMediaSessionCoordinator identifier]):
(-[_WKMockMediaSessionCoordinator joinWithCompletion:]):
(-[_WKMockMediaSessionCoordinator leave]):
(-[_WKMockMediaSessionCoordinator seekTo:withCompletion:]):
(-[_WKMockMediaSessionCoordinator playWithCompletion:]):
(-[_WKMockMediaSessionCoordinator pauseWithCompletion:]):
(-[_WKMockMediaSessionCoordinator setTrack:withCompletion:]):
(-[_WKMockMediaSessionCoordinator positionStateChanged:]):
(-[_WKMockMediaSessionCoordinator readyStateChanged:]):
(-[_WKMockMediaSessionCoordinator playbackStateChanged:]):
(-[_WKMockMediaSessionCoordinator coordinatorStateChanged:]):
(-[_WKMockMediaSessionCoordinator seekSessionToTime:]):
(-[_WKMockMediaSessionCoordinator playSession]):
(-[_WKMockMediaSessionCoordinator pauseSession]):
(-[_WKMockMediaSessionCoordinator setSessionTrack:]):
(TestWebKitAPI::MediaSessionCoordinatorTest::createCoordinator):
(TestWebKitAPI::MediaSessionCoordinatorTest::webView const):
(TestWebKitAPI::MediaSessionCoordinatorTest::coordinator const):
(TestWebKitAPI::MediaSessionCoordinatorTest::loadPageAndBecomeReady):
(TestWebKitAPI::MediaSessionCoordinatorTest::runScriptWithUserGesture):
(TestWebKitAPI::MediaSessionCoordinatorTest::play):
(TestWebKitAPI::MediaSessionCoordinatorTest::pause):
(TestWebKitAPI::MediaSessionCoordinatorTest::listenForEventMessages):
(TestWebKitAPI::MediaSessionCoordinatorTest::eventListenerWasCalled):
(TestWebKitAPI::MediaSessionCoordinatorTest::clearEventListenerState):
(TestWebKitAPI::MediaSessionCoordinatorTest::executeUntil):
(TestWebKitAPI::MediaSessionCoordinatorTest::waitForEventListenerToBeCalled):
(TestWebKitAPI::MediaSessionCoordinatorTest::listenForMessagesPosted):
(TestWebKitAPI::MediaSessionCoordinatorTest::clearMessagesPosted):
(TestWebKitAPI::MediaSessionCoordinatorTest::listenForSessionHandlerMessages):
(TestWebKitAPI::MediaSessionCoordinatorTest::sessionHandlerWasCalled):
(TestWebKitAPI::MediaSessionCoordinatorTest::waitForSessionHandlerToBeCalled):
(TestWebKitAPI::MediaSessionCoordinatorTest::listenForPromiseMessages):
(TestWebKitAPI::MediaSessionCoordinatorTest::clearPromiseMessages):
(TestWebKitAPI::MediaSessionCoordinatorTest::promiseWasResolved):
(TestWebKitAPI::MediaSessionCoordinatorTest::promiseWasRejected):
(TestWebKitAPI::MediaSessionCoordinatorTest::waitForPromise):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/media-remote.html:
2021-04-06 David Kilzer <ddkilzer@apple.com>
set-webkit-configuration should print current settings
<https://webkit.org/b/224190>
Reviewed by Mark Lam.
* Scripts/set-webkit-configuration:
- Reorder switches to put sanitizers together.
- Declare subroutines.
- Call printCurrentSettings() or printUsage() as needed.
(printCurrentSettings): Add.
(printUsage): Add.
* Scripts/webkitdirs.pm:
- Reorder switch variables to match other code.
(coverageIsEnabled): Add for set-webkit-configuration.
2021-04-06 Philippe Normand <pnormand@igalia.com>
[WPE] Enable Cog's GTK4 backend
https://bugs.webkit.org/show_bug.cgi?id=224099
Reviewed by Adrian Perez de Castro.
The Cog GTK4 platform plugin is more suitable for developer builds on desktop, compared to
the fdo backend which provides no window decorations on most Wayland compositors.
* PlatformWPE.cmake:
* Scripts/webkitpy/port/wpe.py:
(WPEPort.run_minibrowser):
2021-04-06 Zalan Bujtas <zalan@apple.com>
[LFC][Integration] Enable inline box support (RenderInline)
https://bugs.webkit.org/show_bug.cgi?id=220148
<rdar://problem/72768785>
Reviewed by Antti Koivisto.
* TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
(TestWebKitAPI::TEST):
2021-04-06 Philippe Normand <pnormand@igalia.com>
[GStreamer] Test harness should use a mock audio output device
https://bugs.webkit.org/show_bug.cgi?id=223888
Reviewed by Adrian Perez de Castro.
Prioritize the new fakeaudiosink over other platform sinks when running the layout and API
tests. Mute and volume handling will still be tested (mocked, actually) but no actual
rendering will be performed.
The pulseaudio "sanitizer" can't work with a pipewire-pulse server because dynamic module
(un)loading is heavily restricted in this new wrapper. Moreover relying on the default sinks
when running on desktop machines easily triggers unintended beeps when running the tests.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.__init__):
(GtkPort.setup_test_run):
(GtkPort.setup_environ_for_server):
(GtkPort.clean_up_test_run): Deleted.
* Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest):
(GtkPortTest.make_port): Deleted.
* Scripts/webkitpy/port/pulseaudio_sanitizer.py: Removed.
* Scripts/webkitpy/port/pulseaudio_sanitizer_mock.py: Removed.
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
* Scripts/webkitpy/port/wpe_unittest.py:
(WPEPortTest):
(WPEPortTest.make_port): Deleted.
2021-04-06 Aakash Jain <aakash_jain@apple.com>
[resultsdbpy] Remove obsolete BuildbotEightURLFactory
https://bugs.webkit.org/show_bug.cgi?id=223796
Reviewed by Jonathan Bedard.
* Scripts/libraries/resultsdbpy/resultsdbpy/example/environment.py:
* Scripts/libraries/resultsdbpy/resultsdbpy/model/ci_context.py:
(BuildbotEightURLFactory): Deleted.
(BuildbotEightURLFactory.__init__): Deleted.
(BuildbotEightURLFactory.url): Deleted.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/ci_context_unittest.py:
(URLFactoryTest.test_old_builder_url): Deleted.
(URLFactoryTest.test_old_worker_url): Deleted.
2021-04-06 Ryosuke Niwa <rniwa@webkit.org>
Disable WebSQL in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=224144
Reviewed by Sihui Liu.
Disabled WebSQL in WebKitTestRunner.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2021-04-05 Alex Christensen <achristensen@webkit.org>
REGRESSION(r267763) NetworkProcess never terminates
https://bugs.webkit.org/show_bug.cgi?id=224191
<rdar://problem/76124590>
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST):
2021-04-05 Alex Christensen <achristensen@webkit.org>
Resurrect Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=224084
Reviewed by Tim Horton.
* TestWebKitAPI/PlatformMac.cmake:
* WebKitTestRunner/PlatformMac.cmake:
2021-04-05 Myles C. Maxfield <mmaxfield@apple.com>
[GPU Process] Simplify DisplayList::Iterator part 1: Require encoding/decoding delegates for non-inline display list items
https://bugs.webkit.org/show_bug.cgi?id=223849
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
2021-04-05 Christopher Reid <chris.reid@sony.com>
[WinCairo] Enable Service Worker tests
https://bugs.webkit.org/show_bug.cgi?id=223591
Reviewed by Fujii Hironori.
Ignore cert errors with downloads and fix an issue with windows paths.
* WebKitTestRunner/TestController.cpp:
* WebKitTestRunner/TestController.h:
2021-04-05 Lauro Moura <lmoura@igalia.com>
[GLIB] Garden API test failure and flakiness after r275267
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2021-04-02 Brady Eidson <beidson@apple.com>
Add WKURLSchemeTask redirect API.
https://bugs.webkit.org/show_bug.cgi?id=224119
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
(-[TaskSchemeHandler webView:startURLSchemeTask:]):
(TEST):
(-[HTTPRedirectTest webView:startURLSchemeTask:]):
(-[HTTPRedirectTest webView:stopURLSchemeTask:]):
2021-04-02 Jonathan Bedard <jbedard@apple.com>
[check-webkit-style] Check python files in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=224079
<rdar://problem/76122813>
Reviewed by Dewei Zhu.
* Scripts/webkitpy/style/checker.py:
(CheckerDispatcher.should_skip_without_warning): Never skip style checks on .py files.
* Scripts/webkitpy/style/checker_unittest.py:
(CheckerDispatcherSkipTest.test_should_skip_without_warning__false):
2021-04-02 Chris Fleizach <cfleizach@apple.com>
AX: textRectsFromMarkers always fails
https://bugs.webkit.org/show_bug.cgi?id=223556
<rdar://74256003>
Reviewed by Zalan Bujtas.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
2021-04-02 Youenn Fablet <youenn@apple.com>
[MacOS] Enable NSURLSession WebSocket code path in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=220973
<rdar://problem/73655870>
Reviewed by Darin Adler.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2021-04-01 Yusuke Suzuki <ysuzuki@apple.com>
[WTF] Introduce RobinHoodHashTable
https://bugs.webkit.org/show_bug.cgi?id=223895
Reviewed by Fil Pizlo.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/DeletedAddressOfOperator.h:
* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::testMovingUsingEnsure):
(TestWebKitAPI::testMovingUsingAdd):
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::generateTestCapacityUpToSize<0>):
(TestWebKitAPI::generateTestCapacityUpToSize):
* TestWebKitAPI/Tests/WTF/MoveOnly.h:
* TestWebKitAPI/Tests/WTF/RobinHoodHashMap.cpp: Copied from Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp.
(TestWebKitAPI::TEST):
(TestWebKitAPI::bucketForKey):
(TestWebKitAPI::ZeroHash::hash):
(TestWebKitAPI::ObjectWithRefLogger::ObjectWithRefLogger):
(TestWebKitAPI::testMovingUsingEnsure):
(TestWebKitAPI::testMovingUsingAdd):
(TestWebKitAPI::DerefObserver::ref):
(TestWebKitAPI::DerefObserver::deref):
(TestWebKitAPI::TestObjectWithCustomDestructor::TestObjectWithCustomDestructor):
(TestWebKitAPI::TestObjectWithCustomDestructor::~TestObjectWithCustomDestructor):
* TestWebKitAPI/Tests/WTF/RobinHoodHashSet.cpp: Copied from Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp.
(TestWebKitAPI::capacityForSize):
(TestWebKitAPI::testInitialCapacity):
(TestWebKitAPI::generateTestCapacityUpToSize<0>):
(TestWebKitAPI::generateTestCapacityUpToSize):
(TestWebKitAPI::TEST):
(TestWebKitAPI::DerefObserver::ref):
(TestWebKitAPI::DerefObserver::deref):
2021-04-01 Alex Christensen <achristensen@webkit.org>
REGRESSION(r272469) QuickLook previews broken in some places on macOS
https://bugs.webkit.org/show_bug.cgi?id=224086
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:
(TestWebKitAPI::TEST_F):
2021-04-01 Aakash Jain <aakash_jain@apple.com>
Enable ews status bubble for stress tests ews
https://bugs.webkit.org/show_bug.cgi?id=224069
Reviewed by Jonathan Bedard.
* CISupport/ews-app/ews/views/statusbubble.py:
(StatusBubble):
2021-04-01 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] REGRESSION(r272999): User-installed fonts no longer work in Mail
https://bugs.webkit.org/show_bug.cgi?id=223985
<rdar://problem/75975210>
Reviewed by Per Arne Vollan.
* TestWebKitAPI/Tests/WebKit/FontRegistrySandboxCheck.mm:
(TEST):
2021-04-01 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Improve git-svn-id regex
https://bugs.webkit.org/show_bug.cgi?id=224008
<rdar://problem/76062561>
Rubber-stamped by Aakash Jain.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.commit): Strip leading spaces before parsing the commit message.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Ensure that git-svn-id lines
are printed to stdout with leading spaces.
* Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:
(ScmBase): Only match git-svn-id lines if they are at the beginning of a line.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
2021-04-01 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Support case where contributor did not define email
https://bugs.webkit.org/show_bug.cgi?id=224005
<rdar://problem/76058258>
Rubber-stamped by Aakash Jain.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
(Contributor):
(Contributor.Mapping.create): An email of 'None' should not be indexed.
(Contributor.from_scm_log): Handle case where contributor is defined, but email isn't.
2021-03-31 Chris Dumez <cdumez@apple.com>
Add API test for Bug 224022
https://bugs.webkit.org/show_bug.cgi?id=224024
Reviewed by Alex Christensen.
The way to reproduce the bug was to make sure that the NetworkProcessProxy was not associated
with any datastore at the time of the crash, then construct a new view and do a load, which
would hang.
If the NetworkProcessProxy was associated with a datastore and the WKWebSiteDataStore's
m_networkProcess was not null, then WebsiteDataStore::networkProcessCrashed() would take
care of calling `m_networkProcess->didTerminate()`, which would destroy the NetworkProcessProxy
singleton.
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
(TEST):
2021-03-31 Wenson Hsieh <wenson_hsieh@apple.com>
List of extents should be bounds-checked when iterating display list items
https://bugs.webkit.org/show_bug.cgi?id=224019
<rdar://problem/71851600>
Reviewed by Tim Horton.
Rename `InvalidItem` to `InvalidItemOrExtent`.
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):
2021-03-31 BJ Burg <bburg@apple.com>
Style checker should warn about use of future OS versions in WK_API_AVAILABLE
https://bugs.webkit.org/show_bug.cgi?id=223881
Reviewed by Jonathan Bedard.
Add some more brains to the WK_API_AVAILABLE style checker. It is now more
fussy and won't allow anything except a valid version string or a TBA macro.
There is also a mechanism to prevent adding version numbers that exceed the
publicly available SDK version for the relevant OS.
* Scripts/webkitpy/common/version_name_map.py:
(VersionNameMap.mapping_for_platform): Add 'macos' as an alias for 'mac'.
(VersionNameMap.max_public_version): Added.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_arguments_for_wk_api_available):
(check_arguments_for_wk_api_available.max_version_for_platform):
(check_arguments_for_wk_api_available.check_version_string):
(check_style):
(check_min_versions_of_wk_api_available): Deleted.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest):
2021-03-31 Aakash Jain <aakash_jain@apple.com>
EWS should stress test newly added tests
https://bugs.webkit.org/show_bug.cgi?id=223938
Reviewed by Jonathan Bedard.
* CISupport/ews-build/config.json:
* CISupport/ews-build/factories.py:
(Factory):
(StressTestFactory):
* CISupport/ews-build/factories_unittest.py: Added unit-tests.
* CISupport/ews-build/loadConfig.py:
2021-03-31 David Kilzer <ddkilzer@apple.com>
REGRESSION (r275150): set-webkit-configuration is too aggressive at deleting config files when switch is not set
<https://webkit.org/b/224009>
Reviewed by Mark Lam.
* Scripts/set-webkit-configuration:
- Partially revert changes in r275150 when the config file
wasn't always deleted for $architecture, $configuration,
$forceOptimizationLevel and $ltoMode.
2021-03-31 Alex Christensen <achristensen@webkit.org>
Add deprecation macros.
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(verifyCertificateAndPublicKey):
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2021-03-31 Wenson Hsieh <wenson_hsieh@apple.com>
WKContentView should support UIKit protocol methods for becoming focused
https://bugs.webkit.org/show_bug.cgi?id=224003
<rdar://problem/75313658>
Reviewed by Megan Gardner.
Add a test to verify that the vaue of `-[WKContentView canBecomeFocused]` can be overridden by subclassing
`-[WKWebView canBecomeFocused]`.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/UIFocusTests.mm: Added.
(-[UIFocusTestWKWebView canBecomeFocused]):
2021-03-31 Alex Christensen <achristensen@webkit.org>
Add test for SOCKS5 proxy SPI
https://bugs.webkit.org/show_bug.cgi?id=223964
Reviewed by Sam Weinig.
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):
2021-03-31 Aakash Jain <aakash_jain@apple.com>
Add build step to run layout tests for multiple iterations in guard malloc mode
https://bugs.webkit.org/show_bug.cgi?id=224002
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(RunWebKitTests):
(RunWebKitTests.setLayoutTestCommand):
(RunWebKitTestsInStressGuardmallocMode):
* CISupport/ews-build/steps_unittest.py:
2021-03-31 Aakash Jain <aakash_jain@apple.com>
Add build step to run layout tests for multiple iterations
https://bugs.webkit.org/show_bug.cgi?id=223950
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(RunWebKitTestsInStressMode):
(RunWebKitTestsInStressMode.setLayoutTestCommand):
(RunWebKitTestsInStressMode.evaluateCommand):
* CISupport/ews-build/steps_unittest.py: Added unit-tests.
2021-03-31 Aakash Jain <aakash_jain@apple.com>
Add a fast-cq mode for commit-queue which will skip build and test
https://bugs.webkit.org/show_bug.cgi?id=223954
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py: Enable fast-cq mode when patch name on bugzilla starts with [fast-cq].
(BugzillaMixin):
(BugzillaMixin._is_patch_obsolete):
(CompileWebKit.doStepIf): Skip building on commit-queue when fast_commit_queue property is set.
(RunWebKitTests.doStepIf): Skip testing on commit-queue when fast_commit_queue property is set.
* CISupport/ews-build/steps_unittest.py:
2021-03-31 Youenn Fablet <youenn@apple.com>
Apply permission policy to geolocation
https://bugs.webkit.org/show_bug.cgi?id=223248
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[GeolocationDelegateNew setValidationHandler:]):
(-[GeolocationDelegateNew _webView:requestGeolocationPermissionForOrigin:initiatedByFrame:decisionHandler:]):
(-[GeolocationPermissionMessageHandler userContentController:didReceiveScriptMessage:]):
2021-03-30 Chris Dumez <cdumez@apple.com>
Service Worker scripts use too much memory in the network process
https://bugs.webkit.org/show_bug.cgi?id=223808
<rdar://75637093>
Reviewed by Geoff Garen.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-4.sqlite3: Removed.
Drop outdated pre-baked service worker registration database as it is no longer
needed and it is a pain to keep up to date.
* TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
Add API test coverage for FileSystem::deleteNonEmptyDirectory(). It is not a new API but it
had no tests, it used more in this patch and we now have an implementation on all supported
platforms.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
- Tweak service worker tests so that they expect a version 6 database instead of version 5,
since I updated the database scheme and bumped the version.
- Update test that was relying on a pre-baked service worker database file (with old schema) and
have it dynamically generate the database instead by loading a page that registers a service
worker.
2021-03-30 Jonathan Bedard <jbedard@apple.com>
[resultsdbpy] Return new-style commits (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=223262
<rdar://problem/75483361>
Unreviewed follow-up fix.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:
(CommitController.register): Allow branch in commit uploads.
2021-03-30 Jessie Berlin <jberlin@webkit.org>
Reinstate my committer status.
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-03-30 Aakash Jain <aakash_jain@apple.com>
[ews] Make RunWebKitTests class easy to extend
https://bugs.webkit.org/show_bug.cgi?id=223939
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(RunWebKitTests):
(RunWebKitTests.setLayoutTestCommand): Separated out code to set the layout-test command.
(RunWebKitTests.start):
2021-03-29 Simon Fraser <simon.fraser@apple.com>
Allow non-60fps display updates to be driven by DisplayRefreshMonitor
https://bugs.webkit.org/show_bug.cgi?id=223912
Reviewed by Sam Weinig.
New API tests for preferredFramesPerSecond() and
DisplayUpdate::relevantForUpdateFrequency(), and duplicate existing tests for the "use
display nominal FPS" vs "use near-60 FPS" settings.
* TestWebKitAPI/Tests/WebCore/AnimationFrameRate.cpp:
(TestWebKitAPI::TEST):
2021-03-30 Aakash Jain <aakash_jain@apple.com>
[ews] Add build step to find list of layout tests modified by a patch
https://bugs.webkit.org/show_bug.cgi?id=223890
Reviewed by Jonathan Bedard.
* CISupport/ews-build/steps.py:
(AnalyzePatch): Created common base class for CheckPatchRelevance and FindModifiedLayoutTests.
(AnalyzePatch._get_patch): Moved to base class.
(AnalyzePatch._addToLog): Ditto.
(AnalyzePatch.getResultSummary): Ditto.
(CheckPatchRelevance):
(FindModifiedLayoutTests): Build step to find list of layout tests modified by the patch being processed.
(FindModifiedLayoutTests.find_test_names_from_patch):
(FindModifiedLayoutTests.start):
* CISupport/ews-build/steps_unittest.py: Added unit-tests.
2021-03-29 Cameron McCormack <heycam@apple.com>
Avoid calling `xcodebuild -showsdks` where possible.
https://bugs.webkit.org/show_bug.cgi?id=223727
Reviewed by Sam Weinig.
run-minibrowser needs to know what port it's running on, since that
affects the build directory to look in to find the MiniBrowser binary.
On macOS, webkitdirs.pm's determinePortName ends up running
`xcodebuild -showsdks` to see if the current SDK has an internal
variant available, but this is slow. But we don't need to know the
exact SDK name here, just the SDK platform name, to determine the
port name.
So we shuffle some code around to avoid calling `xcodebuild -showsdks`
where we can. This reduces the time spent in run-minibrowser before
MiniBrowser is launched (crudely measured with `time run-minibrowser
--help`) from 2s to 0.6s on this machine.
* Scripts/webkitdirs.pm:
(readXcodeUserDefault):
(determineArchitecture):
(argumentsForConfiguration):
(availableXcodeSDKs):
(isValidXcodeSDKPlatformName):
(determineXcodeSDKPlatformName):
(determineXcodeSDK):
(setXcodeSDK):
(xcodeSDKPlatformName):
(determinePortName):
2021-03-29 Jonathan Bedard <jbedard@apple.com>
[resultsdbpy] Return new-style commits
https://bugs.webkit.org/show_bug.cgi?id=223262
<rdar://problem/75483361>
Reviewed by Dewei Zhu.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit.py: Removed.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:
(_find_comparison): Replace id with ref.
(uuid_range_for_commit_range_query): Support both id and ref in REST API.
(uuid_range_for_query): Ditto.
(CommitController._find): Ditto.
(CommitController.register): Return webkitscmpy.Commit object.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller_unittest.py:
(CommitControllerTest.test_branches): WebKit's default branch is now main.
(CommitControllerTest.test_register_with_full_commit): Registered commits should be webkitscmpy Commit objects.
(CommitControllerTest.test_find_range_id): Returned revisions are now integers.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_unittest.py: Removed.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/upload_controller_unittest.py:
(UploadControllerPostTest.test_upload): WebKit commits are under-pinned by Git now.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/archive_context.py:
(ArchiveContext.register): Use webkitscmpy Commit objects.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/ci_context.py:
(CIContext.register): Use webkitscmpy Commit objects.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:
(CommitContext.CommitModel): Renamed from CommitModelMk2.
(CommitContext.CommitByUuidAscending): Renamed from CommitByUuidAscendingMk2.
(CommitContext.CommitByUuidDescending): Renamed from CommitByUuidDescendingMk2.
(CommitContext.__init__): Remove old tables.
(CommitContext.timestamp_to_uuid): Use webkitscmpy Commit objects.
(CommitContext.branch_keys_for_commits): All default branches should be treated the same.
(CommitContext.find_commits_by_ref): Find commits by revision, hash and identifier.
(CommitContext.register):
(CommitContext.register_commit): Save commit to new tables.
(CommitContext.url): Pass commit object to repository url generator.
(CommitContext.CommitByID): Deleted.
(CommitContext.CommitModelMk2): Renamed to CommitModel.
(CommitContext.CommitByUuidAscendingMk2): Renamed to CommitByUuidAscending.
(CommitContext.CommitByUuidDescendingMk2): Renamed to CommitByUuidDescending.
(CommitContext.find_commits_by_id): Deleted.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:
(CommitContextTest): Use ref instead of id.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/failure_context.py:
(FailureContext.register): Use webkitscmpy Commit objects.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/mock_model_factory.py:
(MockModelFactory):
(MockModelFactory.webkit): Mock both Subversion and GitHub for WebKit.
(MockModelFactory.create):
* Scripts/libraries/resultsdbpy/resultsdbpy/model/repository.py:
(Repository.commit): By default, fully define commits.
(StashRepository.commit): Ditto.
(StashRepository.url_for_commit): Create a URL for a commit object.
(WebKitRepository.__init__): Use both GitHub and Subversion.
(WebKitRepository.commit): Determine which remote to use based on provided arguments.
(WebKitRepository.url_for_commit): Create a URL for a commit object.
(WebKitRepository.representations): WebKit commits can be represented by hashes.
(Repository.commit_for_id): Deleted.
(StashRepository.commit_for_id): Deleted.
(WebKitRepository.commit_for_id): Deleted.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/repository_unittest.py:
(RepositoryTest.test_svn): WebKit default branch is now main.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/suite_context.py:
(SuiteContext.register): Use webkitscmpy Commit objects.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/test_context.py:
(TestContext.register): Use webkitscmpy Commit objects.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/upload_context.py:
(UploadContext.UploadsByConfigurationLegacy.unpack): Use webkitscmpy Commit objects.
(UploadContext.UploadsByConfiguration.unpack): Ditto.
(UploadContext._do_job_for_key): Ditto.
(UploadContext.upload_test_results): Ditto.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/archive_view_unittest.py:
(ArchiveViewUnittest.register_archive): Use webkitscmpy Commit objects.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/commit_view.py:
(CommitView.commit): Use webkitscmpy Commit objects.
(CommitView.info): Ditto.
(CommitView.previous): Ditto.
(CommitView.next): Ditto.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:
(Commit):
(Commit.prototype.label): Only print identifier/hash/revision if they are defined.
(_CommitBank.prototype._loadSiblings): Use ref over id.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js: main is a default branch.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(xAxisFromScale): Only print author if the author exists.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/commit.html: prefer ref over id, use
webkitscmpy Commit object in Jinja template.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html: Update documentation
to match webkitscmpy Commit object.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/investigate.html: main is a default branch.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/search.html: Correct CommitRepresentation callback.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/suite_results.html: Ditto.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/setup.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:
(Commit.Encoder.default): Handle dict and list in JSON correctly.
(Commit.uuid): uuid should be 'None' when timestamp is 'None'.
(Commit.__repr__): Return a ? for an undefined commit.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:
(BitBucket.request): Do not add git-svn-id for undefined revision.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub._commit_response): Fix unit tests.
* Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:
(ScmBase): Do not mach git-svn ID with a space before it.
2021-03-29 Wenson Hsieh <wenson_hsieh@apple.com>
Add a way for internal clients to hit-test for selectable text in user agent shadow roots
https://bugs.webkit.org/show_bug.cgi?id=223894
<rdar://problem/75968068>
Reviewed by Tim Horton.
Add a new API test to exercise `-[WKWebProcessPlugInFrame hitTest:options:]`.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm: Added.
(-[WKWebViewWithHitTester hasSelectableTextAt:]):
(TestWebKitAPI::createWebViewWithHitTester):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/simple-responsive-page.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleHitTestPlugIn.mm: Added.
(-[InjectedBundleHitTestPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[InjectedBundleHitTestPlugIn webProcessPlugInBrowserContextController:didClearWindowObjectForFrame:inScriptWorld:]):
(-[InjectedBundleHitTestPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):
(-[InjectedBundleHitTestPlugIn hasSelectableTextAt:completionHandler:]):
(-[InjectedBundleHitTestPlugIn dealloc]):
* TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleHitTestProtocol.h: Added.
2021-03-29 Myles C. Maxfield <mmaxfield@apple.com>
[GPU Process] Simplify DisplayList::Iterator part 2: Rename setItemBufferClient to setItemBuffer{Writing,Reading}Client
https://bugs.webkit.org/show_bug.cgi?id=223863
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):
2021-03-29 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, reverting r275170.
Broke the build
Reverted changeset:
"[Big Sur arm64]
TestWebKitAPI.WebKit.AccessibilityReduceMotion is a flaky
crash"
https://bugs.webkit.org/show_bug.cgi?id=222824
https://commits.webkit.org/r275170
2021-03-26 Ryan Haddad <ryanhaddad@apple.com>
[Big Sur arm64] TestWebKitAPI.WebKit.AccessibilityReduceMotion is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=222824
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm: Disable the test for arm64 Macs.
2021-03-29 Alex Christensen <achristensen@webkit.org>
Migrate _WKUserContentExtension and older versions of WKContentRuleList to WKContentRuleList during lookup
https://bugs.webkit.org/show_bug.cgi?id=223831
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(respond):
(TEST):
* TestWebKitAPI/cocoa/TestNavigationDelegate.h:
* TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[WKWebView _test_waitForDidFailProvisionalNavigation]):
2021-03-29 Youenn Fablet <youenn@apple.com>
Promote WKWebView getUserMedia SPI to API
https://bugs.webkit.org/show_bug.cgi?id=223806
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
(-[UserMediaCaptureUIDelegateForParameters webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:
(-[NavigationWhileGetUserMediaPromptDisplayedUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm:
* TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:
(-[DeviceOrientationPermissionUIDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
(-[DeviceOrientationPermissionValidationDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:
(-[SpeechRecognitionUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[GeolocationDelegateNew _webView:requestGeolocationPermissionForOrigin:initiatedByFrame:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:
(-[UserMediaUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
(-[SimulateFailedSandboxUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[WebsitePoliciesDeviceOrientationUIDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
* TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
* TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:
(-[UserMediaCaptureUIDelegate init]):
(-[UserMediaCaptureUIDelegate setAudioDecision:]):
(-[UserMediaCaptureUIDelegate setVideoDecision:]):
(-[UserMediaCaptureUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
2021-03-28 Cameron McCormack <heycam@apple.com>
Enable AspectRatioOfImgFromWidthAndHeightEnabled for WebKitLegacy.
https://bugs.webkit.org/show_bug.cgi?id=223815
Reviewed by Sam Weinig.
* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
2021-03-27 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that http server for run-benchmark script does not work on python3.
https://bugs.webkit.org/show_bug.cgi?id=223839
Reviewed by Ryosuke Niwa.
Fix encoding issue on run-benchmark http server.
Extract argument parser configure code for run-benchmark so that we can reuse it elsewhere.
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
(ServerControl.render_POST):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
(config_argument_parser): Extract argument parser configure code so that we can reuse it elsewhere.
(parse_args):
(main):
2021-03-28 Sam Weinig <weinig@apple.com>
Remove ENABLE_INDEXED_DATABASE & ENABLE_INDEXED_DATABASE_IN_WORKERS, it seems like it is on for all ports
https://bugs.webkit.org/show_bug.cgi?id=223810
Reviewed by Simon Fraser.
* Scripts/webkitperl/FeatureList.pm:
Remove ENABLE_INDEXED_DATABASE & ENABLE_INDEXED_DATABASE_IN_WORKERS from FeatureList.pm.
2021-03-28 David Kilzer <ddkilzer@apple.com>
Compile WebKit with UBSan
<https://webkit.org/b/176131>
<rdar://problem/34174018>
Reviewed by Alexey Proskuryakov.
* Scripts/set-webkit-configuration:
- Add support for --[no-]ubsan command-line switch.
- Add warning when enabling ASan and TSan together.
(updateOrDeleteConfigurationFile):
- Extract common code for updating configuration files.
* Scripts/webkitdirs.pm:
(readSanitizerConfiguration): Add.
- Extract common code for reading sanitizer configuration files.
(determineASanIsEnabled):
(determineTSanIsEnabled):
(determineUBSanIsEnabled): Add.
- Make use of readSanitizerConfiguration().
(ubsanIsEnabled): Add.
(XcodeOptions):
- Add command-line switches for UBSan.
(generateBuildSystemFromCMakeProject): Ditto.
* sanitizer/ubsan.xcconfig: Add.
- Contains Xcode settings for enabling UBSan.
2021-03-27 Kate Cheney <katherine_cheney@apple.com>
PCM: Send report to both click source and attribution destination website
https://bugs.webkit.org/show_bug.cgi?id=223615
<rdar://problem/75849443>
Reviewed by Brent Fulgham.
Update API tests to check for a valid time to send for both the source
and destination site.
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
2021-03-26 Lauro Moura <lmoura@igalia.com>
REGRESSION(r275111) [GLIB] Fix build with new derived sources and forwarding headers scheme
https://bugs.webkit.org/show_bug.cgi?id=223834
Unreviewed build fix.
* TestWebKitAPI/glib/CMakeLists.txt: Add some missing variables with
needed include headers.
2021-03-26 Tyler Wilcock <twilco.o@protonmail.com>
Fix TypeError: Can't mix strings and bytes in path components in Tools/Scripts/dump-class-layout
https://bugs.webkit.org/show_bug.cgi?id=223819
Reviewed by Jonathan Bedard.
Prior to this patch, I received this error when trying to run the
dump-class-layout script. This happens because `webkit_build_dir()` returns
bytes rather than a string.
$ dump-class-layout -c Release WebCore Pair
Traceback (most recent call last):
File "/home/twilco/projects/webkit/Tools/Scripts//dump-class-layout", line 88, in <module>
main()
File "/home/twilco/projects/webkit/Tools/Scripts//dump-class-layout", line 80, in main
target_path = os.path.join(build_dir, args.config, args.framework + ".framework", args.framework);
File "/usr/lib/python3.9/posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.9/genericpath.py", line 155, in _check_arg_types
raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components
* Scripts/dump-class-layout:
Update `webkit_build_dir()` to decode its output into a UTF-8 string.
2021-03-26 Jonathan Bedard <jbedard@apple.com>
System installing webkitcorepy can break certain scripts
https://bugs.webkit.org/show_bug.cgi?id=223822
<rdar://problem/75905163>
Rubber-stamped by Alan Coon.
* Scripts/libraries/resultsdbpy/resultsdbpy/example/environment.py:
* Scripts/test-lldb-webkit: Replace sys.path.append with sys.path.insert.
* Scripts/webkitpy/__init__.py: Only put webkitcorepy path into sys.path if it isn't already there.
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
Replace sys.path.append with sys.path.insert.
* Scripts/webkitpy/common/system/executive_unittest.py: Ditto.
* Scripts/webkitpy/port/config_standalone.py: Ditto.
2021-03-26 Jonathan Bedard <jbedard@apple.com>
[webkit-patch] Use commit.webkit.org instead of remote SVN to compute identifier
https://bugs.webkit.org/show_bug.cgi?id=223820
<rdar://problem/75902125>
Reviewed by Dewei Zhu.
* Scripts/webkitpy/tool/commands/download_unittest.py:
(DownloadCommandsTest.mock_svn_remote): Replace mock Svn with mock requests.
* Scripts/webkitpy/tool/commands/upload_unittest.py:
* Scripts/webkitpy/tool/comments.py:
(bug_comment_from_svn_revision): Use commits.webkit.org instead of svn.webkit.org.
* Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
(CloseBugForLandDiffTest.test_empty_state): Replace mock Svn with mock requests.
2021-03-26 Don Olmstead <don.olmstead@sony.com>
[CMake] Deprecate using DERIVED_SOURCES_DIR/FOWARDING_HEADERS_DIR directly
https://bugs.webkit.org/show_bug.cgi?id=223763
Reviewed by Michael Catanzaro.
Remove any usages of DERIVED_SOURCES_DIR and FOWARDING_HEADERS_DIR.
* DumpRenderTree/PlatformMac.cmake:
* MiniBrowser/gtk/CMakeLists.txt:
* MiniBrowser/mac/CMakeLists.txt:
* WebKitTestRunner/PlatformMac.cmake:
* wpe/backends/CMakeLists.txt:
2021-03-26 Zalan Bujtas <zalan@apple.com>
[MiniBrowser] Remove redundant "Disable Simple Line Layout" menu item
https://bugs.webkit.org/show_bug.cgi?id=223812
Reviewed by Simon Fraser.
SLL was replaced by IFC integration a while ago.
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController initWithMenu:]):
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleSimpleLineLayoutEnabled:]): Deleted.
(-[SettingsController simpleLineLayoutEnabled]): Deleted.
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]):
2021-03-26 Kate Cheney <katherine_cheney@apple.com>
Implement PCM SQLite changes based on spec review
https://bugs.webkit.org/show_bug.cgi?id=223726
<rdar://problem/75818526>
Reviewed by Brent Fulgham.
Add API test coverage to check that renaming and adding columns works.
Data migration was tested manually.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: Added.
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-shm: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutFraudPreventionDatabase.db-wal: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-shm: Added.
* TestWebKitAPI/Tests/WebKitCocoa/pcmWithoutReportingColumns.db-wal: Added.
2021-03-26 Jonathan Bedard <jbedard@apple.com>
Unreviewed, reverting r275081.
Broke Apple Internal builds
Reverted changeset:
"Avoid calling `xcodebuild -showsdks` where possible."
https://bugs.webkit.org/show_bug.cgi?id=223727
https://commits.webkit.org/r275081
2021-03-26 Jean-Yves Avenard <jya@apple.com>
Fix NowPlayingInfoArtwork operator== logic.
https://bugs.webkit.org/show_bug.cgi?id=223730
<rdar://problem/75822687>
Reviewed by Youenn Fablet.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/NowPlayingInfoTests.cpp: Added.
(TestWebKitAPI::testEmptyArtwork):
(TestWebKitAPI::TEST):
2021-03-25 Cameron McCormack <heycam@apple.com>
Avoid calling `xcodebuild -showsdks` where possible.
https://bugs.webkit.org/show_bug.cgi?id=223727
Reviewed by Sam Weinig.
run-minibrowser needs to know what port it's running on, since that
affects the build directory to look in to find the MiniBrowser binary.
On macOS, webkitdirs.pm's determinePortName ends up running
`xcodebuild -showsdks` to see if the current SDK has an internal
variant available, but this is slow. But we don't need to know the
exact SDK name here, just the SDK platform name, to determine the
port name.
So we shuffle some code around to avoid calling `xcodebuild -showsdks`
where we can. This reduces the time spent in run-minibrowser before
MiniBrowser is launched (crudely measured with `time run-minibrowser
--help`) from 2s to 0.6s on this machine.
* Scripts/webkitdirs.pm:
(readXcodeUserDefault):
(determineArchitecture):
(argumentsForConfiguration):
(availableXcodeSDKs):
(isValidXcodeSDKPlatformName):
(determineXcodeSDKPlatformName):
(determineXcodeSDK):
(xcodeSDKPlatformName):
(determinePortName):
2021-03-25 Alex Christensen <achristensen@webkit.org>
Allow WKContentRuleList to block only in frames or only in main frame
https://bugs.webkit.org/show_bug.cgi?id=219001
Reviewed by Ben Poulain.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
2021-03-25 Wenson Hsieh <wenson_hsieh@apple.com>
It should be possible to drag images with overlay content
https://bugs.webkit.org/show_bug.cgi?id=223766
<rdar://problem/75856030>
Reviewed by Tim Horton.
Add an API test to verify that the top part of the image (with an overlay) doesn't trigger a `dragstart` when
dragged, but the bottom part of the image does.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/simple-image-overlay.html: Added.
Add a test page that installs an image overlay for testing purposes (assuming that the web view injects the
global `internals` object).
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
* TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator containsDraggedType:]):
Add a helper method to return whether or not the simulated drag resulted in the given type being written to the
"drag pasteboard" (in the case of iOS, this just means any of the source item providers).
* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
Make a minor adjustment to ensure that the drag pasteboard is cleared out before starting a simulated drag.
(-[DragAndDropSimulator containsDraggedType:]):
2021-03-25 Andres Gonzalez <andresg_22@apple.com>
AX: Consider implementing @aria-details.
https://bugs.webkit.org/show_bug.cgi?id=165842
rdar://30725491
Reviewed by Chris Fleizach.
Added AccessibilityUIElement::detailsElements.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::detailsElements const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::detailsElements const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::detailsElements const):
2021-03-25 John Wilander <wilander@apple.com>
PCM: Rename attributeOn to attributionDestination and change the IDL data type of attributionSourceId to unsigned long
https://bugs.webkit.org/show_bug.cgi?id=223661
<rdar://problem/75762075>
Reviewed by Brent Fulgham.
The PR review of the update of the PCM spec lead WebKit, Mozilla, and Google to decide on two changes:
1. Rename attributeOn to attributionDestination
2. Change the IDL data type of attributionSourceId from DOMString to unsigned long
The spec change can be seen in this commit:
https://github.com/privacycg/private-click-measurement/pull/75/commits/8623b5df5e899e6652bc5b00313585f7eeafa797
* TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPrivateClickMeasurementAttributionReportURLsForTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setPrivateClickMeasurementAttributionReportURLsForTesting):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2021-03-25 Alex Christensen <achristensen@webkit.org>
WKContentRuleList first-party should include other subdomains of the current registrable domain
https://bugs.webkit.org/show_bug.cgi?id=223728
Reviewed by John Wilander.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
2021-03-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] JSC crashes if a function expects a parameter but doesn't receive any
https://bugs.webkit.org/show_bug.cgi?id=223646
Reviewed by Adrian Perez de Castro.
Add test cases.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(valueToString):
(testJSCFunction):
(testJSCClass):
2021-03-25 Aakash Jain <aakash_jain@apple.com>
[ews] Add unit-test to ensure that config.json doesn't have tab characters
https://bugs.webkit.org/show_bug.cgi?id=223440
Reviewed by Jonathan Bedard.
* CISupport/build-webkit-org/loadConfig_unittest.py:
(ConfigDotJSONTest.test_tab_character): Unit-test to ensure that there are no tab characters.
* CISupport/ews-build/config.json:
* CISupport/ews-build/loadConfig_unittest.py:
(ConfigDotJSONTest.test_tab_character):
2021-03-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r274826 and r274968.
https://bugs.webkit.org/show_bug.cgi?id=223746
Added broken layout test
Reverted changesets:
"AX: textRectsFromMarkers always fails"
https://bugs.webkit.org/show_bug.cgi?id=223556
https://trac.webkit.org/changeset/274826
"AX: Add functions rectsForTextMarkerRange for testing"
https://bugs.webkit.org/show_bug.cgi?id=223705
https://trac.webkit.org/changeset/274968
2021-03-24 Jonathan Bedard <jbedard@apple.com>
Autoinstalling keyring-7.3.1 is failing with Python 2
https://bugs.webkit.org/show_bug.cgi?id=223677
<rdar://problem/75800504>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, add setuptools_scm.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Always install setuptools_scm.
2021-03-24 Chris Fleizach <cfleizach@apple.com>
AX: Add functions rectsForTextMarkerRange for testing
https://bugs.webkit.org/show_bug.cgi?id=223705
<rdar://problem/75797361>
Reviewed by Zalan Bujtas.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::rectsForTextMarkerRange):
2021-03-24 Chris Dumez <cdumez@apple.com>
Address undefined behavior found by UBSan in StringToIntegerConversion.h
https://bugs.webkit.org/show_bug.cgi?id=223694
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):
2021-03-24 Kate Cheney <katherine_cheney@apple.com>
Followup to https://trac.webkit.org/changeset/274928/webkit
Unreviewed build fix.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
2021-03-24 Brent Fulgham <bfulgham@apple.com>
[Cocoa] Revise loadSimulatedRequest API with final review comments (223657)
https://bugs.webkit.org/show_bug.cgi?id=223657
<rdar://75757727>
Reviewed by Alex Christensen.
Update tests to use the final API, while still exercising the existing API.
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:
(TEST):
2021-03-23 Kate Cheney <katherine_cheney@apple.com>
Service worker loads are not marked as app-bound
https://bugs.webkit.org/show_bug.cgi?id=222635
<rdar://problem/74395950>
API test coverage for fetched and synthetic responses to make sure
they are marked as app-bound or not based on the main request.
Reviewed by Youenn Fablet.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
2021-03-23 Chris Dumez <cdumez@apple.com>
DerivedSources/WebKitTestRunner/JSAccessibilityUIElement.cpp:802:72: runtime error: -1 is outside the range of representable values of type 'unsigned int'
https://bugs.webkit.org/show_bug.cgi?id=223650
Reviewed by Darin Adler.
The bindings generator used by WebKitTestRunner was converting all numbers into double and
passing that to the implementation, no matter the IDL type (e.g. unsigned long). As a result,
there may be a type mismatch between the value the bindings are passing and the implementation
function getting called. This implicit conversion has undefined behavior in some cases and it
triggers UBSan errors. To address the issue, we now call clampTo<NativeNumberType>() on the
double before passing it to the implementation. This makes sure we pass the implementation
the type it expects and that the conversion is well-defined.
* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(_generateImplementationFile):
(_nativeNumericType):
(_platformType):
(_platformTypeConstructor):
(_platformTypeVariableDeclaration):
2021-03-23 Jiewen Tan <jiewen_tan@apple.com>
Provide a way to specify platform vs security key when requesting an assertion in the SPI
https://bugs.webkit.org/show_bug.cgi?id=223547
<rdar://74034746>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):
Adds the test case.
2021-03-23 Chris Dumez <cdumez@apple.com>
wtf/text/IntegerToStringConversion.h:54:104: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
https://bugs.webkit.org/show_bug.cgi?id=223614
Reviewed by Darin Adler.
Add API test coverage.
* TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
(TestWebKitAPI::TEST):
2021-03-23 Jonathan Bedard <jbedard@apple.com>
[webkitcorepy] Print output of setup.py when install fails
https://bugs.webkit.org/show_bug.cgi?id=223589
<rdar://problem/75700606>
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.install): Print stdout and stderr of setup.py when install fails.
2021-03-22 Cameron McCormack <heycam@apple.com>
Fix ordering of my email addresses in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=223622
The first must be the email used for scm access.
Reviewed by Ryosuke Niwa.
* Scripts/webkitpy/common/config/contributors.json:
2021-03-22 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Base GitHub mock links on provided remote
https://bugs.webkit.org/show_bug.cgi?id=223611
<rdar://problem/75713760>
Reviewed by Dewei Zhu.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.__init__): Standardize mock GitHub path.
(GitHub._parents_of_request): Base link path on GitHub remote.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGitHub):
2021-03-22 Devin Rousso <drousso@apple.com>
Remove unused JS and CSS files of media controls
https://bugs.webkit.org/show_bug.cgi?id=214955
<rdar://problem/66604040>
Reviewed by Eric Carlson.
Cocoa platforms are already using modern media controls so there's no reason to keep the old
media controls resources/logic around any longer. It just wastes space.
The non-iOS Apple controls must be kept though as they are still used on Windows.
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformSpecificFeatureDefaultsForTest const):
Replace `ModernMediaControlsEnabled` setting with `ENABLE_MODERN_MEDIA_CONTROLS` build flag.
2021-03-22 Cameron McCormack <heycam@apple.com>
Restore my committer status.
https://bugs.webkit.org/show_bug.cgi?id=223600
Per email sent to webkit-committers@.
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/config/contributors.json:
2021-03-22 Rob Buis <rbuis@igalia.com>
[css-contain] Parse CSS contain property
https://bugs.webkit.org/show_bug.cgi?id=223252
Reviewed by Darin Adler.
Add support for disabling aspect-ratio in win wk1.
* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
2021-03-22 Jonathan Bedard <jbedard@apple.com>
[webkitscmpy] Allow user to force canonicalization for a specific set of commits
https://bugs.webkit.org/show_bug.cgi?id=223579
<rdar://problem/75693154>
Reviewed by Aakash Jain.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/__init__.py:
(Canonicalize.parser): Add --number argument.
(Canonicalize.main): Use --number to set the number of commits to be canonicalized.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
(TestCanonicalize.test_number):
2021-03-22 Tyler Wilcock <twilco.o@protonmail.com>
AppleWin can't start due to "Failed to determine path to AAS directory." because iTunes changed the registry key
https://bugs.webkit.org/show_bug.cgi?id=219015
Reviewed by Alex Christensen.
It appears that iTunes no longer sets the Apple Application Support
registry entry. Fallback to trying to find the iTunes installation
directory if the AAS directory is not present.
* win/DLLLauncher/DLLLauncherMain.cpp:
(iTunesDirectory): Added.
(modifyPath):
2021-03-19 Darin Adler <darin@apple.com>
[Cocoa] Make it possible to release a WKWebView on a non-main thread without a crash due to WKScriptMessage race
https://bugs.webkit.org/show_bug.cgi?id=222336
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
Use _close instead of WKWebView deallocation to trigger a call to stopURLSchemeTask,
since such delegate methods will intentionally no longer be delivered if triggered by deallocation.
2021-03-22 Youenn Fablet <youenn@apple.com>
Implement RTCDataChannel transfer out of process
https://bugs.webkit.org/show_bug.cgi?id=223443
Reviewed by Eric Carlson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2021-03-22 Youenn Fablet <youenn@apple.com>
Remove some spurious logging lines appearing in WebRTC tests
https://bugs.webkit.org/show_bug.cgi?id=223502
Reviewed by Alex Christensen.
* Scripts/webkitpy/port/mac.py:
(MacPort.logging_patterns_to_strip):
2021-03-22 Jean-Yves Avenard <jya@apple.com>
Add Jean-Yves Avenard to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=223555
Reviewed by Eric Carlson.
* Scripts/webkitpy/common/config/contributors.json:
2021-03-19 BJ Burg <bburg@apple.com>
Update filter-build-webkit
https://bugs.webkit.org/show_bug.cgi?id=223528
Reviewed by Simon Fraser.
- Remove a bunch of informational messages that clog up output.
- Remove some linker/loader warnings that are non-actionable.
- Generalize a few existing filters to work with more targets.
- Remove super-noisy and meaningless device preparation warnings.
* Scripts/filter-build-webkit:
(shouldIgnoreLine):
2021-03-19 Kimmo Kinnunen <kkinnunen@apple.com>
update-webgl-conformance-tests script should use webgl/1.0.x and webgl/2.0.y directories
https://bugs.webkit.org/show_bug.cgi?id=223516
Reviewed by Kenneth Russell.
Import the tests to 1.0.x/2.0.y instead of 1.0.4/2.0.1 since we track the development
versions, not the upcoming snapshots.
* Scripts/webkitpy/update_webgl_conformance_tests_lib/main.py:
(_generate_webkit_webgl_tests):
(main):
2021-03-19 Youenn Fablet <youenn@apple.com>
Custom scheme handled origins should be considered secure
https://bugs.webkit.org/show_bug.cgi?id=223423
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
(-[URLSchemeHandlerMessageHandler userContentController:didReceiveScriptMessage:]):
2021-03-19 Aakash Jain <aakash_jain@apple.com>
Fix broken contributors.json after r274720
Unreviewed infrastructure fix.
* Scripts/webkitpy/common/config/contributors.json:
2021-03-19 Angelos Oikonomopoulos <angelos@igalia.com>
Add myself as to contributors.json as a committer.
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-03-19 Caio Lima <ticaiolima@gmail.com>
Update Caio's status to reviewer
https://bugs.webkit.org/show_bug.cgi?id=223509
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
2021-03-19 Youenn Fablet <youenn@apple.com>
Disable SFrame compatibility mode for audio senders and receivers
https://bugs.webkit.org/show_bug.cgi?id=223391
<rdar://problem/75538500>
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebCore/RTCRtpSFrameTransformerTests.cpp:
(TestWebKitAPI::createVideoTransformer):
(TestWebKitAPI::createAudioTransformer):
(TestWebKitAPI::TEST):
== Rolled over to ChangeLog-2021-03-18 ==