Resource Load Statistics: Clear web processes' state on history removal
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 17:18:24 +0000 (17:18 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 17:18:24 +0000 (17:18 +0000)
commitafe939db10af3efd7e5db0e3a80c1c4ecde61c28
treed7879161f8fe934d0de43db2a48efc61b35c8fb9
parentf223a66b9d2c974b16e808b76d095a7b018f98f8
Resource Load Statistics: Clear web processes' state on history removal
https://bugs.webkit.org/show_bug.cgi?id=175271
<rdar://problem/33756560>

Reviewed by Chris Dumez.

Source/WebKit:

https://bugs.webkit.org/show_bug.cgi?id=175090 introduced state
in the web process and that state needs to be cleared when the
UI process' statistics are cleared as part of history removal.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::clearResourceLoadStatistics):
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses):
* UIProcess/WebsiteData/WebsiteDataStore.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearResourceLoadStatistics):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Tools:

Test infrastructure for asynchronous tests of website data
removal for _WKWebsiteDataTypeResourceLoadStatistics.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval):
(WTR::TestRunner::statisticsCallClearThroughWebsiteDataRemovalCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval):

LayoutTests:

* http/tests/loading/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/user-interaction-reported-after-website-data-removal.html: Added.
* platform/mac-wk2/TestExpectations:
    user-interaction-reported-after-website-data-removal.html marked as [ Pass ].

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/loading/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/loading/resourceLoadStatistics/user-interaction-reported-after-website-data-removal.html [new file with mode: 0644]
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/WebProcess.h
Source/WebKit/WebProcess/WebProcess.messages.in
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestInvocation.cpp
Tools/WebKitTestRunner/TestInvocation.h
Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm