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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 years, 6 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
Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js
new file mode 100644
index 0000000000000000000000000000000000000000..c47843e1e51f22328e39319de7a490e9926164fe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-log-doesnt-run-microtasks.js
@@ -0,0 +1,19 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank(`Check that console.log doesn't run microtasks.`);
+
+ dp.Runtime.onConsoleAPICalled(result => {
+ testRunner.logObject(result.params.args[0]);
+ if (result.params.args[0].value === 'finished')
+ testRunner.completeTest();
+ });
+
+ dp.Runtime.enable();
+ dp.Runtime.evaluate({expression: `
+ (function testFunction() {
+ Promise.resolve().then(function(){ console.log(239); });
+ console.log(42);
+ console.log(43);
+ })()
+ `});
+ dp.Runtime.evaluate({expression: `setTimeout(() => console.log('finished'), 0)`});
+})

Powered by Google App Engine
This is Rietveld 408576698