| OLD | NEW |
| 1 if (this.importScripts) { | 1 if (this.importScripts) { |
| 2 importScripts('../../../resources/js-test.js'); | 2 importScripts('../../../resources/js-test.js'); |
| 3 importScripts('shared.js'); | 3 importScripts('shared.js'); |
| 4 } | 4 } |
| 5 | 5 |
| 6 description("Test event propogation on IDBTransaction."); | 6 description("Test event propogation on IDBTransaction."); |
| 7 | 7 |
| 8 indexedDBTest(prepareDatabase, startTest); | 8 indexedDBTest(prepareDatabase, startTest); |
| 9 function prepareDatabase() | 9 function prepareDatabase() |
| 10 { | 10 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 debug("Verifing abort"); | 21 debug("Verifing abort"); |
| 22 trans = evalAndLog("trans = db.transaction(['storeName'], 'readwrite')"); | 22 trans = evalAndLog("trans = db.transaction(['storeName'], 'readwrite')"); |
| 23 evalAndLog("trans.onabort = abortFiredCallback"); | 23 evalAndLog("trans.onabort = abortFiredCallback"); |
| 24 evalAndLog("trans.oncomplete = unexpectedAbortCallback"); | 24 evalAndLog("trans.oncomplete = unexpectedAbortCallback"); |
| 25 evalAndLog("db.addEventListener('abort', dbAbortCaptureCallback, true)"); | 25 evalAndLog("db.addEventListener('abort', dbAbortCaptureCallback, true)"); |
| 26 evalAndLog("db.addEventListener('abort', dbAbortBubbleCallback, false)"); | 26 evalAndLog("db.addEventListener('abort', dbAbortBubbleCallback, false)"); |
| 27 evalAndLog("db.addEventListener('complete', unexpectedCompleteCallback, true
)"); | 27 evalAndLog("db.addEventListener('complete', unexpectedCompleteCallback, true
)"); |
| 28 evalAndLog("db.addEventListener('complete', unexpectedCompleteCallback, fals
e)"); | 28 evalAndLog("db.addEventListener('complete', unexpectedCompleteCallback, fals
e)"); |
| 29 store = evalAndLog("store = trans.objectStore('storeName')"); | 29 store = evalAndLog("store = trans.objectStore('storeName')"); |
| 30 evalAndLog("store.add({x: 'value', y: 'zzz'}, 'key')"); | 30 evalAndLog("store.add({x: 'value', y: 'zzz'}, 'key')"); |
| 31 expectError(); |
| 31 dbCaptureFired = false; | 32 dbCaptureFired = false; |
| 32 abortFired = false; | 33 abortFired = false; |
| 33 dbBubbleFired1 = false; | 34 dbBubbleFired1 = false; |
| 34 } | 35 } |
| 35 | 36 |
| 36 function dbAbortCaptureCallback() | 37 function dbAbortCaptureCallback() |
| 37 { | 38 { |
| 38 debug(""); | 39 debug(""); |
| 39 debug("In IDBDatabase abort capture"); | 40 debug("In IDBDatabase abort capture"); |
| 40 shouldBeFalse("dbCaptureFired"); | 41 shouldBeFalse("dbCaptureFired"); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 finishJSTest(); | 114 finishJSTest(); |
| 114 } | 115 } |
| 115 | 116 |
| 116 function dbCompleteBubbleCallback() | 117 function dbCompleteBubbleCallback() |
| 117 { | 118 { |
| 118 debug(""); | 119 debug(""); |
| 119 debug("In IDBDatabase complete bubble"); | 120 debug("In IDBDatabase complete bubble"); |
| 120 testFailed("Complete bubble callback should NOT fire"); | 121 testFailed("Complete bubble callback should NOT fire"); |
| 121 dbBubbleFired2 = true; | 122 dbBubbleFired2 = true; |
| 122 } | 123 } |
| OLD | NEW |