Changeset 240509 in webkit


Ignore:
Timestamp:
Jan 25, 2019 2:21:38 PM (5 years ago)
Author:
Brent Fulgham
Message:

Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=193297
<rdar://problem/47158841>

Unreviewed test case fix.

These test cases require ResourceLoadStatistics to be active, so the feature must be turned on.
Previously, the default data store turned the feature on automatically, allowing these tests to pass.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r240507 r240509  
     12019-01-25  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
     4        https://bugs.webkit.org/show_bug.cgi?id=193297
     5        <rdar://problem/47158841>
     6
     7        Unreviewed test case fix.
     8
     9        These test cases require ResourceLoadStatistics to be active, so the feature must be turned on.
     10        Previously, the default data store turned the feature on automatically, allowing these tests to pass.
     11
     12        * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
     13        (TEST):
     14
    1152019-01-25  Keith Rollin  <krollin@apple.com>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm

    r240498 r240509  
    5858TEST(ResourceLoadStatistics, GrandfatherCallback)
    5959{
    60     // We need an active NetworkProcess to perform ResourceLoadStatistics operations.
    61     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
    62 
    6360    auto *dataStore = [WKWebsiteDataStore defaultDataStore];
    64     [dataStore _setResourceLoadStatisticsEnabled:NO];
    6561
    6662    NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES];
     
    7773        grandfatheredFlag = true;
    7874    }];
     75
     76    // We need an active NetworkProcess to perform ResourceLoadStatistics operations.
     77    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
     78    [dataStore _setResourceLoadStatisticsEnabled:YES];
    7979
    8080    TestWebKitAPI::Util::run(&grandfatheredFlag);
     
    122122TEST(ResourceLoadStatistics, ShouldNotGrandfatherOnStartup)
    123123{
    124     // We need an active NetworkProcess to perform ResourceLoadStatistics operations.
    125     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
    126 
    127124    auto *dataStore = [WKWebsiteDataStore defaultDataStore];
    128     [dataStore _setResourceLoadStatisticsEnabled:NO];
    129125
    130126    NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES];
     
    143139    }];
    144140
     141    // We need an active NetworkProcess to perform ResourceLoadStatistics operations.
     142    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
     143    [dataStore _setResourceLoadStatisticsEnabled:YES];
     144
    145145    TestWebKitAPI::Util::run(&callbackFlag);
    146146}
     
    153153    EXPECT_EQ((size_t)0, [sharedProcessPool _pluginProcessCount]);
    154154
    155     // We need an active NetworkProcess to perform ResourceLoadStatistics operations.
    156     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
    157 
    158155    auto *dataStore = [WKWebsiteDataStore defaultDataStore];
    159     [dataStore _setResourceLoadStatisticsEnabled:NO];
    160156
    161157    NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES];
     
    173169        doneFlag = true;
    174170    }];
     171
     172    // We need an active NetworkProcess to perform ResourceLoadStatistics operations.
     173    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
     174    [dataStore _setResourceLoadStatisticsEnabled:YES];
    175175
    176176    TestWebKitAPI::Util::run(&doneFlag);
Note: See TracChangeset for help on using the changeset viewer.