Changeset 240509 in webkit
- Timestamp:
- Jan 25, 2019 2:21:38 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r240507 r240509 1 2019-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 1 15 2019-01-25 Keith Rollin <krollin@apple.com> 2 16 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm
r240498 r240509 58 58 TEST(ResourceLoadStatistics, GrandfatherCallback) 59 59 { 60 // We need an active NetworkProcess to perform ResourceLoadStatistics operations.61 auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);62 63 60 auto *dataStore = [WKWebsiteDataStore defaultDataStore]; 64 [dataStore _setResourceLoadStatisticsEnabled:NO];65 61 66 62 NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES]; … … 77 73 grandfatheredFlag = true; 78 74 }]; 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]; 79 79 80 80 TestWebKitAPI::Util::run(&grandfatheredFlag); … … 122 122 TEST(ResourceLoadStatistics, ShouldNotGrandfatherOnStartup) 123 123 { 124 // We need an active NetworkProcess to perform ResourceLoadStatistics operations.125 auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);126 127 124 auto *dataStore = [WKWebsiteDataStore defaultDataStore]; 128 [dataStore _setResourceLoadStatisticsEnabled:NO];129 125 130 126 NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES]; … … 143 139 }]; 144 140 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 145 145 TestWebKitAPI::Util::run(&callbackFlag); 146 146 } … … 153 153 EXPECT_EQ((size_t)0, [sharedProcessPool _pluginProcessCount]); 154 154 155 // We need an active NetworkProcess to perform ResourceLoadStatistics operations.156 auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);157 158 155 auto *dataStore = [WKWebsiteDataStore defaultDataStore]; 159 [dataStore _setResourceLoadStatisticsEnabled:NO];160 156 161 157 NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES]; … … 173 169 doneFlag = true; 174 170 }]; 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]; 175 175 176 176 TestWebKitAPI::Util::run(&doneFlag);
Note: See TracChangeset
for help on using the changeset viewer.