[ Mac Debug ] REGRESSION (r242975) Layout Test storage/indexeddb/modern/deletedatabas...
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jun 2019 01:30:46 +0000 (01:30 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jun 2019 01:30:46 +0000 (01:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196445
<rdar://problem/49483061>

Reviewed by Brady Eidson.

Unflake the test by making sure to wait for the onerror event before continuing the test.

* platform/mac-wk2/TestExpectations:
* storage/indexeddb/modern/resources/deletedatabase-2.js:
(prepareDatabase.event.target.onerror):
(continueTest1.request.onsuccess): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246227 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/storage/indexeddb/modern/resources/deletedatabase-2.js

index dcbc109..96d2578 100644 (file)
@@ -1,3 +1,18 @@
+2019-06-07  Youenn Fablet  <youenn@apple.com>
+
+        [ Mac Debug ] REGRESSION (r242975) Layout Test storage/indexeddb/modern/deletedatabase-2-private.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=196445
+        <rdar://problem/49483061>
+
+        Reviewed by Brady Eidson.
+
+        Unflake the test by making sure to wait for the onerror event before continuing the test.
+
+        * platform/mac-wk2/TestExpectations:
+        * storage/indexeddb/modern/resources/deletedatabase-2.js:
+        (prepareDatabase.event.target.onerror):
+        (continueTest1.request.onsuccess): Deleted.
+
 2019-06-07  Truitt Savell  <tsavell@apple.com>
 
         Unreviewed, rolling out r246138.
index 17cc255..b32088b 100644 (file)
@@ -950,8 +950,6 @@ webkit.org/b/197289 [ Mojave Debug ] webgl/2.0.0/conformance/state/gl-object-get
 
 webkit.org/b/189672 [ Mojave Debug ] webgl/2.0.0/conformance2/textures/misc/tex-new-formats.html [ Skip ]
 
-webkit.org/b/196445 [ Debug ] storage/indexeddb/modern/deletedatabase-2-private.html [ Pass Failure ]
-
 webkit.org/b/198195 [ Release ] fast/css/sticky/sticky-left-percentage.html [ Pass ImageOnlyFailure ]
 
 webkit.org/b/187828 [ Release ] fast/css-grid-layout/flex-content-sized-columns-resize.html [ Pass ImageOnlyFailure ]
index 377859d..3051523 100644 (file)
@@ -21,12 +21,16 @@ function successCallback()
 }
 
 var dbname;
+var resolveTransactionPromise;
+var transactionPromise = new Promise(resolve => resolveTransactionPromise = resolve);
+
 function prepareDatabase(e)
 {
     debug("Initial upgrade old version - " + e.oldVersion + " new version - " + e.newVersion);
     
     event.target.onerror = function(e) {
         debug("Open request error: " + event.target.error.name);
+        resolveTransactionPromise();
     }
 
     var versionTransaction = event.target.transaction;
@@ -76,8 +80,9 @@ function continueTest1()
 {
     debug("Requesting deleteDatabase");
     var request = window.indexedDB.deleteDatabase(dbname);
-    request.onsuccess = function(e)
+    request.onsuccess = async function(e)
     {
+        await transactionPromise;
         debug("Delete database success: oldVersion " + e.oldVersion + ", newVersion " + e.newVersion);
         continueTest2();
     }