[webkit-changes] [WebKit/WebKit] 9368e4: Remove TestRunner.installStatisticsDidModifyDataRe...

Alex Christensen noreply at github.com
Wed Aug 21 13:53:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9368e4b24a798fb2bf5beddc5114273c81ea1247
      https://github.com/WebKit/WebKit/commit/9368e4b24a798fb2bf5beddc5114273c81ea1247
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html
    M LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html
    M LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html
    M LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html
    M LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html
    M Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
    M Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
    M Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
    M Source/WebKit/NetworkProcess/NetworkProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkProcess.h
    M Source/WebKit/NetworkProcess/NetworkSession.cpp
    M Source/WebKit/NetworkProcess/NetworkSession.h
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.h
    M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

  Log Message:
  -----------
  Remove TestRunner.installStatisticsDidModifyDataRecordsCallback
https://bugs.webkit.org/show_bug.cgi?id=278465

Reviewed by Charlie Wolfe.

This reduces state in the web content process and makes the tests work better with site isolation
because we no longer use cacheTestRunnerCallback.

All the tests that use installStatisticsDidModifyDataRecordsCallback also call
await testRunner.statisticsProcessStatisticsAndDataRecords()
which is sufficient waiting for the didModifyDataRecords to have happened except in one test,
http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html
where we need the keyDown to also have been processed, which we can accomplish by polling
and checking if the 'a' key's effects have been observed.

Since we are removing the installStatisticsDidModifyDataRecordsCallback call, we can also remove
some infrastructure in WebKit that existed only to make that work.  We also remove the layering
violation where WebKit.framework had code that sent a "WebsiteDataDeletionForRegistrableDomainsFinished"
message that was only intended for WebKitTestRunner, and I remove a few places where we pass around
a now-unneeded parameter bool shouldNotifyPage because we should never notify the page, as well
as a now-unused message NotifyWebsiteDataDeletionForRegistrableDomainsFinished.

* LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
* LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:
* LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
* LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
* LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
* Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords):
* Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::deleteAndRestrictWebsiteDataForRegistrableDomains):
* Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::deleteCookiesForTesting):
* Source/WebKit/NetworkProcess/NetworkProcess.h:
* Source/WebKit/NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::deleteAndRestrictWebsiteDataForRegistrableDomains):
* Source/WebKit/NetworkProcess/NetworkSession.h:
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::notifyWebsiteDataDeletionForRegistrableDomainsFinished): Deleted.
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::notifyWebsiteDataDeletionForRegistrableDomainsFinished): Deleted.
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::installStatisticsDidModifyDataRecordsCallback): Deleted.
(WTR::TestRunner::statisticsDidModifyDataRecordsCallback): Deleted.
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list