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

Unified Diff: LayoutTests/storage/indexeddb/window-onerror-prevented.html

Issue 243523003: Fire window.onerror for uncaught IndexedDB errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased and linkage fix Created 5 years, 3 months 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
« no previous file with comments | « LayoutTests/storage/indexeddb/window-onerror.html ('k') | Source/core/dom/DOMError.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/storage/indexeddb/window-onerror-prevented.html
diff --git a/LayoutTests/storage/indexeddb/window-onerror-prevented.html b/LayoutTests/storage/indexeddb/window-onerror-prevented.html
new file mode 100644
index 0000000000000000000000000000000000000000..326267a6f835d50267e35f5f9579e250db9a5259
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/window-onerror-prevented.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>IndexedDB: Prevented errors do not trigger window.onerror</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+
+var t = async_test('Prevented error on request does not cause window.onerror to fire');
+t.step(function() {
+ var dbName = location.pathname;
+ var deleteRequest = indexedDB.deleteDatabase(dbName);
+ deleteRequest.onsuccess = t.step_func(function() {
+ var openRequest = indexedDB.open(dbName);
+ openRequest.onupgradeneeded = t.step_func(function() {
+ var db = openRequest.result;
+ var store = db.createObjectStore('store');
+ });
+ openRequest.onsuccess = t.step_func(function() {
+ var db = openRequest.result;
+ var tx = db.transaction('store', 'readwrite');
+ var store = tx.objectStore('store');
+ store.add({}, 'k1');
+ store.add({}, 'k1').onerror = t.step_func(function(e) {
+ e.preventDefault();
+ });
+ tx.oncomplete = t.step_func(function() {
+ t.done();
+ });
+ tx.onabort = t.step_func(function() {
+ assert_unreached('transaction should have aborted');
+ });
+ });
+ });
+
+ window.onerror = t.step_func(function(message, url, line, column) {
+ assert_unreached('window.onerror should not be called');
+ });
+});
+
+</script>
« no previous file with comments | « LayoutTests/storage/indexeddb/window-onerror.html ('k') | Source/core/dom/DOMError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698