Title: [275890] trunk/Tools
Revision
275890
Author
[email protected]
Date
2021-04-13 09:50:41 -0700 (Tue, 13 Apr 2021)

Log Message

REGRESSION (r275792): [ iOS wk2 ] TestWebKitAPI.IndexedDB.DatabaseProcessKill is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=224454

Reviewed by Brady Eidson, Sihui Liu.

This test was racey; the content ran script immediately, and it was possible for
the first set of messages to be received before -_test_waitForDidFinishNavigation
returned; the test would then stall because nothing triggered any more messages.

Fix by having the content run the tests from a function, and call that function
from the test. Also handle the case where receivedScriptMessage can be true
before entering the first TestWebKitAPI::Util::run().

* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill-1.html:
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
(TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (275889 => 275890)


--- trunk/Tools/ChangeLog	2021-04-13 16:50:38 UTC (rev 275889)
+++ trunk/Tools/ChangeLog	2021-04-13 16:50:41 UTC (rev 275890)
@@ -1,3 +1,21 @@
+2021-04-12  Simon Fraser  <[email protected]>
+
+        REGRESSION (r275792): [ iOS wk2 ] TestWebKitAPI.IndexedDB.DatabaseProcessKill is a flakey timeout
+        https://bugs.webkit.org/show_bug.cgi?id=224454
+
+        Reviewed by Brady Eidson, Sihui Liu.
+
+        This test was racey; the content ran script immediately, and it was possible for
+        the first set of messages to be received before -_test_waitForDidFinishNavigation
+        returned; the test would then stall because nothing triggered any more messages.
+
+        Fix by removing the call to -_test_waitForDidFinishNavigation and setting
+        receivedScriptMessage to false after waiting for the previous message.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill-1.html:
+        * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
+        (TEST):
+
 2021-04-13  Sam Sneddon  <[email protected]>
 
         Test objects should know if they need servers

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm (275889 => 275890)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm	2021-04-13 16:50:38 UTC (rev 275889)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm	2021-04-13 16:50:41 UTC (rev 275890)
@@ -82,7 +82,6 @@
 
     NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBDatabaseProcessKill-1" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
     [webView loadRequest:request];
-    [webView _test_waitForDidFinishNavigation];
 
     bool killedDBProcess = false;
     while (true) {
@@ -89,8 +88,8 @@
         if (databaseErrorReceived)
             break;
 
+        TestWebKitAPI::Util::run(&receivedScriptMessage);
         receivedScriptMessage = false;
-        TestWebKitAPI::Util::run(&receivedScriptMessage);
         if (!killedDBProcess && openRequestUpgradeNeeded) {
             killedDBProcess = true;
             [configuration.get().websiteDataStore _terminateNetworkProcess];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to