-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change behavior of webNavigation.getFrame/getAllFrames to better matc…
…h spec https://bugs.webkit.org/show_bug.cgi?id=266305 rdar://118340990 Reviewed by Timothy Hatcher. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation/getFrame states: "If the specified tab or frame ID could not be found, or some other error occurs, the promise will be rejected with an error message." Before this change, we weren't doing that - we were just vending an empty object. This PR also adds a couple tests for this behavior. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIWebNavigationCocoa.mm: (WebKit::WebExtensionContext::webNavigationGetFrame): (WebKit::WebExtensionContext::webNavigationGetAllFrames): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: * Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in: * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIWebNavigationCocoa.mm: (WebKit::WebExtensionAPIWebNavigation::getAllFrames): (WebKit::WebExtensionAPIWebNavigation::getFrame): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIWebNavigation.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/271961@main
- Loading branch information
1 parent
afc57f4
commit b14b70f
Showing
5 changed files
with
78 additions
and
17 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