9304ec042dda7a3f4f4a8500fa2dc96f1e60b82c
[WebKit-https.git] / LayoutTests / inspector / console / command-line-api.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script>
6
7 var test = function()
8 {
9     var expressions = [
10         "$0.toString()",
11         "keys([3,4]).toString()",
12         "values([3,4]).toString()",
13         "$('foo').toString()",
14         "$$('p#foo').toString()"
15     ];
16
17     InspectorTest.selectNodeWithId("foo", step1);
18
19     function step1(node)
20     {
21         if (!expressions.length) {
22             InspectorTest.completeTest();
23             return;
24         }
25         var expression = expressions[0];
26         expressions.splice(0, 1);
27         InspectorTest.evaluateInConsoleAndDump(expression, step1);
28     }
29 }
30
31 </script>
32 </head>
33
34 <body onload="runTest()">
35 <p id="foo">
36 Tests that command line api works.
37 </p>
38
39 </body>
40 </html>