idbobjectstore-transaction-SameObject.any.js (796B)
1 // META: global=window,worker 2 // META: title=IndexedDB: Verify [SameObject] behavior of IDBObjectStore's transaction attribute 3 // META: script=resources/support.js 4 5 // Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-transaction 6 7 'use strict'; 8 9 indexeddb_test( 10 (t, db) => { 11 const store = db.createObjectStore('store'); 12 assert_equals( 13 store.transaction, store.transaction, 14 'Attribute should yield the same object each time'); 15 }, 16 (t, db) => { 17 const tx = db.transaction('store', 'readonly'); 18 const store = tx.objectStore('store'); 19 assert_equals( 20 store.transaction, store.transaction, 21 'Attribute should yield the same object each time'); 22 t.done(); 23 }, 24 'IDBObjectStore.transaction [SameObject]');