OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../inspector-test.js"></script> |
| 4 <script> |
| 5 function test() |
| 6 { |
| 7 testRunner.waitUntilDone(); |
| 8 testRunner.showWebInspector(); |
| 9 WebInspector.inspectorView.showPanel("console"); |
| 10 |
| 11 var dbname = location.href; |
| 12 indexedDB.deleteDatabase(dbname).onsuccess = function() { |
| 13 |
| 14 var openRequest = indexedDB.open(dbname); |
| 15 openRequest.onupgradeneeded = function() { |
| 16 openRequest.result.createObjectStore('store'); |
| 17 }; |
| 18 openRequest.onsuccess = function(event) { |
| 19 var db = event.target.result; |
| 20 Promise.resolve().then(function() { |
| 21 tx = db.transaction('store'); |
| 22 InspectorTest.evaluateInConsole("1 + 2"); |
| 23 try { |
| 24 tx.objectStore('store').get(0); |
| 25 InspectorTest.addResult("PASS: Transaction is still active")
; |
| 26 } catch (ex) { |
| 27 InspectorTest.addResult("FAIL: " + ex.message); |
| 28 } finally { |
| 29 InspectorTest.completeTest(); |
| 30 } |
| 31 }); |
| 32 }; |
| 33 }; |
| 34 } |
| 35 |
| 36 </script> |
| 37 </head> |
| 38 <body onload="runTest()"> |
| 39 <p>Ensure transactions created within Promise callbacks are not deactivated due
to console activity</p> |
| 40 </body> |
| 41 </html> |
OLD | NEW |