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

Side by Side Diff: LayoutTests/storage/indexeddb/error-attributes.html

Issue 1182233003: IndexedDB: Replace use of DOMError with DOMException (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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 | « no previous file | Source/modules/indexeddb/IDBDatabase.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: Error attributes are DOMExceptions</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="resources/testharness-helpers.js"></script>
6 <script>
7 indexeddb_test(
8 function(t, db) {
9 db.createObjectStore('store');
10 },
11 function(t, db) {
12 var tx = db.transaction('store', 'readwrite');
13 var store = tx.objectStore('store');
14 var r1 = store.add('value', 'key');
15 r1.onerror = t.unreached_func('first add should succeed');
16
17 var r2 = store.add('value', 'key');
18 r2.onsuccess = t.unreached_func('second add should fail');
19
20 r2.onerror = t.step_func(function() {
21 assert_true(r2.error instanceof DOMException);
22 assert_equals(r2.error.name, 'ConstraintError');
23 });
24
25 tx.oncomplete = t.unreached_func('transaction should not complete');
26 tx.onabort = t.step_func(function() {
27 assert_true(tx.error instanceof DOMException);
28 assert_equals(tx.error.name, 'ConstraintError');
29 t.done();
30 });
31 },
32 'IDBRequest and IDBTransaction error properties should be DOMExceptions'
33 );
34 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/modules/indexeddb/IDBDatabase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698