Title: [233899] trunk/Tools
Revision
233899
Author
[email protected]
Date
2018-07-17 16:34:36 -0700 (Tue, 17 Jul 2018)

Log Message

REGRESSION: [macOS Sierra] TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=187066
<rdar://problem/41609065>

Reviewed by Chris Dumez.

In r232668 we started to do reload if web process crashes by default. As we killed the web
process explicitly in this test, if web page got reloaded, messages would be sent again,
and flag set in message handler could keep the test continue to evaluate the expectation
without waiting for removeDataOfTypes to finish.

* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(-[WebsiteDataStoreCustomPathsMessageHandler webViewWebContentProcessDidTerminate:]):
(TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (233898 => 233899)


--- trunk/Tools/ChangeLog	2018-07-17 23:06:12 UTC (rev 233898)
+++ trunk/Tools/ChangeLog	2018-07-17 23:34:36 UTC (rev 233899)
@@ -1,3 +1,20 @@
+2018-07-17  Sihui Liu  <[email protected]>
+
+        REGRESSION: [macOS Sierra] TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=187066
+        <rdar://problem/41609065>
+
+        Reviewed by Chris Dumez.
+
+        In r232668 we started to do reload if web process crashes by default. As we killed the web 
+        process explicitly in this test, if web page got reloaded, messages would be sent again, 
+        and flag set in message handler could keep the test continue to evaluate the expectation 
+        without waiting for removeDataOfTypes to finish.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
+        (-[WebsiteDataStoreCustomPathsMessageHandler webViewWebContentProcessDidTerminate:]):
+        (TEST):
+
 2018-07-17  Chris Dumez  <[email protected]>
 
         Turn on PSON in WebKitTestRunner

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm (233898 => 233899)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm	2018-07-17 23:06:12 UTC (rev 233898)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm	2018-07-17 23:34:36 UTC (rev 233899)
@@ -45,7 +45,7 @@
 static bool receivedScriptMessage;
 static Deque<RetainPtr<WKScriptMessage>> scriptMessages;
 
-@interface WebsiteDataStoreCustomPathsMessageHandler : NSObject <WKScriptMessageHandler>
+@interface WebsiteDataStoreCustomPathsMessageHandler : NSObject <WKScriptMessageHandler, WKNavigationDelegate>
 @end
 
 @implementation WebsiteDataStoreCustomPathsMessageHandler
@@ -56,6 +56,11 @@
     scriptMessages.append(message);
 }
 
+- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView
+{
+    // Overwrite the default policy which launches a new web process and reload page on crash.
+}
+
 @end
 
 static WKScriptMessage *getNextMessage()
@@ -115,6 +120,7 @@
     configuration.get().websiteDataStore = [[[WKWebsiteDataStore alloc] _initWithConfiguration:websiteDataStoreConfiguration.get()] autorelease];
 
     RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+    [webView setNavigationDelegate:handler.get()];
 
     NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"WebsiteDataStoreCustomPaths" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
     [webView loadRequest:request];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to