Title: [256235] trunk/LayoutTests
Revision
256235
Author
[email protected]
Date
2020-02-10 18:08:05 -0800 (Mon, 10 Feb 2020)

Log Message

REGRESSION: (253807) [ macOS iOS ] storage/indexeddb/intversion-long-queue-private.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206965
<rdar://problem/59005652>

Reviewed by Ryosuke Niwa.

Modify a test to make it less flaky. Based on our current implementation, there is no guarantee that Block event on
delete request would be fired before Complete event on transaction from connection2 in this test. The events
sequence we are sure are:
1. UpgradeNeeded event on openRequest2 -> VersionChange event on connection2 -> Complete event on VersionChange
transaction on connection2 -> Success event on openRequest2.
2. VersionChange event on connection2 -> Block event on delete request.
Therefore I am changing the test to ensure sequence 1.

* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:
* storage/indexeddb/intversion-long-queue-expected.txt:
* storage/indexeddb/intversion-long-queue-private-expected.txt:
* storage/indexeddb/resources/intversion-long-queue.js:
(connection2Blocked):
(connection2UpgradeNeeded):
(connection2VersionChangeCallback):
(deleteDatabaseBlockedCallback): Deleted.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (256234 => 256235)


--- trunk/LayoutTests/ChangeLog	2020-02-11 01:46:03 UTC (rev 256234)
+++ trunk/LayoutTests/ChangeLog	2020-02-11 02:08:05 UTC (rev 256235)
@@ -1,3 +1,29 @@
+2020-02-10  Sihui Liu  <[email protected]>
+
+        REGRESSION: (253807) [ macOS iOS ] storage/indexeddb/intversion-long-queue-private.html is flaky failing
+        https://bugs.webkit.org/show_bug.cgi?id=206965
+        <rdar://problem/59005652>
+
+        Reviewed by Ryosuke Niwa.
+
+        Modify a test to make it less flaky. Based on our current implementation, there is no guarantee that Block event on
+        delete request would be fired before Complete event on transaction from connection2 in this test. The events
+        sequence we are sure are: 
+        1. UpgradeNeeded event on openRequest2 -> VersionChange event on connection2 -> Complete event on VersionChange
+        transaction on connection2 -> Success event on openRequest2.
+        2. VersionChange event on connection2 -> Block event on delete request.
+        Therefore I am changing the test to ensure sequence 1.
+
+        * platform/ios-wk2/TestExpectations:
+        * platform/mac/TestExpectations:
+        * storage/indexeddb/intversion-long-queue-expected.txt:
+        * storage/indexeddb/intversion-long-queue-private-expected.txt:
+        * storage/indexeddb/resources/intversion-long-queue.js:
+        (connection2Blocked):
+        (connection2UpgradeNeeded):
+        (connection2VersionChangeCallback):
+        (deleteDatabaseBlockedCallback): Deleted.
+
 2020-02-10  Jason Lawrence  <[email protected]>
 
         Regression: (r256009?) [ Mojave wk2 Debug ] webrtc/peerconnection-page-cache-long.html is crashing.

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (256234 => 256235)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2020-02-11 01:46:03 UTC (rev 256234)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2020-02-11 02:08:05 UTC (rev 256235)
@@ -1359,7 +1359,6 @@
 webkit.org/b/206752 imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable.html [ Pass Failure ]
 
 webkit.org/b/206946 http/tests/security/cookies/third-party-cookie-blocking-main-frame.html [ Pass Timeout ]
-webkit.org/b/206965 storage/indexeddb/intversion-long-queue-private.html [ Pass Failure ]
 
 webkit.org/b/205309 scrollingcoordinator/ios/scroll-position-after-reattach.html [ ImageOnlyFailure ]
 

Modified: trunk/LayoutTests/platform/mac/TestExpectations (256234 => 256235)


--- trunk/LayoutTests/platform/mac/TestExpectations	2020-02-11 01:46:03 UTC (rev 256234)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2020-02-11 02:08:05 UTC (rev 256235)
@@ -1962,8 +1962,6 @@
 
 webkit.org/b/205729 webrtc/captureCanvas-webrtc.html [ Pass Failure ]
 
-webkit.org/b/206965 storage/indexeddb/intversion-long-queue-private.html [ Pass Failure ]
-
 webkit.org/b/207010 fast/history/page-cache-webdatabase-pending-transaction.html [ Timeout ]
 
 webkit.org/b/201481 imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html [ Pass Failure ]

Modified: trunk/LayoutTests/storage/indexeddb/intversion-long-queue-expected.txt (256234 => 256235)


