blob: 25587d2882cf74ef0a57e535173a805c6f341b1e [file] [log] [blame]
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<script>
testRunner.setDumpConsoleMessages(false);
function test()
{
InspectorTest.eventHandler["Runtime.consoleAPICalled"] = messageAdded;
InspectorTest.sendCommand("Runtime.enable", {});
var deprecatedMethods = [
"console.timeline(\"42\")",
"console.timeline(\"42\")",
"console.timeline(\"42\")", // three calls should produce one warning message
"console.timelineEnd(\"42\")",
"console.markTimeline(\"42\")",
];
InspectorTest.sendCommand("Runtime.evaluate", { expression: deprecatedMethods.join(";") });
var messagesLeft = 3;
function messageAdded(data)
{
var text = data.params.args[0].value;
if (text.indexOf("deprecated") === -1)
return;
InspectorTest.log(text);
if (!--messagesLeft)
InspectorTest.completeTest();
}
}
</script>
</head>
<body onload="runTest()">Tests checks that deprecation messages for console.</body>
</html>