⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282711 in webkit


Ignore:
Timestamp:
Sep 17, 2021, 4:46:14 PM (5 years ago)
Author:
Kate Cheney
Message:

Remove unnecessary ITP memory store code
​https://bugs.webkit.org/show_bug.cgi?id=229512
<rdar://problem/82644309>

Reviewed by John Wilander.

Source/WebKit:

No new tests. Confirmed by existing tests.

Remove ITP Memory store. This is the first part of a two part operation,
which removes the ResourceLoadStatisticsMemoryStore class. The next
step will be reducing ResourceLoadStatisticsStore and
ResourceLoadStatisticsDatabaseStore to one single ResourceLoadStatisticsStore class.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore): Deleted.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: Removed.
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):
Deleted an extra memory store test leftover from when we still had
a functioning memory store. Now it is just a duplicate of the database
test, so we can remove it.

Location:
trunk
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r282705 r282711  
     12021-09-17  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        Remove unnecessary ITP memory store code
     4        https://bugs.webkit.org/show_bug.cgi?id=229512
     5        <rdar://problem/82644309>
     6
     7        Reviewed by John Wilander.
     8
     9        No new tests. Confirmed by existing tests.
     10
     11        Remove ITP Memory store. This is the first part of a two part operation,
     12        which removes the ResourceLoadStatisticsMemoryStore class. The next
     13        step will be reducing ResourceLoadStatisticsStore and
     14        ResourceLoadStatisticsDatabaseStore to one single ResourceLoadStatisticsStore class.
     15
     16        * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
     17        (WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore): Deleted.
     18        * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
     19        * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: Removed.
     20        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
     21        (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
     22        * Sources.txt:
     23        * WebKit.xcodeproj/project.pbxproj:
     24
    1252021-09-17  Chris Dumez  <cdumez@apple.com>
    226
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp

    r282429 r282711  
    3535#include "PrivateClickMeasurementManager.h"
    3636#include "PrivateClickMeasurementManagerProxy.h"
    37 #include "ResourceLoadStatisticsMemoryStore.h"
    3837#include "StorageAccessStatus.h"
    3938#include "WebProcessProxy.h"
    … …  
    925924}
    926925
    927 void ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore(const ResourceLoadStatisticsMemoryStore& memoryStore)
    928 {
    929     ASSERT(!RunLoop::isMain());
    930 
    931     if (!isEmpty())
    932         return;
    933 
    934     auto transactionScope = beginTransactionIfNecessary();
    935 
    936     auto& statisticsMap = memoryStore.data();
    937     for (const auto& statistic : statisticsMap.values()) {
    938         auto result = insertObservedDomain(statistic);
    939         if (!result) {
    940             ITP_RELEASE_LOG_ERROR(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore insertObservedDomain failed to complete, error message: %" PRIVATE_LOG_STRING, this, m_database.lastErrorMsg());
    941             ASSERT_NOT_REACHED();
    942             return;
    943         }
    944     }
    945 
    946     // Make a separate pass for inter-domain relationships so we
    947     // can refer to the ObservedDomain table entries
    948     for (auto& statistic : statisticsMap.values())
    949         insertDomainRelationships(statistic);
    950 }
    951 
    952926void ResourceLoadStatisticsDatabaseStore::merge(WebCore::SQLiteStatement* current, const ResourceLoadStatistics& other)
    953927{
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h

    r282429 r282711  
    4949static constexpr std::array<unsigned, numberOfBucketsPerStatistic> bucketSizes {{ 1, 3, 10, 50, 100 }};
    5050
    51 class ResourceLoadStatisticsMemoryStore;
    52 
    5351typedef std::pair<String, std::optional<String>> TableAndIndexPair;
    5452
    … …  
    5957    ~ResourceLoadStatisticsDatabaseStore();
    6058
    61     void populateFromMemoryStore(const ResourceLoadStatisticsMemoryStore&);
    6259    void mergeStatistics(Vector<ResourceLoadStatistics>&&) override;
    6360    void clear(CompletionHandler<void()>&&) override;
  • trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp

    r282429 r282711  
    3636#include "PrivateClickMeasurementManager.h"
    3737#include "ResourceLoadStatisticsDatabaseStore.h"
    38 #include "ResourceLoadStatisticsMemoryStore.h"
    3938#include "ShouldGrandfatherStatistics.h"
    4039#include "StorageAccessStatus.h"
    … …  
    167166            m_statisticsStore = makeUnique<ResourceLoadStatisticsDatabaseStore>(*this, m_statisticsQueue, shouldIncludeLocalhost, resourceLoadStatisticsDirectory, sessionID);
    168167
    169             auto memoryStore = makeUnique<ResourceLoadStatisticsMemoryStore>(*this, m_statisticsQueue, shouldIncludeLocalhost);
    170             downcast<ResourceLoadStatisticsDatabaseStore>(*m_statisticsStore.get()).populateFromMemoryStore(*memoryStore);
    171 
    172168            auto legacyPlistFilePath = FileSystem::pathByAppendingComponent(resourceLoadStatisticsDirectory, "full_browsing_session_resourceLog.plist");
    173169            if (FileSystem::fileExists(legacyPlistFilePath))
  • trunk/Source/WebKit/Sources.txt

    r282230 r282711  
    8484
    8585NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp
    86 NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
    8786NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
    8887
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r282446 r282711  
    13491349                7AF236211E79A40800438A05 /* WebErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF2361F1E79A3D800438A05 /* WebErrors.h */; };
    13501350                7AFBD36321E50F39005DBACB /* WebResourceLoadStatisticsStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFBD36221E50F39005DBACB /* WebResourceLoadStatisticsStore.h */; };
    1351                 7AFBD36721E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFBD36521E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h */; };
    13521351                7AFBD36F21E546F8005DBACB /* PersistencyUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFBD36D21E546E3005DBACB /* PersistencyUtils.h */; };
    13531352                7B1DB26625668CE1000E26BC /* ArrayReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1DB26525668CE0000E26BC /* ArrayReference.h */; };
    … …  
    46954694                7AF236221E79A43100438A05 /* WebErrorsCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebErrorsCocoa.mm; sourceTree = "<group>"; };
    46964695                7AFBD36221E50F39005DBACB /* WebResourceLoadStatisticsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebResourceLoadStatisticsStore.h; path = Classifier/WebResourceLoadStatisticsStore.h; sourceTree = "<group>"; };
    4697                 7AFBD36421E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ResourceLoadStatisticsMemoryStore.cpp; path = Classifier/ResourceLoadStatisticsMemoryStore.cpp; sourceTree = "<group>"; };
    4698                 7AFBD36521E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResourceLoadStatisticsMemoryStore.h; path = Classifier/ResourceLoadStatisticsMemoryStore.h; sourceTree = "<group>"; };
    46994696                7AFBD36D21E546E3005DBACB /* PersistencyUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PersistencyUtils.h; sourceTree = "<group>"; };
    47004697                7AFBD36E21E546E3005DBACB /* PersistencyUtils.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PersistencyUtils.cpp; sourceTree = "<group>"; };
    … …  
    94839480                                7A0D7862220791ED00EBCF54 /* ResourceLoadStatisticsDatabaseStore.cpp */,
    94849481                                7A0D7861220791EC00EBCF54 /* ResourceLoadStatisticsDatabaseStore.h */,
    9485                                 7AFBD36421E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.cpp */,
    9486                                 7AFBD36521E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h */,
    94879482                                7ACE82E8221CAE07000DA94C /* ResourceLoadStatisticsStore.cpp */,
    94889483                                7ACE82E7221CAE06000DA94C /* ResourceLoadStatisticsStore.h */,
    … …  
    1250812503                                6BE969CD1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h in Headers */,
    1250912504                                6BE969CB1E54D4CF008B7483 /* ResourceLoadStatisticsClassifierCocoa.h in Headers */,
    12510                                 7AFBD36721E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h in Headers */,
    1251112505                                1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */,
    1251212506                                410482CE1DDD324F00F006D0 /* RTCNetwork.h in Headers */,
  • trunk/Tools/ChangeLog

    r282705 r282711  
     12021-09-17  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        Remove unnecessary ITP memory store code
     4        https://bugs.webkit.org/show_bug.cgi?id=229512
     5        <rdar://problem/82644309>
     6
     7        Reviewed by John Wilander.
     8
     9        * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
     10        (TEST):
     11        Deleted an extra memory store test leftover from when we still had
     12        a functioning memory store. Now it is just a duplicate of the database
     13        test, so we can remove it.
     14
    1152021-09-17  Alex Christensen  <achristensen@webkit.org>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm

    r282034 r282711  
    8181}
    8282
    83 TEST(ResourceLoadStatistics, GrandfatherCallbackDatabase)
     83TEST(ResourceLoadStatistics, GrandfatherCallback)
    8484{
    8585    auto *dataStore = [WKWebsiteDataStore defaultDataStore];
    … …  
    137137}
    138138
    139 TEST(ResourceLoadStatistics, ShouldNotGrandfatherOnStartupDatabase)
     139TEST(ResourceLoadStatistics, ShouldNotGrandfatherOnStartup)
    140140{
    141141    auto *dataStore = [WKWebsiteDataStore defaultDataStore];
    … …  
    158158}
    159159
    160 TEST(ResourceLoadStatistics, ChildProcessesNotLaunchedDatabase)
     160TEST(ResourceLoadStatistics, ChildProcessesNotLaunched)
    161161{
    162162    // Ensure the shared process pool exists so the data store operations we're about to do work with it.
    … …  
    680680
    681681    __block bool doneFlag = false;
    682     [dataStore _clearResourceLoadStatistics:^(void) {
    683         doneFlag = true;
    684     }];
    685 
    686     static bool statisticsUpdated = false;
    687     [dataStore _setResourceLoadStatisticsTestingCallback:^(WKWebsiteDataStore *, NSString *message) {
    688         if (![message isEqualToString:@"Statistics Updated"])
    689             return;
    690         statisticsUpdated = true;
    691     }];
    692 
    693     TestWebKitAPI::Util::run(&doneFlag);
    694    
    695     doneFlag = false;
    696     [dataStore _setThirdPartyCookieBlockingMode:true onlyOnSitesWithoutUserInteraction:false completionHandler: ^(void) {
    697         doneFlag = true;
    698     }];
    699 
    700     TestWebKitAPI::Util::run(&doneFlag);
    701 
    702     // Set two third parties to be prevalent, leave evil1.com as non-prevalent to ensure
    703     // this call returns all third parties.
    704     doneFlag = false;
    705     [dataStore _setPrevalentDomain:[NSURL URLWithString:@"http://evil2.com"] completionHandler: ^(void) {
    706         doneFlag = true;
    707     }];
    708     doneFlag = false;
    709     [dataStore _setPrevalentDomain:[NSURL URLWithString:@"http://evil3.com"] completionHandler: ^(void) {
    710         doneFlag = true;
    711     }];
    712 
    713     // Seed test data in the web process' observer.
    714 
    715     // evil1
    716     doneFlag = false;
    717     [sharedProcessPool _seedResourceLoadStatisticsForTestingWithFirstParty:[NSURL URLWithString:@"http://webkit.org"] thirdParty:[NSURL URLWithString:@"http://evil1.com"] shouldScheduleNotification:NO completionHandler: ^() {
    718         doneFlag = true;
    719     }];
    720     TestWebKitAPI::Util::run(&doneFlag);
    721 
    722     doneFlag = false;
    723     [sharedProcessPool _seedResourceLoadStatisticsForTestingWithFirstParty:[NSURL URLWithString:@"http://webkit2.org"] thirdParty:[NSURL URLWithString:@"http://evil1.com"] shouldScheduleNotification:NO completionHandler: ^() {
    724         doneFlag = true;
    725     }];
    726     TestWebKitAPI::Util::run(&doneFlag);
    727 
    728 
    729     // evil2
    730     doneFlag = false;
    731     [sharedProcessPool _seedResourceLoadStatisticsForTestingWithFirstParty:[NSURL URLWithString:@"http://webkit.org"] thirdParty:[NSURL URLWithString:@"http://evil2.com"] shouldScheduleNotification:NO completionHandler: ^() {
    732         doneFlag = true;
    733     }];
    734     TestWebKitAPI::Util::run(&doneFlag);
    735 
    736 
    737     // evil3
    738     doneFlag = false;
    739     [sharedProcessPool _seedResourceLoadStatisticsForTestingWithFirstParty:[NSURL URLWithString:@"http://webkit.org"] thirdParty:[NSURL URLWithString:@"http://evil3.com"] shouldScheduleNotification:NO completionHandler: ^() {
    740         doneFlag = true;
    741     }];
    742     TestWebKitAPI::Util::run(&doneFlag);
    743     doneFlag = false;
    744     [sharedProcessPool _seedResourceLoadStatisticsForTestingWithFirstParty:[NSURL URLWithString:@"http://webkit2.org"] thirdParty:[NSURL URLWithString:@"http://evil3.com"] shouldScheduleNotification:NO completionHandler: ^() {
    745         doneFlag = true;
    746     }];
    747     TestWebKitAPI::Util::run(&doneFlag);
    748     doneFlag = false;
    749     [sharedProcessPool _seedResourceLoadStatisticsForTestingWithFirstParty:[NSURL URLWithString:@"http://webkit3.org"] thirdParty:[NSURL URLWithString:@"http://evil3.com"] shouldScheduleNotification:NO completionHandler: ^() {
    750         doneFlag = true;
    751     }];
    752     TestWebKitAPI::Util::run(&doneFlag);
    753 
    754     statisticsUpdated = false;
    755     [webView1 loadHTMLString:@"<body><script>close();</script></body>" baseURL:[NSURL URLWithString:@"http://webkit.org"]];
    756     [webView2 loadHTMLString:@"<body><script>close();</script></body>" baseURL:[NSURL URLWithString:@"http://webkit2.org"]];
    757     [webView3 loadHTMLString:@"<body><script>close();</script></body>" baseURL:[NSURL URLWithString:@"http://webkit3.org"]];
    758 
    759     // Wait for the statistics to be updated in the network process.
    760     TestWebKitAPI::Util::run(&statisticsUpdated);
    761 
    762     // Check that the third-party evil1 is now registered as subresource.
    763     doneFlag = false;
    764     [dataStore _isRegisteredAsSubresourceUnderFirstParty:[NSURL URLWithString:@"http://webkit.org"] thirdParty:[NSURL URLWithString:@"http://evil1.com"] completionHandler: ^(BOOL isRegistered) {
    765         EXPECT_TRUE(isRegistered);
    766         doneFlag = true;
    767     }];
    768     TestWebKitAPI::Util::run(&doneFlag);
    769     doneFlag = false;
    770     [dataStore _isRegisteredAsSubresourceUnderFirstParty:[NSURL URLWithString:@"http://webkit2.org"] thirdParty:[NSURL URLWithString:@"http://evil1.com"] completionHandler: ^(BOOL isRegistered) {
    771         EXPECT_TRUE(isRegistered);
    772         doneFlag = true;
    773     }];
    774     TestWebKitAPI::Util::run(&doneFlag);
    775 
    776 
    777     // Check that the third-party evil2 is now registered as subresource.
    778     doneFlag = false;
    779     [dataStore _isRegisteredAsSubresourceUnderFirstParty:[NSURL URLWithString:@"http://webkit.org"] thirdParty:[NSURL URLWithString:@"http://evil2.com"] completionHandler: ^(BOOL isRegistered) {
    780         EXPECT_TRUE(isRegistered);
    781         doneFlag = true;
    782     }];
    783     TestWebKitAPI::Util::run(&doneFlag);
    784 
    785 
    786     // Check that the third-party evil3 is now registered as subresource.
    787     doneFlag = false;
    788     [dataStore _isRegisteredAsSubresourceUnderFirstParty:[NSURL URLWithString:@"http://webkit.org"] thirdParty:[NSURL URLWithString:@"http://evil3.com"] completionHandler: ^(BOOL isRegistered) {
    789         EXPECT_TRUE(isRegistered);
    790         doneFlag = true;
    791     }];
    792     TestWebKitAPI::Util::run(&doneFlag);
    793     doneFlag = false;
    794     [dataStore _isRegisteredAsSubresourceUnderFirstParty:[NSURL URLWithString:@"http://webkit2.org"] thirdParty:[NSURL URLWithString:@"http://evil3.com"] completionHandler: ^(BOOL isRegistered) {
    795         EXPECT_TRUE(isRegistered);
    796         doneFlag = true;
    797     }];
    798     TestWebKitAPI::Util::run(&doneFlag);
    799     doneFlag = false;
    800     [dataStore _isRegisteredAsSubresourceUnderFirstParty:[NSURL URLWithString:@"http://webkit3.org"] thirdParty:[NSURL URLWithString:@"http://evil3.com"] completionHandler: ^(BOOL isRegistered) {
    801         EXPECT_TRUE(isRegistered);
    802         doneFlag = true;
    803     }];
    804     TestWebKitAPI::Util::run(&doneFlag);
    805 
    806 
    807     // Collect the ITP data summary which should include all third parties in the
    808     // order: [evil3.com, evil1.com, evil2.com] sorted by number of first parties
    809     // it appears under or redirects to
    810     doneFlag = false;
    811     [dataStore _getResourceLoadStatisticsDataSummary:^void(NSArray<_WKResourceLoadStatisticsThirdParty *> *thirdPartyData)
    812     {
    813         EXPECT_EQ(static_cast<int>([thirdPartyData count]), 3);
    814         NSEnumerator *thirdPartyDomains = [thirdPartyData objectEnumerator];
    815 
    816         // evil3
    817         _WKResourceLoadStatisticsThirdParty *evil3ThirdParty = [thirdPartyDomains nextObject];
    818         EXPECT_WK_STREQ(evil3ThirdParty.thirdPartyDomain, @"evil3.com");
    819 
    820         NSEnumerator *evil3Enumerator = [evil3ThirdParty.underFirstParties objectEnumerator];
    821         _WKResourceLoadStatisticsFirstParty *evil3FirstParty1 = [evil3Enumerator nextObject];
    822         _WKResourceLoadStatisticsFirstParty *evil3FirstParty2 = [evil3Enumerator nextObject];
    823         _WKResourceLoadStatisticsFirstParty *evil3FirstParty3 = [evil3Enumerator nextObject];
    824 
    825         EXPECT_WK_STREQ(evil3FirstParty1.firstPartyDomain, @"webkit2.org");
    826         EXPECT_WK_STREQ(evil3FirstParty2.firstPartyDomain, @"webkit3.org");
    827         EXPECT_WK_STREQ(evil3FirstParty3.firstPartyDomain, @"webkit.org");
    828 
    829         EXPECT_FALSE(evil3FirstParty1.thirdPartyStorageAccessGranted);
    830         EXPECT_FALSE(evil3FirstParty2.thirdPartyStorageAccessGranted);
    831         EXPECT_FALSE(evil3FirstParty3.thirdPartyStorageAccessGranted);
    832 
    833         // evil1
    834         _WKResourceLoadStatisticsThirdParty *evil1ThirdParty = [thirdPartyDomains nextObject];
    835         EXPECT_WK_STREQ(evil1ThirdParty.thirdPartyDomain, @"evil1.com");
    836 
    837         NSEnumerator *evil1Enumerator = [evil1ThirdParty.underFirstParties objectEnumerator];
    838         _WKResourceLoadStatisticsFirstParty *evil1FirstParty1= [evil1Enumerator nextObject];
    839         _WKResourceLoadStatisticsFirstParty *evil1FirstParty2 = [evil1Enumerator nextObject];
    840 
    841         EXPECT_WK_STREQ(evil1FirstParty1.firstPartyDomain, @"webkit2.org");
    842         EXPECT_WK_STREQ(evil1FirstParty2.firstPartyDomain, @"webkit.org");
    843 
    844         EXPECT_FALSE(evil1FirstParty1.thirdPartyStorageAccessGranted);
    845         EXPECT_FALSE(evil1FirstParty2.thirdPartyStorageAccessGranted);
    846 
    847         // evil2
    848         _WKResourceLoadStatisticsThirdParty *evil2ThirdParty = [thirdPartyDomains nextObject];
    849         EXPECT_WK_STREQ(evil2ThirdParty.thirdPartyDomain, @"evil2.com");
    850 
    851         NSEnumerator *evil2Enumerator = [evil2ThirdParty.underFirstParties objectEnumerator];
    852         _WKResourceLoadStatisticsFirstParty *evil2FirstParty1 = [evil2Enumerator nextObject];
    853 
    854         EXPECT_WK_STREQ(evil2FirstParty1.firstPartyDomain, @"webkit.org");
    855         EXPECT_FALSE(evil2FirstParty1.thirdPartyStorageAccessGranted);
    856         doneFlag = true;
    857     }];
    858 
    859     TestWebKitAPI::Util::run(&doneFlag);
    860 }
    861 
    862 TEST(ResourceLoadStatistics, GetResourceLoadStatisticsDataSummaryDatabase)
    863 {
    864     auto *sharedProcessPool = [WKProcessPool _sharedProcessPool];
    865     auto *dataStore = [WKWebsiteDataStore defaultDataStore];
    866 
    867     auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
    868     [configuration setProcessPool: sharedProcessPool];
    869     configuration.get().websiteDataStore = dataStore;
    870 
    871     auto webView1 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
    872     auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
    873     auto webView3 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
    874 
    875     [webView1 loadHTMLString:@"WebKit Test" baseURL:[NSURL URLWithString:@"http://webkit.org"]];
    876     [webView1 _test_waitForDidFinishNavigation];
    877     [webView2 loadHTMLString:@"WebKit Test" baseURL:[NSURL URLWithString:@"http://webkit2.org"]];
    878     [webView2 _test_waitForDidFinishNavigation];
    879     [webView3 loadHTMLString:@"WebKit Test" baseURL:[NSURL URLWithString:@"http://webkit3.org"]];
    880     [webView3 _test_waitForDidFinishNavigation];
    881 
    882     [dataStore _setResourceLoadStatisticsEnabled:YES];
    883 
    884     __block bool doneFlag = false;
    885682    [dataStore _setThirdPartyCookieBlockingMode:true onlyOnSitesWithoutUserInteraction:false completionHandler: ^(void) {
    886683        doneFlag = true;
Note: See TracChangeset for help on using the changeset viewer.