REGRESSION (191898) idbobjectstore-*-failures.html tests fail in Release builds.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 23:03:29 +0000 (23:03 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 23:03:29 +0000 (23:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150815

Reviewed by NOBODY (Fix failing/flaky tests from my previous check-in)

* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html:
* storage/indexeddb/modern/idbobjectstore-count-failures.html:
* storage/indexeddb/modern/idbobjectstore-get-failures.html:
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html:

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

LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html
LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html
LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html
LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html

index b4d603c..df73d76 100644 (file)
@@ -1,3 +1,15 @@
+2015-11-02  Brady Eidson  <beidson@apple.com>
+
+        REGRESSION (191898) idbobjectstore-*-failures.html tests fail in Release builds.
+        https://bugs.webkit.org/show_bug.cgi?id=150815
+
+        Reviewed by NOBODY (Fix failing/flaky tests from my previous check-in)
+
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-count-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-get-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html:
+
 2015-11-02  Ryan Haddad  <ryanhaddad@apple.com>
 
         Marking fast/text/multiple-feature-properties.html as flaky on win
index 8c5aa80..977d47c 100644 (file)
@@ -101,11 +101,16 @@ function continueTest2()
             alert("Failed to deleteObjectStore with a non-existent objectstore - " + e);
         }
 
-        // Queue up some puts to keep the transaction alive long enough for the setTimeout to fire.
+        // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
         var objectStore = versionTransaction.objectStore("TestObjectStore");
-        objectStore.put("we will we will", 1).onsuccess = function() {
-            objectStore.put("rock you", 2);
+        var canFinish = false;
+        var spinGet = function() { 
+            objectStore.get("foo").onsuccess = function() {
+                if (!canFinish)
+                    spinGet();
+            }
         }
+        spinGet();
         
         // After the versionChange transaction becomes inactive, but while it's still in-progress, try to delete the objectstore
         var tryInactiveDelete = function() 
@@ -115,6 +120,7 @@ function continueTest2()
             } catch(e) {
                 alert("Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - " + e);
             }
+            canFinish = true;
         }
         
         setTimeout(tryInactiveDelete, 0);
index 51d3f0d..3acce16 100644 (file)
@@ -65,17 +65,23 @@ function continueTest1()
     var transaction = database.transaction("TestObjectStore", "readonly");
     var objectStore = transaction.objectStore("TestObjectStore");
 
-    // Queue up some gets to keep the transaction alive long enough for the setTimeout to fire.
-    objectStore.get("foo").onsuccess = function() {
-        objectStore.get("foo");
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get("foo").onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
     }
-
+    spinGet();
+    
     var getWhileInactive = function() {
         try {
             objectStore.count();
         } catch(e) {
             alert("Failed to count records in object store while transaction is inactive");
-        } 
+        }
+        canFinish = true;
     }
     
     setTimeout(getWhileInactive, 0);
index 0b63ab9..e372103 100644 (file)
@@ -65,17 +65,23 @@ function continueTest1()
     var transaction = database.transaction("TestObjectStore", "readonly");
     var objectStore = transaction.objectStore("TestObjectStore");
 
-    // Queue up some gets to keep the transaction alive long enough for the setTimeout to fire.
-    objectStore.get("foo").onsuccess = function() {
-        objectStore.get("foo");
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get("foo").onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
     }
+    spinGet();
 
     var getWhileInactive = function() {
         try {
             objectStore.get("foo");
         } catch(e) {
             alert("Failed to get record from object store while the transaction is inactive");
-        } 
+        }
+        canFinish = true;
     }
     
     setTimeout(getWhileInactive, 0);
index f312dbf..27c4da1 100644 (file)
@@ -80,10 +80,15 @@ function continueTest1()
     var transaction = database.transaction("TestObjectStore", "readwrite");
     var objectStore = transaction.objectStore("TestObjectStore");
 
-    // Queue up some gets to keep the transaction alive long enough for the setTimeout to fire.
-    objectStore.get("foo").onsuccess = function() {
-        objectStore.get("foo");
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get("foo").onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
     }
+    spinGet();
 
     var testWhileInactive = function() {
         try {
@@ -96,7 +101,9 @@ function continueTest1()
             objectStore.clear();
         } catch(e) {
             alert("Failed to clear object store with inactive transaction");
-        } 
+        }
+        
+        canFinish = true;
     }
     
     setTimeout(testWhileInactive, 0);