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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html

Issue 2139543002: [DevTools] Report console API calls through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 5 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.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html
new file mode 100644
index 0000000000000000000000000000000000000000..bee521021989d9c61f6d8515c935d04cab9cbf9a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-console-api-repeated-in-console.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+
+function test()
+{
+ var expectedMessages = 4;
+ var messages = [];
+
+ InspectorTest.eventHandler["Runtime.consoleAPICalled"] = consoleAPICalled;
+ InspectorTest.eventHandler["Console.messageAdded"] = messageAdded;
+ InspectorTest.sendCommandOrDie("Runtime.enable", {});
+ InspectorTest.sendCommandOrDie("Console.enable", {});
+ InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "console.log(42)" });
+ InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "console.error('abc')" });
+
+ function consoleAPICalled(result)
+ {
+ messages.push("api call: " + result.params.args[0].value);
+ if (!(--expectedMessages))
+ done();
+ }
+
+ function messageAdded(result)
+ {
+ messages.push("console message: " + result.params.message.text);
+ if (!(--expectedMessages))
+ done();
+ }
+
+ function done()
+ {
+ messages.sort();
+ for (var message of messages)
+ InspectorTest.log(message);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onLoad="runTest();">
+Check that console.log is reported through Console domain as well.
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698