Index: LayoutTests/storage/indexeddb/resources/version-change-abort.js |
diff --git a/LayoutTests/storage/indexeddb/resources/version-change-abort.js b/LayoutTests/storage/indexeddb/resources/version-change-abort.js |
index 1f607b4c146f0772cc92625b85da5e12d5aa13fb..460112bef67aa981808c8243052ecd247bcc06d1 100644 |
--- a/LayoutTests/storage/indexeddb/resources/version-change-abort.js |
+++ b/LayoutTests/storage/indexeddb/resources/version-change-abort.js |
@@ -5,6 +5,8 @@ if (this.importScripts) { |
description("Ensure that aborted VERSION_CHANGE transactions are completely rolled back"); |
+self.isOnErrorTest = true; |
+ |
indexedDBTest(prepareDatabase, setVersion1Complete); |
function prepareDatabase() |
{ |
@@ -29,6 +31,7 @@ function setVersion1Complete() |
vcreq.onerror = setVersion2Abort; |
vcreq.onblocked = unexpectedBlockedCallback; |
vcreq.onsuccess = unexpectedSuccessCallback; |
+ expectError(); |
} |
function inSetVersion2() |
@@ -44,22 +47,17 @@ function inSetVersion2() |
evalAndLog("store = db.deleteObjectStore('store1')"); |
evalAndLog("store = db.createObjectStore('store2')"); |
- // Ensure the test harness error handler is not invoked. |
- self.originalWindowOnError = self.onerror; |
- self.onerror = null; |
- |
debug("raising exception"); |
throw new Error("This should *NOT* be caught!"); |
} |
-function setVersion2Abort() |
+function setVersion2Abort(evt) |
{ |
debug(""); |
debug("setVersion2Abort() callback"); |
- |
- // Restore test harness error handler. |
- self.onerror = self.originalWindowOnError; |
+ evt.preventDefault(); |
db.close(); |
+ |
evalAndLog("request = indexedDB.open(dbname)"); |
request.onblocked = unexpectedBlockedCallback; |
request.onupgradeneeded = unexpectedUpgradeNeededCallback; |
@@ -71,5 +69,5 @@ function setVersion2Abort() |
shouldBeFalse("db.objectStoreNames.contains('store2')"); |
finishJSTest(); |
- } |
+ }; |
} |