Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 185980ffc4448a148b4cfb6644cb32a6e659f03e
https://github.com/WebKit/WebKit/commit/185980ffc4448a148b4cfb6644cb32a6e659f03e
Author: Elijah Sawyers <[email protected]>
Date: 2025-03-14 (Fri, 14 Mar 2025)
Changed paths:
M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPITestCocoa.mm
M Source/WebKit/WebProcess/Extensions/API/WebExtensionAPITest.h
M Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPITest.idl
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPITest.mm
Log Message:
-----------
Implement browser.test.runTests so that it can be used in the web platform
tests
https://bugs.webkit.org/show_bug.cgi?id=289747
rdar://146997451
Reviewed by Timothy Hatcher.
This patch implements runTests() on the test namespace, which is intented to be
used in the web platform tests for web extensions.
runTests() takes in an array of functions and returns a promise. All of the
functions are executed in order, and if any of them fail, the promise that was
returned is rejected; otherwise, the promise is resolved.
To actually implement this was more or less a light wrapper around addTest(),
which was previously added in 5ca13e0.
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPITestCocoa.mm:
(WebKit::WebExtensionAPITest::addTest):
(WebKit::WebExtensionAPITest::runTests):
Abstract out common logic of add test into a helper method, and have the
original add test method and the new run test method call it.
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPITest.h:
Add the run test method to the header, and add the private helper add test
method.
* Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPITest.idl:
Define the run rest method in the .idl file.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPITest.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPITest, RunAnonymousTests)):
(TestWebKitAPI::TEST(WKWebExtensionAPITest, RunTestsThatPass)):
(TestWebKitAPI::TEST(WKWebExtensionAPITest, RunTestsWithTestThatFails)):
(TestWebKitAPI::TEST(WKWebExtensionAPITest, RunTestsWithAsyncTestThatFails)):
Write new tests to validate the API.
Canonical link: https://commits.webkit.org/292164@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes