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

Side by Side Diff: test/inspector/runtime/clear-of-command-line-api.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 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 InspectorTest.log("Tests that CommandLineAPI is presented only while evaluation. "); 5 let {session, contextGroup, Protocol} = InspectorTest.start("Tests that CommandL ineAPI is presented only while evaluation.");
6 6
7 InspectorTest.addScript( 7 contextGroup.addScript(
8 ` 8 `
9 var methods = ["dir","dirxml","profile","profileEnd","clear","table","keys","val ues","debug","undebug","monitor","unmonitor","inspect","copy"]; 9 var methods = ["dir","dirxml","profile","profileEnd","clear","table","keys","val ues","debug","undebug","monitor","unmonitor","inspect","copy"];
10 var window = this; 10 var window = this;
11 function presentedAPIMethods() 11 function presentedAPIMethods()
12 { 12 {
13 var methodCount = 0; 13 var methodCount = 0;
14 for (var method of methods) { 14 for (var method of methods) {
15 try { 15 try {
16 if (eval("window." + method + "&&" + method + ".toString ? " + metho d + ".toString().indexOf(\\"[Command Line API]\\") !== -1 : false")) 16 if (eval("window." + method + "&&" + method + ".toString ? " + metho d + ".toString().indexOf(\\"[Command Line API]\\") !== -1 : false"))
17 ++methodCount; 17 ++methodCount;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 .then(() => evaluate("presentedAPIMethods()", false)) 108 .then(() => evaluate("presentedAPIMethods()", false))
109 .then((result) => InspectorTest.logMessage(result)); 109 .then((result) => InspectorTest.logMessage(result));
110 } 110 }
111 111
112 function dumpDir() 112 function dumpDir()
113 { 113 {
114 // Should always be presented. 114 // Should always be presented.
115 return evaluate("dir", false) 115 return evaluate("dir", false)
116 .then((result) => InspectorTest.logMessage(result)); 116 .then((result) => InspectorTest.logMessage(result));
117 } 117 }
OLDNEW
« no previous file with comments | « test/inspector/runtime/call-function-on-async.js ('k') | test/inspector/runtime/clear-of-command-line-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698