Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: LayoutTests/http/tests/inspector/indexeddb/transaction-promise-console.html

Issue 555163005: Deactivate IDBTransactions created within Microtasks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove bogus line, clean up hideous conditional Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/indexeddb/transaction-promise-console-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector/indexeddb/transaction-promise-console.html
diff --git a/LayoutTests/http/tests/inspector/indexeddb/transaction-promise-console.html b/LayoutTests/http/tests/inspector/indexeddb/transaction-promise-console.html
new file mode 100644
index 0000000000000000000000000000000000000000..c2d41a0bfd5aa6685b8122cc3cdbee12afcc4a7d
--- /dev/null
+++ b/LayoutTests/http/tests/inspector/indexeddb/transaction-promise-console.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script>
+function test()
+{
+ testRunner.waitUntilDone();
+ testRunner.showWebInspector();
+ WebInspector.inspectorView.showPanel("console");
+
+ var dbname = location.href;
+ indexedDB.deleteDatabase(dbname).onsuccess = function() {
+
+ var openRequest = indexedDB.open(dbname);
+ openRequest.onupgradeneeded = function() {
+ openRequest.result.createObjectStore('store');
+ };
+ openRequest.onsuccess = function(event) {
+ var db = event.target.result;
+ Promise.resolve().then(function() {
+ tx = db.transaction('store');
+ InspectorTest.evaluateInConsole("1 + 2");
+ try {
+ tx.objectStore('store').get(0);
+ InspectorTest.addResult("PASS: Transaction is still active");
+ } catch (ex) {
+ InspectorTest.addResult("FAIL: " + ex.message);
+ } finally {
+ InspectorTest.completeTest();
+ }
+ });
+ };
+ };
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Ensure transactions created within Promise callbacks are not deactivated due to console activity</p>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/indexeddb/transaction-promise-console-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698