idbtransaction-objectStore-finished.any.js (642B)
1 // META: global=window,worker 2 // META: title=IndexedDB: IDBTransaction objectStore() when transaction is finished 3 // META: script=resources/support.js 4 5 // Spec: https://w3c.github.io/IndexedDB/#dom-idbtransaction-objectstore 6 7 'use strict'; 8 9 indexeddb_test( 10 (t, db) => { 11 db.createObjectStore('store'); 12 }, 13 (t, db) => { 14 const tx = db.transaction('store', 'readonly'); 15 tx.abort(); 16 assert_throws_dom('InvalidStateError', () => tx.objectStore('store'), 17 'objectStore() should throw if transaction is finished'); 18 t.done(); 19 }, 20 'IDBTransaction objectStore() behavior when transaction is finished' 21 );