Changeset 258672 in webkit


Ignore:
Timestamp:
Mar 18, 2020 6:26:16 PM (4 years ago)
Author:
wilander@apple.com
Message:

WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its ephemeral counterpart when appropriate
https://bugs.webkit.org/show_bug.cgi?id=209245
<rdar://problem/60511121>

Reviewed by Chris Dumez.

Source/WebKit:

This change makes sure that WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener()
calls WebResourceLoadStatisticsStore::requestStorageAccessUnderOpenerEphemeral() for ephemeral
sessions.

Tests: http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html

http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html
http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):

Tools:

These changes to the TestRunner makes sure that

  • statisticsClearInMemoryAndPersistentStore()
  • statisticsClearInMemoryAndPersistentStoreModifiedSinceHours()

... use their own StatisticsDidClearInMemoryAndPersistentStoreCallbackID
and adds the infrastructure for that.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestRunner::statisticsCallClearInMemoryAndPersistentStoreCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore):

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

There are new tests added for the code change. The rest of these change are to better
align test cases with asynchronous TestRunner functions that landed in
https://trac.webkit.org/changeset/258566 and https://trac.webkit.org/changeset/258598.

While working on the new tests, I found a crasher which Chris Dumez fixed in
https://trac.webkit.org/changeset/258562, so there's a dependency on that change.

  • http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database.html:
  • http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker.html:
  • http/tests/resourceLoadStatistics/count-third-party-script-loads-database.html:
  • http/tests/resourceLoadStatistics/count-third-party-script-loads.html:
  • http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.php:
  • http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.php:
  • http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database.html:
  • http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script.html:
  • http/tests/resourceLoadStatistics/grandfathering-database.html:
  • http/tests/resourceLoadStatistics/grandfathering.html:
  • http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.php:
  • http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.php:
  • http/tests/storageAccess/deny-storage-access-under-opener-ephemeral-expected.txt: Added.
  • http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html: Added.
  • http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral-expected.txt: Added.
  • http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html: Added.
  • http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral-expected.txt: Added.
  • http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html: Added.
Location:
trunk
Files:
6 added
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r258669 r258672  
     12020-03-18  John Wilander  <wilander@apple.com>
     2
     3        WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its ephemeral counterpart when appropriate
     4        https://bugs.webkit.org/show_bug.cgi?id=209245
     5        <rdar://problem/60511121>
     6
     7        Reviewed by Chris Dumez.
     8
     9        There are new tests added for the code change. The rest of these change are to better
     10        align test cases with asynchronous TestRunner functions that landed in
     11        https://trac.webkit.org/changeset/258566 and https://trac.webkit.org/changeset/258598.
     12
     13        While working on the new tests, I found a crasher which Chris Dumez fixed in
     14        https://trac.webkit.org/changeset/258562, so there's a dependency on that change.
     15
     16        * http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html:
     17        * http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html:
     18        * http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database.html:
     19        * http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker.html:
     20        * http/tests/resourceLoadStatistics/count-third-party-script-loads-database.html:
     21        * http/tests/resourceLoadStatistics/count-third-party-script-loads.html:
     22        * http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.php:
     23        * http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.php:
     24        * http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database.html:
     25        * http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script.html:
     26        * http/tests/resourceLoadStatistics/grandfathering-database.html:
     27        * http/tests/resourceLoadStatistics/grandfathering.html:
     28        * http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.php:
     29        * http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.php:
     30        * http/tests/storageAccess/deny-storage-access-under-opener-ephemeral-expected.txt: Added.
     31        * http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html: Added.
     32        * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral-expected.txt: Added.
     33        * http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html: Added.
     34        * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral-expected.txt: Added.
     35        * http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html: Added.
     36
    1372020-03-18  Ryan Haddad  <ryanhaddad@apple.com>
    238
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html

    r252210 r258672  
    6969    if (document.location.host === partitionHost && document.location.hash == "" && window.testRunner && window.internals) {
    7070        testRunner.setUseITPDatabase(true);
     71        testRunner.waitUntilDone();
    7172        setEnableFeature(true, function() {
    72             testRunner.waitUntilDone();
    7373            testRunner.dumpChildFramesAsText();
    7474            document.location.hash = "step1";
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html

    r234440 r258672  
    6868
    6969    if (document.location.host === partitionHost && document.location.hash == "" && window.testRunner && window.internals) {
     70        testRunner.waitUntilDone();
    7071        setEnableFeature(true, function() {
    71             testRunner.waitUntilDone();
    7272            testRunner.dumpChildFramesAsText();
    7373            document.location.hash = "step1";
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database.html

    r252641 r258672  
    2727            case "":
    2828                if (window.testRunner && window.internals) {
     29                    testRunner.waitUntilDone();
    2930                    setEnableFeature(true, function() {
    3031                        testRunner.setUseITPDatabase(true);
    31                         testRunner.waitUntilDone();
    3232                        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    3333                        testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker.html

    r252641 r258672  
    2727            case "":
    2828                if (window.testRunner && window.internals) {
     29                    testRunner.waitUntilDone();
    2930                    setEnableFeature(true, function() {
    30                         testRunner.waitUntilDone();
    3131                        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    3232                        testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/count-third-party-script-loads-database.html

    r252641 r258672  
    2323            case "":
    2424                if (window.testRunner && window.internals) {
     25                    testRunner.waitUntilDone();
    2526                    setEnableFeature(true, function() {
    2627                        testRunner.setUseITPDatabase(true);
    27                         testRunner.waitUntilDone();
    2828                        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    2929                        testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/count-third-party-script-loads.html

    r252641 r258672  
    2323            case "":
    2424                if (window.testRunner && window.internals) {
     25                    testRunner.waitUntilDone();
    2526                    setEnableFeature(true, function() {
    26                         testRunner.waitUntilDone();
    2727                        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    2828                        testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.php

    r251402 r258672  
    5858    function runTest() {
    5959        switch (document.location.hash) {
     60            case "":
     61                if (document.location.origin !== prevalentOrigin)
     62                    testFailed("Test is not starting out on " + prevalentOrigin + ".");
     63
     64                testRunner.setUseITPDatabase(true);
     65                setEnableFeature(true, function () {
     66                    if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
     67                        testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
     68                    document.location.hash = "step1";
     69                    runTest();
     70                });
    6071            case "#step1":
    6172                setSessionCookie();
     
    97108        }
    98109    }
    99 
    100     if (document.location.hash === "") {
    101         if (document.location.origin !== prevalentOrigin)
    102             testFailed("Test is not starting out on " + prevalentOrigin + ".");
    103            
    104             testRunner.setUseITPDatabase(true);
    105         setEnableFeature(true, function () {
    106             if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
    107                 testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
    108             document.location.hash = "step1";
    109         });
    110     }
    111110</script>
    112111</body>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.php

    r251402 r258672  
    5858    function runTest() {
    5959        switch (document.location.hash) {
     60            case "":
     61                if (document.location.origin !== prevalentOrigin)
     62                    testFailed("Test is not starting out on " + prevalentOrigin + ".");
     63
     64                setEnableFeature(true, function () {
     65                    if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
     66                        testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
     67                    document.location.hash = "step1";
     68                    runTest();
     69                });
    6070            case "#step1":
    6171                setSessionCookie();
     
    97107        }
    98108    }
    99 
    100     if (document.location.hash === "") {
    101         if (document.location.origin !== prevalentOrigin)
    102             testFailed("Test is not starting out on " + prevalentOrigin + ".");
    103         setEnableFeature(true, function () {
    104             if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
    105                 testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
    106             document.location.hash = "step1";
    107         });
    108     }
    109109</script>
    110110</body>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database.html

    r252641 r258672  
    2323            case "":
    2424                if (window.testRunner && window.internals) {
     25                    testRunner.waitUntilDone();
    2526                    setEnableFeature(true, function() {
    2627                        testRunner.setUseITPDatabase(true);
    27                         testRunner.waitUntilDone();
    2828                        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    2929                        testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script.html

    r252641 r258672  
    2323            case "":
    2424                if (window.testRunner && window.internals) {
     25                    testRunner.waitUntilDone();
    2526                    setEnableFeature(true, function() {
    26                         testRunner.waitUntilDone();
    2727                        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    2828                        testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/grandfathering-database.html

    r252210 r258672  
    101101    if (document.location.hash === "" && window.testRunner && window.internals) {
    102102        testRunner.setUseITPDatabase(true);
     103        testRunner.waitUntilDone();
    103104        setEnableFeature(true, function() {
    104105            testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
    105106            testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
    106107
    107             testRunner.waitUntilDone();
    108108            testRunner.dumpChildFramesAsText();
    109109            document.location.hash = "step1";
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/grandfathering.html

    r234440 r258672  
    9999
    100100    if (document.location.hash === "" && window.testRunner && window.internals) {
     101        testRunner.waitUntilDone();
    101102        setEnableFeature(true, function() {
    102103            testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
    103104            testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
    104105
    105             testRunner.waitUntilDone();
    106106            testRunner.dumpChildFramesAsText();
    107107            document.location.hash = "step1";
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.php

    r251402 r258672  
    5858    function runTest() {
    5959        switch (document.location.hash) {
     60            case "":
     61                if (document.location.origin !== prevalentOrigin)
     62                    testFailed("Test is not starting out on " + prevalentOrigin + ".");
     63                testRunner.setUseITPDatabase(true);
     64                setEnableFeature(true, function () {
     65                    if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
     66                        testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
     67                    document.location.hash = "step1";
     68                    runTest();
     69                });
     70                break;
    6071            case "#step1":
    6172                testRunner.setStatisticsHasHadUserInteraction(prevalentOrigin, true, function() {
     
    99110        }
    100111    }
    101 
    102     if (document.location.hash === "") {
    103         if (document.location.origin !== prevalentOrigin)
    104             testFailed("Test is not starting out on " + prevalentOrigin + ".");
    105         testRunner.setUseITPDatabase(true);
    106         setEnableFeature(true, function () {
    107             if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
    108                 testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
    109             document.location.hash = "step1";
    110         });
    111     }
    112112</script>
    113113</body>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.php

    r251402 r258672  
    5858    function runTest() {
    5959        switch (document.location.hash) {
     60            case "":
     61                if (document.location.origin !== prevalentOrigin)
     62                    testFailed("Test is not starting out on " + prevalentOrigin + ".");
     63                setEnableFeature(true, function () {
     64                    if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
     65                        testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
     66                    document.location.hash = "step1";
     67                    runTest();
     68                });
     69                break;
    6070            case "#step1":
    6171                testRunner.setStatisticsHasHadUserInteraction(prevalentOrigin, true, function() {
     
    99109        }
    100110    }
    101 
    102     if (document.location.hash === "") {
    103         if (document.location.origin !== prevalentOrigin)
    104             testFailed("Test is not starting out on " + prevalentOrigin + ".");
    105         setEnableFeature(true, function () {
    106             if (testRunner.isStatisticsPrevalentResource(prevalentOrigin))
    107                 testFailed(prevalentOrigin + " was classified as prevalent resource before the test starts.");
    108             document.location.hash = "step1";
    109         });
    110     }
    111111</script>
    112112</body>
  • trunk/Source/WebKit/ChangeLog

    r258671 r258672  
     12020-03-18  John Wilander  <wilander@apple.com>
     2
     3        WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its ephemeral counterpart when appropriate
     4        https://bugs.webkit.org/show_bug.cgi?id=209245
     5        <rdar://problem/60511121>
     6
     7        Reviewed by Chris Dumez.
     8
     9        This change makes sure that WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener()
     10        calls WebResourceLoadStatisticsStore::requestStorageAccessUnderOpenerEphemeral() for ephemeral
     11        sessions.
     12
     13        Tests: http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html
     14               http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html
     15               http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html
     16
     17        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     18        (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):
     19
    1202020-03-18  Brent Fulgham  <bfulgham@apple.com>
    221
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r258448 r258672  
    485485    ASSERT(RunLoop::isMain());
    486486
     487    if (isEphemeral())
     488        return requestStorageAccessUnderOpenerEphemeral(WTFMove(domainInNeedOfStorageAccess), openerPageID, WTFMove(openerDomain));
     489
    487490    // It is safe to move the strings to the background queue without isolated copy here because they are r-value references
    488491    // coming from IPC. Strings which are safe to move to other threads as long as nobody on this thread holds a reference
  • trunk/Tools/ChangeLog

    r258659 r258672  
     12020-03-18  John Wilander  <wilander@apple.com>
     2
     3        WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its ephemeral counterpart when appropriate
     4        https://bugs.webkit.org/show_bug.cgi?id=209245
     5        <rdar://problem/60511121>
     6
     7        Reviewed by Chris Dumez.
     8
     9        These changes to the TestRunner makes sure that
     10        - statisticsClearInMemoryAndPersistentStore()
     11        - statisticsClearInMemoryAndPersistentStoreModifiedSinceHours()
     12        ... use their own StatisticsDidClearInMemoryAndPersistentStoreCallbackID
     13        and adds the infrastructure for that.
     14
     15        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     16        (WTR::InjectedBundle::didReceiveMessageToPage):
     17        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     18        (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
     19        (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
     20        (WTR::TestRunner::statisticsCallClearInMemoryAndPersistentStoreCallback):
     21        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     22        * WebKitTestRunner/TestController.cpp:
     23        (WTR::TestController::statisticsClearInMemoryAndPersistentStore):
     24        (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
     25        * WebKitTestRunner/TestInvocation.cpp:
     26        (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore):
     27        * WebKitTestRunner/TestInvocation.h:
     28
    1292020-03-18  Wenson Hsieh  <wenson_hsieh@apple.com>
    230
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r258421 r258672  
    328328    }
    329329
     330    if (WKStringIsEqualToUTF8CString(messageName, "CallDidClearStatisticsInMemoryAndPersistentStore")) {
     331        m_testRunner->statisticsCallClearInMemoryAndPersistentStoreCallback();
     332        return;
     333    }
     334
    330335    if (WKStringIsEqualToUTF8CString(messageName, "CallDidClearStatisticsThroughWebsiteDataRemoval")) {
    331336        m_testRunner->statisticsCallClearThroughWebsiteDataRemovalCallback();
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r258598 r258672  
    749749    StatisticsDidRunTelemetryCallbackID,
    750750    StatisticsDidClearThroughWebsiteDataRemovalCallbackID,
     751    StatisticsDidClearInMemoryAndPersistentStoreCallbackID,
    751752    StatisticsDidResetToConsistentStateCallbackID,
    752753    StatisticsDidSetBlockCookiesForHostCallbackID,
     
    21442145void TestRunner::statisticsClearInMemoryAndPersistentStore(JSValueRef callback)
    21452146{
    2146     cacheTestRunnerCallback(StatisticsDidClearThroughWebsiteDataRemovalCallbackID, callback);
     2147    cacheTestRunnerCallback(StatisticsDidClearInMemoryAndPersistentStoreCallbackID, callback);
    21472148
    21482149    WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("StatisticsClearInMemoryAndPersistentStore"));
     
    21522153void TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours, JSValueRef callback)
    21532154{
    2154     cacheTestRunnerCallback(StatisticsDidClearThroughWebsiteDataRemovalCallbackID, callback);
     2155    cacheTestRunnerCallback(StatisticsDidClearInMemoryAndPersistentStoreCallbackID, callback);
    21552156
    21562157    WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("StatisticsClearInMemoryAndPersistentStoreModifiedSinceHours"));
     
    22742275    callTestRunnerCallback(StatisticsDidSetFirstPartyWebsiteDataRemovalModeCallbackID);
    22752276    m_hasSetFirstPartyWebsiteDataRemovalModeCallback = false;
     2277}
     2278
     2279void TestRunner::statisticsCallClearInMemoryAndPersistentStoreCallback()
     2280{
     2281    callTestRunnerCallback(StatisticsDidClearInMemoryAndPersistentStoreCallbackID);
    22762282}
    22772283
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r258421 r258672  
    438438    void statisticsClearThroughWebsiteDataRemoval(JSValueRef callback);
    439439    void statisticsDeleteCookiesForHost(JSStringRef hostName, bool includeHttpOnlyCookies);
     440    void statisticsCallClearInMemoryAndPersistentStoreCallback();
    440441    void statisticsCallClearThroughWebsiteDataRemovalCallback();
    441442    bool isStatisticsHasLocalStorage(JSStringRef hostName);
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r258436 r258672  
    36323632    WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore(websiteDataStore(), &context, resourceStatisticsVoidResultCallback);
    36333633    runUntil(context.done, noTimeout);
    3634     m_currentInvocation->didClearStatisticsThroughWebsiteDataRemoval();
     3634    m_currentInvocation->didClearStatisticsInMemoryAndPersistentStore();
    36353635}
    36363636
     
    36403640    WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours(websiteDataStore(), hours, &context, resourceStatisticsVoidResultCallback);
    36413641    runUntil(context.done, noTimeout);
    3642     m_currentInvocation->didClearStatisticsThroughWebsiteDataRemoval();
     3642    m_currentInvocation->didClearStatisticsInMemoryAndPersistentStore();
    36433643}
    36443644
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r258598 r258672  
    18811881}
    18821882
     1883void TestInvocation::didClearStatisticsInMemoryAndPersistentStore()
     1884{
     1885    WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CallDidClearStatisticsInMemoryAndPersistentStore"));
     1886    WKPagePostMessageToInjectedBundle(TestController::singleton().mainWebView()->page(), messageName.get(), 0);
     1887}
     1888
    18831889void TestInvocation::didClearStatisticsThroughWebsiteDataRemoval()
    18841890{
  • trunk/Tools/WebKitTestRunner/TestInvocation.h

    r258421 r258672  
    7373    void notifyDownloadDone();
    7474
     75    void didClearStatisticsInMemoryAndPersistentStore();
    7576    void didClearStatisticsThroughWebsiteDataRemoval();
    7677    void didSetShouldDowngradeReferrer();
Note: See TracChangeset for help on using the changeset viewer.