3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/console-test.js"></script>
7 function rightPadding(str
, minLength
)
9 str
+= Array(minLength
).join(" ");
10 return str
.substr(0, minLength
) + str
.substr(minLength
).trim();
15 function printCommandLineAPI()
18 for (var p
in __commandLineAPI
) {
19 if (/^\$(_|\d+)$/.test(p
))
25 properties
.forEach(function(p
) {
26 msgs
.push(rightPadding(p
, 20) + ": " + eval(p
));
28 output("CommandLineAPI\n\n"+ msgs
.join("\n"));
31 InspectorTest
.evaluateInConsole("(" + printCommandLineAPI
+ ")()");
32 InspectorTest
.completeTest();
37 <body onload=
"runTest()">
38 <p>Tests that command-line API methods behave similarly to native code by returning '[Command Line API]' via toString().
</p>