| OLD | NEW | 
| (Empty) |  | 
 |   1 <!DOCTYPE html> | 
 |   2 <script src="../../fast/js/resources/js-test-pre.js"></script> | 
 |   3 <script src="resources/shared.js"></script> | 
 |   4 <script> | 
 |   5  | 
 |   6 description("Ensure IndexedDB transactions created before open onsuccess have co
    rrect metadata"); | 
 |   7  | 
 |   8 indexedDBTest(prepareDatabase, onOpenSuccess); | 
 |   9 function prepareDatabase(evt) | 
 |  10 { | 
 |  11     preamble(evt); | 
 |  12     evalAndLog("db = event.target.result"); | 
 |  13     evalAndLog("store = db.createObjectStore('store')"); | 
 |  14     evalAndLog("store.createIndex('index', 'keyPath')"); | 
 |  15     evalAndLog("transaction = event.target.transaction"); | 
 |  16     shouldNotThrow("index = transaction.objectStore('store').index('index')"); | 
 |  17     transaction.oncomplete = onTransactionComplete; | 
 |  18 } | 
 |  19  | 
 |  20 function onTransactionComplete(evt) | 
 |  21 { | 
 |  22     preamble(evt); | 
 |  23     debug("In multiprocess mode, 'complete' event may be dispatched before\n" + | 
 |  24           "the 'success' arrives with updated metadata. Ensure the new metadata\
    n" + | 
 |  25           "is still used for transactions."); | 
 |  26     evalAndLog("store = db.transaction('store').objectStore('store')"); | 
 |  27     shouldNotThrow("index = store.index('index')"); | 
 |  28 } | 
 |  29  | 
 |  30 function onOpenSuccess(evt) | 
 |  31 { | 
 |  32     preamble(evt); | 
 |  33     evalAndLog("db = event.target.result"); | 
 |  34     evalAndLog("store = db.transaction('store').objectStore('store')"); | 
 |  35     shouldNotThrow("index = store.index('index')"); | 
 |  36     finishJSTest(); | 
 |  37 } | 
 |  38  | 
 |  39 </script> | 
 |  40 <script src="../../fast/js/resources/js-test-post.js"></script> | 
| OLD | NEW |