Title: [138402] trunk/LayoutTests
Revision
138402
Author
[email protected]
Date
2012-12-21 15:48:36 -0800 (Fri, 21 Dec 2012)

Log Message

[Chromium] IndexedDB: storage/indexeddb/intversion-close-between-events.html flaky in content_shell
https://bugs.webkit.org/show_bug.cgi?id=105665

Test uses a setTimeout() which may fire at different times relative to the completion of the
IDBOpenDBRequest in multiprocess ports. Make the test resilient against different outcomes.

Reviewed by Tony Chang.

* storage/indexeddb/resources/intversion-close-between-events.js:
(deleteSuccess):
(openSuccessOrError):
(checkFinished):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (138401 => 138402)


--- trunk/LayoutTests/ChangeLog	2012-12-21 23:27:49 UTC (rev 138401)
+++ trunk/LayoutTests/ChangeLog	2012-12-21 23:48:36 UTC (rev 138402)
@@ -1,5 +1,20 @@
 2012-12-21  Joshua Bell  <[email protected]>
 
+        [Chromium] IndexedDB: storage/indexeddb/intversion-close-between-events.html flaky in content_shell
+        https://bugs.webkit.org/show_bug.cgi?id=105665
+
+        Test uses a setTimeout() which may fire at different times relative to the completion of the
+        IDBOpenDBRequest in multiprocess ports. Make the test resilient against different outcomes.
+
+        Reviewed by Tony Chang.
+
+        * storage/indexeddb/resources/intversion-close-between-events.js:
+        (deleteSuccess):
+        (openSuccessOrError):
+        (checkFinished):
+
+2012-12-21  Joshua Bell  <[email protected]>
+
         IndexedDB: Combine openConnection and openConnectionWithVersion
         https://bugs.webkit.org/show_bug.cgi?id=105658
 

Modified: trunk/LayoutTests/storage/indexeddb/resources/intversion-close-between-events.js (138401 => 138402)


--- trunk/LayoutTests/storage/indexeddb/resources/intversion-close-between-events.js	2012-12-21 23:27:49 UTC (rev 138401)
+++ trunk/LayoutTests/storage/indexeddb/resources/intversion-close-between-events.js	2012-12-21 23:48:36 UTC (rev 138402)
@@ -19,10 +19,9 @@
     preamble(evt);
 
     evalAndLog("request = indexedDB.open(dbname, 7)");
-    request._onsuccess_ = openSuccess;
+    request._onsuccess_ = request._onerror_ = openSuccessOrError;
     request._onupgradeneeded_ = upgradeNeeded;
     request._onblocked_ = unexpectedBlockedCallback;
-    request._onerror_ = unexpectedErrorCallback;
 }
 
 var sawTransactionComplete = false;
@@ -50,7 +49,7 @@
 }
 
 var didCallCloseDB = false;
-var didGetOpenSuccess = false;
+var didGetOpenSuccessOrError = false;
 
 function closeDB()
 {
@@ -59,9 +58,11 @@
     checkFinished();
 }
 
-function openSuccess(evt)
+function openSuccessOrError(evt)
 {
-    didGetOpenSuccess = true;
+    // May get either a success or error event, depending on when the timeout fires
+    // relative to the open steps.
+    didGetOpenSuccessOrError = true;
 
     var quiet = true;
     if (didCallCloseDB) {
@@ -77,7 +78,7 @@
 {
     preamble();
 
-    if (!didCallCloseDB || !didGetOpenSuccess) {
+    if (!didCallCloseDB || !didGetOpenSuccessOrError) {
         debug("Not done yet...");
         return;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to