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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html

Issue 2538343002: De-flake IndexedDB layout tests. (Closed)
Patch Set: Rebased. Created 4 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: third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html b/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
index 5de8ed6a16e4a04591e66a9b003ea755daba0d0a..490019d8cefb1944d88060633f2a06070150b8e5 100644
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
@@ -11,17 +11,18 @@ indexeddb_test(
(t, db, req) => {
db.createObjectStore('s');
- req.transaction.abort();
- req.onerror = null;
+ req.transaction.onabort = () => {
+ setTimeout(t.step_func(() => {
+ assert_throws(
+ 'InvalidStateError', () => { db.createObjectStore('s2'); },
+ '"running an upgrade transaction" check (InvalidStateError) ' +
+ 'should precede "not active" check (TransactionInactiveError)');
- setTimeout(t.step_func(() => {
- assert_throws(
- 'InvalidStateError', () => { db.createObjectStore('s2'); },
- '"running an upgrade transaction" check (InvalidStateError) ' +
- 'should precede "not active" check (TransactionInactiveError)');
-
- t.done();
- }), 0);
+ t.done();
+ }), 0);
+ };
+ req.onerror = null;
+ req.transaction.abort();
},
(t, db) => { t.assert_unreached('open should fail'); },
'IDBDatabase.createObjectStore exception order: ' +
@@ -32,8 +33,8 @@ indexeddb_test(
(t, db, req) => {
const store = db.createObjectStore('s');
- req.transaction.abort();
req.onerror = null;
+ req.transaction.abort();
assert_throws(
'TransactionInactiveError',

Powered by Google App Engine
This is Rietveld 408576698