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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/storage/indexeddb/window-onerror.html ('k') | Source/core/dom/DOMError.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>IndexedDB: Prevented errors do not trigger window.onerror</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6
7 var t = async_test('Prevented error on request does not cause window.onerror to fire');
8 t.step(function() {
9 var dbName = location.pathname;
10 var deleteRequest = indexedDB.deleteDatabase(dbName);
11 deleteRequest.onsuccess = t.step_func(function() {
12 var openRequest = indexedDB.open(dbName);
13 openRequest.onupgradeneeded = t.step_func(function() {
14 var db = openRequest.result;
15 var store = db.createObjectStore('store');
16 });
17 openRequest.onsuccess = t.step_func(function() {
18 var db = openRequest.result;
19 var tx = db.transaction('store', 'readwrite');
20 var store = tx.objectStore('store');
21 store.add({}, 'k1');
22 store.add({}, 'k1').onerror = t.step_func(function(e) {
23 e.preventDefault();
24 });
25 tx.oncomplete = t.step_func(function() {
26 t.done();
27 });
28 tx.onabort = t.step_func(function() {
29 assert_unreached('transaction should have aborted');
30 });
31 });
32 });
33
34 window.onerror = t.step_func(function(message, url, line, column) {
35 assert_unreached('window.onerror should not be called');
36 });
37 });
38
39 </script>
OLDNEW
« 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