--- trunk/LayoutTests/storage/indexeddb/intversion-long-queue-expected.txt	2020-02-11 01:46:03 UTC (rev 256234)
+++ trunk/LayoutTests/storage/indexeddb/intversion-long-queue-expected.txt	2020-02-11 02:08:05 UTC (rev 256235)
@@ -27,7 +27,6 @@
 
 connection2Blocked():
 request = indexedDB.deleteDatabase(dbname)
-request._onblocked_ = deleteDatabaseBlockedCallback
 request._onsuccess_ = deleteDatabaseSuccessCallback
 request = indexedDB.open(dbname, 3)
 request._onupgradeneeded_ = connection3UpgradeNeeded
@@ -38,12 +37,13 @@
 PASS event.oldVersion is 1
 PASS event.newVersion is 2
 db = event.target.result
+db._onversionchange_ = connection2VersionChangeCallback
 PASS db.objectStoreNames.length is 0
 db.createObjectStore('some object store')
 transaction = event.target.transaction
 transaction._oncomplete_ = connection2TransactionComplete
 
-deleteDatabaseBlockedCallback():
+connection2VersionChangeCallback():
 PASS event.oldVersion is 2
 PASS event.newVersion is null
 

Modified: trunk/LayoutTests/storage/indexeddb/intversion-long-queue-private-expected.txt (256234 => 256235)


--- trunk/LayoutTests/storage/indexeddb/intversion-long-queue-private-expected.txt	2020-02-11 01:46:03 UTC (rev 256234)
+++ trunk/LayoutTests/storage/indexeddb/intversion-long-queue-private-expected.txt	2020-02-11 02:08:05 UTC (rev 256235)
@@ -27,7 +27,6 @@
 
 connection2Blocked():
 request = indexedDB.deleteDatabase(dbname)
-request._onblocked_ = deleteDatabaseBlockedCallback
 request._onsuccess_ = deleteDatabaseSuccessCallback
 request = indexedDB.open(dbname, 3)
 request._onupgradeneeded_ = connection3UpgradeNeeded
@@ -38,12 +37,13 @@
 PASS event.oldVersion is 1
 PASS event.newVersion is 2
 db = event.target.result
+db._onversionchange_ = connection2VersionChangeCallback
 PASS db.objectStoreNames.length is 0
 db.createObjectStore('some object store')
 transaction = event.target.transaction
 transaction._oncomplete_ = connection2TransactionComplete
 
-deleteDatabaseBlockedCallback():
+connection2VersionChangeCallback():
 PASS event.oldVersion is 2
 PASS event.newVersion is null
 

Modified: trunk/LayoutTests/storage/indexeddb/resources/intversion-long-queue.js (256234 => 256235)


--- trunk/LayoutTests/storage/indexeddb/resources/intversion-long-queue.js	2020-02-11 01:46:03 UTC (rev 256234)
+++ trunk/LayoutTests/storage/indexeddb/resources/intversion-long-queue.js	2020-02-11 02:08:05 UTC (rev 256235)
@@ -37,7 +37,6 @@
 {
     preamble(evt);
     evalAndLog("request = indexedDB.deleteDatabase(dbname)");
-    evalAndLog("request._onblocked_ = deleteDatabaseBlockedCallback");
     evalAndLog("request._onsuccess_ = deleteDatabaseSuccessCallback");
     request._onerror_ = unexpectedErrorCallback;
 
@@ -48,13 +47,6 @@
     evalAndLog("connection1.close()");
 }
 
-function deleteDatabaseBlockedCallback(evt)
-{
-    preamble(evt);
-    shouldBe("event.oldVersion", "2");
-    shouldBeNull("event.newVersion");
-}
-
 function deleteDatabaseSuccessCallback(evt)
 {
     preamble(evt);
@@ -68,6 +60,7 @@
     shouldBe("event.oldVersion", "1");
     shouldBe("event.newVersion", "2");
     evalAndLog("db = event.target.result");
+    evalAndLog("db._onversionchange_ = connection2VersionChangeCallback");
     shouldBe("db.objectStoreNames.length", "0");
     evalAndLog("db.createObjectStore('some object store')");
     evalAndLog("transaction = event.target.transaction");
@@ -88,6 +81,13 @@
     shouldBe("db.version", "2");
 }
 
+function connection2VersionChangeCallback(evt)
+{
+    preamble(evt);
+    shouldBe("event.oldVersion", "2");
+    shouldBeNull("event.newVersion");
+}
+
 var gotUpgradeNeededEvent = false;
 function connection3UpgradeNeeded(evt)
 {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to