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

Side by Side Diff: test/inspector/runtime/console-deprecated-methods.js

Issue 2713023004: [inspector] added reconnect method for tests (Closed)
Patch Set: rebased Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 print("Tests checks that deprecation messages for console.") 5 InspectorTest.log("Tests checks that deprecation messages for console.")
6 6
7 Protocol.Runtime.onConsoleAPICalled(messageAdded); 7 Protocol.Runtime.onConsoleAPICalled(messageAdded);
8 Protocol.Runtime.enable(); 8 Protocol.Runtime.enable();
9 9
10 var deprecatedMethods = [ 10 var deprecatedMethods = [
11 "console.timeline(\"42\")", 11 "console.timeline(\"42\")",
12 "console.timeline(\"42\")", 12 "console.timeline(\"42\")",
13 "console.timeline(\"42\")", // three calls should produce one warning message 13 "console.timeline(\"42\")", // three calls should produce one warning message
14 "console.timelineEnd(\"42\")", 14 "console.timelineEnd(\"42\")",
15 "console.markTimeline(\"42\")", 15 "console.markTimeline(\"42\")",
16 ]; 16 ];
17 Protocol.Runtime.evaluate({ expression: deprecatedMethods.join(";") }); 17 Protocol.Runtime.evaluate({ expression: deprecatedMethods.join(";") });
18 18
19 var messagesLeft = 3; 19 var messagesLeft = 3;
20 function messageAdded(data) 20 function messageAdded(data)
21 { 21 {
22 var text = data.params.args[0].value; 22 var text = data.params.args[0].value;
23 if (text.indexOf("deprecated") === -1) 23 if (text.indexOf("deprecated") === -1)
24 return; 24 return;
25 InspectorTest.log(text); 25 InspectorTest.log(text);
26 if (!--messagesLeft) 26 if (!--messagesLeft)
27 InspectorTest.completeTest(); 27 InspectorTest.completeTest();
28 } 28 }
OLDNEW
« no previous file with comments | « test/inspector/runtime/console-assert.js ('k') | test/inspector/runtime/console-log-doesnt-run-microtasks.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698