-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct tab and frame identifiers in webNavigation events
https://bugs.webkit.org/show_bug.cgi?id=264283 rdar://102820594 Reviewed by Timothy Hatcher. With this change, we now pass WebExtensionTabIdentifiers and WebExtensionFrameIdentifiers to the webNavigation event handlers. With this change, we can get rid of the test function to fire a webNavigation event, and actually use a local HTTP server to load content and verify that webNavigation events are being fired. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerCocoa.mm: (WebKit::WebExtensionController::didStartProvisionalLoadForFrame): Continue early if we don't have a tab, and pass the tab's identifier. (WebKit::WebExtensionController::didCommitLoadForFrame): Ditto. (WebKit::WebExtensionController::didFinishLoadForFrame): Ditto. (WebKit::WebExtensionController::didFailLoadForFrame): Ditto. * Source/WebKit/UIProcess/Extensions/WebExtensionController.h: * Source/WebKit/UIProcess/Extensions/WebExtensionController.messages.in: * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPITestCocoa.mm: (WebKit::WebExtensionAPITest::testWebNavigationEvent): Deleted. (WebKit::WebExtensionAPITest::fireTestWebNavigationEvent): Deleted. * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIWebNavigationCocoa.mm: (WebKit::WebExtensionContextProxy::dispatchWebNavigationEvent): Update for the correct identifiers. * Source/WebKit/WebProcess/Extensions/API/WebExtensionAPITest.h: * Source/WebKit/WebProcess/Extensions/Cocoa/WebExtensionControllerProxyCocoa.mm: (WebKit::WebExtensionControllerProxy::didStartProvisionalLoadForFrame): Pass a WebExtensionFrameIdentifier. (WebKit::WebExtensionControllerProxy::didCommitLoadForFrame): Ditto. (WebKit::WebExtensionControllerProxy::didFinishLoadForFrame): Ditto. (WebKit::WebExtensionControllerProxy::didFailLoadForFrame): Ditto. * Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPITest.idl: * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.h: * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.messages.in: * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIWebNavigation.mm: (TestWebKitAPI::TEST): Update the tests to use actual HTTP servers and remove any use of the test Web Navigation event code. Canonical link: https://commits.webkit.org/270297@main
- Loading branch information
1 parent
3805718
commit 7bd9ef4
Showing
11 changed files
with
109 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.