Title: [292472] trunk/Tools
Revision
292472
Author
[email protected]
Date
2022-04-06 09:02:57 -0700 (Wed, 06 Apr 2022)

Log Message

Remove test ResourceLoadStatistics.RemoveSessionID
https://bugs.webkit.org/show_bug.cgi?id=238815

Reviewed by Youenn Fablet.

This test should be removed because:
1. The use case it wanted to examine no longer exists: this test was added in r246449 to verify that
WebResourceLoadStatisticsStore does not access storage session after a NetworkSession is removed in network
process. This could happen because NetworkSession was refcounted and it could stay alive after it's removed from
the map of NetworkProcess. NetworkSession is no longer refcounted after r247831.
2. Session removal, which the test wants to check, is not happening during this test: simply put, a download can
hold WebsiteDataStore alive, and the test does not wait for the download to finish. (This can be easily verified
by checking if ~WebsiteDataStore() is invoked.)

* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (292471 => 292472)


--- trunk/Tools/ChangeLog	2022-04-06 16:00:13 UTC (rev 292471)
+++ trunk/Tools/ChangeLog	2022-04-06 16:02:57 UTC (rev 292472)
@@ -1,3 +1,21 @@
+2022-04-06  Sihui Liu  <[email protected]>
+
+        Remove test ResourceLoadStatistics.RemoveSessionID
+        https://bugs.webkit.org/show_bug.cgi?id=238815
+
+        Reviewed by Youenn Fablet.
+
+        This test should be removed because:
+        1. The use case it wanted to examine no longer exists: this test was added in r246449 to verify that 
+        WebResourceLoadStatisticsStore does not access storage session after a NetworkSession is removed in network 
+        process. This could happen because NetworkSession was refcounted and it could stay alive after it's removed from 
+        the map of NetworkProcess. NetworkSession is no longer refcounted after r247831. 
+        2. Session removal, which the test wants to check, is not happening during this test: simply put, a download can 
+        hold WebsiteDataStore alive, and the test does not wait for the download to finish. (This can be easily verified 
+        by checking if ~WebsiteDataStore() is invoked.)
+
+        * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
+
 2022-04-06  Simon Fraser  <[email protected]>
 
         Unify the two ImageBuffer::create() functions, passing RenderingPurpose everywhere

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm (292471 => 292472)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm	2022-04-06 16:00:13 UTC (rev 292471)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm	2022-04-06 16:02:57 UTC (rev 292472)
@@ -327,41 +327,6 @@
     TestWebKitAPI::Util::run(&doneFlag);
 }
 
-TEST(ResourceLoadStatistics, RemoveSessionID)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    auto websiteDataStoreConfiguration = adoptNS([[_WKWebsiteDataStoreConfiguration alloc] init]);
-    configuration.get().websiteDataStore = adoptNS([[WKWebsiteDataStore alloc] _initWithConfiguration:websiteDataStoreConfiguration.get()]).get();
-
-    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
-
-    // We load a resource so that the NetworkSession stays alive a little bit longer after the session is removed.
-
-    [webView loadHTMLString:@"<a id='link' href='' download>Click me!</a>" baseURL:[NSURL URLWithString:@"http://webkit.org"]];
-    [webView _test_waitForDidFinishNavigation];
-
-    static bool doneFlag = false;
-    [webView evaluateJavaScript:@"document.getElementById('link').click();" completionHandler: ^(id, NSError*) {
-        doneFlag = true;
-    }];
-    TestWebKitAPI::Util::run(&doneFlag);
-
-    [configuration.get().websiteDataStore _setResourceLoadStatisticsEnabled:YES];
-    [configuration.get().websiteDataStore _setResourceLoadStatisticsDebugMode:YES];
-
-    // Trigger ITP tasks.
-    [configuration.get().websiteDataStore _scheduleCookieBlockingUpdate: ^(void) { }];
-    // Trigger removing of the sessionID.
-    TestWebKitAPI::Util::spinRunLoop(2);
-    [webView _close];
-    webView = nullptr;
-    configuration = nullptr;
-
-    auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
-    [webView2 loadHTMLString:@"WebKit Test" baseURL:[NSURL URLWithString:@"http://webkit.org"]];
-    [webView2 _test_waitForDidFinishNavigation];
-}
-
 TEST(ResourceLoadStatistics, NetworkProcessRestart)
 {
     // Ensure the shared process pool exists so the data store operations we're about to do work with it.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to