Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 453783344f766c0d7498541a692c0e9a1951f5fc
      
https://github.com/WebKit/WebKit/commit/453783344f766c0d7498541a692c0e9a1951f5fc
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2024-04-15 (Mon, 15 Apr 2024)

  Changed paths:
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
    M Tools/WebKitTestRunner/TestController.cpp
    M Tools/WebKitTestRunner/TestController.h
    M Tools/WebKitTestRunner/TestInvocation.cpp
    M Tools/WebKitTestRunner/TestInvocation.h
    M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

  Log Message:
  -----------
  Expand use of WKBundlePagePostMessageWithAsyncReply in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=272593
rdar://126361971

Reviewed by Sihui Liu and Charlie Wolfe.

This makes tests work better with site isolation because the reply is sent to 
the
process that made the request, instead of always sending the reply to the main 
frame's process.

Most of this PR is just plumbing to get the call in the UI process, get the 
reply, send it
to the web process, and process it into a form that JS can receive in the web 
process.  I also
reduced duplicate implementations of TestController::getAllStorageAccessEntries.

I verified this works correctly by running the 1 test that uses 
getAllStorageAccessEntries:
http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html

* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::asyncReplyHandler):
(WTR::postMessageWithAsyncReply):
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::stringArrayToJS):
(WTR::TestRunner::getAllStorageAccessEntries):
(WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Deleted.
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPlatformWebView):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::didReceiveAsyncMessageFromInjectedBundle):
(WTR::getAllStorageAccessEntriesCallback):
(WTR::TestController::getAllStorageAccessEntries):
(WTR::GetAllStorageAccessEntriesCallbackContext::GetAllStorageAccessEntriesCallbackContext):
 Deleted.
* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveAllStorageAccessEntries): Deleted.
* Tools/WebKitTestRunner/TestInvocation.h:
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::getAllStorageAccessEntries): Deleted.

Canonical link: https://commits.webkit.org/277505@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to