Commit c6c814b4 authored by pwnall's avatar pwnall Committed by Commit bot

De-flake IndexedDB layout tests.

Per the IndexedDB specification, a versionchange transaction is running
until the open request's transaction member is set to null, which
should happen (synchronously) after the onabort() event handler is
called. Therefore, tests can only assume that a transaction stopped
running after the onabort event handler has occurred.

BUG=657968

Review-Url: https://codereview.chromium.org/2538343002
Cr-Commit-Position: refs/heads/master@{#437974}
parent d1ba845f
......@@ -1895,8 +1895,6 @@ crbug.com/664873 virtual/mojo-loading/http/tests/xmlhttprequest/small-chunks-res
crbug.com/660295 inspector/elements/elements-panel-restore-selection-when-node-comes-later.html [ Pass Failure ]
crbug.com/657968 storage/indexeddb/idbdatabase-createObjectStore-exception-order.html [ Pass Failure ]
crbug.com/657968 storage/indexeddb/idbdatabase-deleteObjectStore-exception-order.html [ Pass Failure ]
crbug.com/667236 fast/forms/select/menulist-appearance-basic.html [ NeedsRebaseline ]
crbug.com/667236 [ Linux ] fast/forms/select/basic-selects.html [ NeedsRebaseline ]
crbug.com/667236 [ Linux ] fast/forms/select/select-autofilled.html [ NeedsRebaseline ]
......
......@@ -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',
......
......@@ -10,15 +10,17 @@
indexeddb_test(
(t, db, req) => {
db.createObjectStore('s');
req.transaction.abort();
req.transaction.onabort = () => {
setTimeout(t.step_func(() => {
assert_throws(
'InvalidStateError', () => { db.deleteObjectStore('s'); },
'"running an upgrade transaction" check (InvalidStateError) ' +
'should precede "not active" check (TransactionInactiveError)');
t.done();
}), 0);
};
req.onerror = null;
setTimeout(t.step_func(() => {
assert_throws(
'InvalidStateError', () => { db.deleteObjectStore('s'); },
'"running an upgrade transaction" check (InvalidStateError) ' +
'should precede "not active" check (TransactionInactiveError)');
t.done();
}), 0);
req.transaction.abort();
},
(t, db) => { t.assert_unreached('open should fail'); },
'IDBDatabase.deleteObjectStore exception order: ' +
......@@ -27,8 +29,8 @@ indexeddb_test(
indexeddb_test(
(t, db, req) => {
req.transaction.abort();
req.onerror = null;
req.transaction.abort();
assert_throws(
'TransactionInactiveError', () => { db.deleteObjectStore('nope'); },
'"not active" check (TransactionInactiveError) should precede ' +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment