OLD | NEW |
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 that CommandLineAPI is presented only while evaluation."); | 5 InspectorTest.log("Tests that CommandLineAPI is presented only while evaluation.
"); |
6 | 6 |
7 InspectorTest.addScript( | 7 InspectorTest.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 { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |