Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbdatabase-createObjectStore-exception-order.htm |
| diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbdatabase-createObjectStore-exception-order.htm |
| similarity index 81% |
| rename from third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html |
| rename to third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbdatabase-createObjectStore-exception-order.htm |
| index 490019d8cefb1944d88060633f2a06070150b8e5..204da30f08885ce737c21f24fa2ae6fdf5d6eb1d 100644 |
| --- a/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html |
| +++ b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbdatabase-createObjectStore-exception-order.htm |
| @@ -2,16 +2,16 @@ |
| <title>IndexedDB: IDBDatabase createObjectStore() Exception Ordering</title> |
| <meta charset=utf-8> |
| <link rel="help" href="https://w3c.github.io/IndexedDB/#dom-idbdatabase-createobjectstore"> |
| -<script src="../../resources/testharness.js"></script> |
| -<script src="../../resources/testharnessreport.js"></script> |
| -<script src="resources/testharness-helpers.js"></script> |
| +<script src="/resources/testharness.js"></script> |
| +<script src="/resources/testharnessreport.js"></script> |
| +<script src="support.js"></script> |
| <script> |
| indexeddb_test( |
| - (t, db, req) => { |
| + (t, db, txn) => { |
| db.createObjectStore('s'); |
| - req.transaction.onabort = () => { |
| + txn.onabort = () => { |
| setTimeout(t.step_func(() => { |
| assert_throws( |
| 'InvalidStateError', () => { db.createObjectStore('s2'); }, |
| @@ -21,8 +21,7 @@ indexeddb_test( |
| t.done(); |
| }), 0); |
| }; |
| - req.onerror = null; |
| - req.transaction.abort(); |
| + txn.abort(); |
| }, |
| (t, db) => { t.assert_unreached('open should fail'); }, |
| 'IDBDatabase.createObjectStore exception order: ' + |
| @@ -30,11 +29,11 @@ indexeddb_test( |
| ); |
| indexeddb_test( |
| - (t, db, req) => { |
| + (t, db, txn) => { |
| const store = db.createObjectStore('s'); |
| - req.onerror = null; |
| - req.transaction.abort(); |
| + txn.onerror = null; |
|
jsbell
2017/01/26 19:27:29
Is txn.onerror set or was this an accidental conve
pwnall
2017/01/27 00:01:52
Accidental. Thanks for catching this!
|
| + txn.abort(); |
| assert_throws( |
| 'TransactionInactiveError', |
| @@ -67,8 +66,7 @@ indexeddb_test( |
| (t, db) => { |
| db.createObjectStore('s'); |
| assert_throws('ConstraintError', () => { |
| - db.createObjectStore('s', {autoIncrement: true, |
| - keyPath: ''}); |
| + db.createObjectStore('s', {autoIncrement: true, keyPath: ''}); |
| }, '"already exists" check (ConstraintError) should precede ' + |
| '"autoIncrement vs. keyPath" check (InvalidAccessError)'); |
| t.done(); |