Skip to content

Commit

Permalink
REGRESSION (278619@main): [iOS] TestWebKitAPI.WKWebExtensionAPIComman…
Browse files Browse the repository at this point in the history
…ds.PerformKeyCommand is timing out

rdar://127902100
https://bugs.webkit.org/show_bug.cgi?id=274022

Reviewed by Brian Weinstein.

Updated the unit test for performing key command for web extensions.
The key command will never be a firstResponder so it is incorrect
to try to fire the keyCommand object directly. Instead, do what
the client firstResponder would do: invoke -performCommandForKeyCommand:
on the context object.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPICommands.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPICommands, PerformKeyCommand)):

Canonical link: https://commits.webkit.org/278721@main
  • Loading branch information
eddydas committed May 14, 2024
1 parent cf3a684 commit c44af01
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
@"test-command": @{
@"suggested_key": @{
@"default": @"",
@"default": @"Command+Alt+Z",
@"mac": @"Command+Alt+Z"
},
@"description": @"Test Command"
Expand Down Expand Up @@ -215,7 +215,7 @@

auto *command = filteredCommands.firstObject;

[command.keyCommand performWithSender:nil target:UIApplication.sharedApplication];
[manager.get().context performCommandForKeyCommand:command.keyCommand];

[manager run];
}
Expand Down

0 comments on commit c44af01

Please sign in to comment.