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