Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: LayoutTests/storage/indexeddb/resources/version-change-abort.js

Issue 243523003: Fire window.onerror for uncaught IndexedDB errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't capture full stack unless devtools is visible Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
- }
+ };
}

Powered by Google App Engine
This is Rietveld 408576698