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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.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-api-repeated-in-console.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.js
new file mode 100644
index 0000000000000000000000000000000000000000..0c46e29fea5b22d83b220a9edd3d651f92410f81
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.js
@@ -0,0 +1,30 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank(`Check that console.log is reported through Console domain as well.`);
+
+ var expectedMessages = 4;
+ var messages = [];
+
+ function done() {
+ messages.sort();
+ for (var message of messages)
+ testRunner.log(message);
+ testRunner.completeTest();
+ }
+
+ dp.Runtime.onConsoleAPICalled(result => {
+ messages.push('api call: ' + result.params.args[0].value);
+ if (!(--expectedMessages))
+ done();
+ });
+
+ dp.Console.onMessageAdded(result => {
+ messages.push('console message: ' + result.params.message.text);
+ if (!(--expectedMessages))
+ done();
+ });
+
+ dp.Runtime.enable();
+ dp.Console.enable();
+ dp.Runtime.evaluate({ 'expression': 'console.log(42)' });
+ dp.Runtime.evaluate({ 'expression': `console.error('abc')` });
+})

Powered by Google App Engine
This is Rietveld 408576698