Title: [209269] trunk/Tools
Revision
209269
Author
[email protected]
Date
2016-12-02 14:29:17 -0800 (Fri, 02 Dec 2016)

Log Message

Make IndexedDB.WebProcessKillIDBCleanup even more reliable.
https://bugs.webkit.org/show_bug.cgi?id=165330

Reviewed by Alex Christensen.

The test currently nulls out a RetainPtr<WKWebView> to try to destroy the view and kill the process.

Problem is that doesn't reliably destroy the view.
We should explicitly kill the process instead.

Also, by relocating when we kill the process, we can better test behavior of the IndexedDB mechanism.
e.g. We explicitly confirm that a second WebProcess can simultaneously attach to the same unique database as the first.

* TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:
(TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (209268 => 209269)


--- trunk/Tools/ChangeLog	2016-12-02 22:27:52 UTC (rev 209268)
+++ trunk/Tools/ChangeLog	2016-12-02 22:29:17 UTC (rev 209269)
@@ -1,3 +1,21 @@
+2016-12-02  Brady Eidson  <[email protected]>
+
+        Make IndexedDB.WebProcessKillIDBCleanup even more reliable.
+        https://bugs.webkit.org/show_bug.cgi?id=165330
+
+        Reviewed by Alex Christensen.
+
+        The test currently nulls out a RetainPtr<WKWebView> to try to destroy the view and kill the process.
+
+        Problem is that doesn't reliably destroy the view.
+        We should explicitly kill the process instead.
+
+        Also, by relocating when we kill the process, we can better test behavior of the IndexedDB mechanism.
+        e.g. We explicitly confirm that a second WebProcess can simultaneously attach to the same unique database as the first.
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:
+        (TEST):
+
 2016-12-02  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r209136.

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm (209268 => 209269)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm	2016-12-02 22:27:52 UTC (rev 209268)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm	2016-12-02 22:29:17 UTC (rev 209269)
@@ -32,6 +32,7 @@
 #import <WebKit/WKProcessPoolPrivate.h>
 #import <WebKit/WKUserContentControllerPrivate.h>
 #import <WebKit/WKWebViewConfigurationPrivate.h>
+#import <WebKit/WKWebViewPrivate.h>
 #import <WebKit/_WKProcessPoolConfiguration.h>
 #import <WebKit/_WKUserStyleSheet.h>
 #import <wtf/Deque.h>
@@ -83,9 +84,6 @@
     RetainPtr<NSString> string3 = (NSString *)[getNextMessage() body];
     RetainPtr<NSString> string4 = (NSString *)[getNextMessage() body];
 
-    // Kill that web process
-    webView = nil;
-
     // Make a new web view with a new web process to finish the test
     RetainPtr<WKWebView> webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
 
@@ -93,6 +91,10 @@
     [webView2 loadRequest:request];
 
     RetainPtr<NSString> string5 = (NSString *)[getNextMessage() body];
+
+    // Kill the first web process to unblock the second web processes transaction from starting.
+    [webView _killWebContentProcessAndResetState];
+
     RetainPtr<NSString> string6 = (NSString *)[getNextMessage() body];
 
     EXPECT_WK_STREQ(@"UpgradeNeeded", string1.get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to