| 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>
|
|
|