OLD | NEW |
| (Empty) |
1 // Copyright 2016 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 print("Tests checks that deprecation messages for console.") | |
6 | |
7 InspectorTest.eventHandler["Runtime.consoleAPICalled"] = messageAdded; | |
8 InspectorTest.sendCommand("Runtime.enable", {}); | |
9 | |
10 var deprecatedMethods = [ | |
11 "console.timeline(\"42\")", | |
12 "console.timeline(\"42\")", | |
13 "console.timeline(\"42\")", // three calls should produce one warning message | |
14 "console.timelineEnd(\"42\")", | |
15 "console.markTimeline(\"42\")", | |
16 ]; | |
17 InspectorTest.sendCommand("Runtime.evaluate", { expression: deprecatedMethods.jo
in(";") }); | |
18 | |
19 var messagesLeft = 3; | |
20 function messageAdded(data) | |
21 { | |
22 var text = data.params.args[0].value; | |
23 if (text.indexOf("deprecated") === -1) | |
24 return; | |
25 InspectorTest.log(text); | |
26 if (!--messagesLeft) | |
27 InspectorTest.completeTest(); | |
28 } | |
OLD | NEW |