OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="inspector-test.js"></script> | 3 <script src="inspector-test.js"></script> |
4 <script src="console-test.js"></script> | 4 <script src="console-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function onload() | 7 function onload() |
8 { | 8 { |
9 runTest(); | 9 runTest(); |
10 } | 10 } |
(...skipping 17 matching lines...) Expand all Loading... |
28 text = text.replace(/Test of session.*/, "Test of session storage...
"); | 28 text = text.replace(/Test of session.*/, "Test of session storage...
"); |
29 InspectorTest.addResult(expression + " = " + text); | 29 InspectorTest.addResult(expression + " = " + text); |
30 if (next) | 30 if (next) |
31 next(); | 31 next(); |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 InspectorTest.runTestSuite([ | 35 InspectorTest.runTestSuite([ |
36 function testRevealElement(next) | 36 function testRevealElement(next) |
37 { | 37 { |
38 InspectorTest.addSniffer(WebInspector.Revealer, "reveal", step2); | 38 InspectorTest.addSniffer(WebInspector.Revealer, "reveal", step2, tru
e); |
39 evalAndDump("inspect($('#p1'))"); | 39 evalAndDump("inspect($('#p1'))"); |
40 | 40 |
41 function step2(node) | 41 function step2(node) |
42 { | 42 { |
43 if (!(node instanceof WebInspector.DOMNode)) | 43 if (!(node instanceof WebInspector.DOMNode)) |
44 return; | 44 return; |
45 | 45 |
46 InspectorTest.addResult("Selected node id: '" + WebInspector.pan
els.elements.selectedDOMNode().getAttribute("id") + "'."); | 46 InspectorTest.addResult("Selected node id: '" + WebInspector.pan
els.elements.selectedDOMNode().getAttribute("id") + "'."); |
47 next(); | 47 next(); |
48 } | 48 } |
49 } | 49 } |
50 ]); | 50 ]); |
51 } | 51 } |
52 | 52 |
53 </script> | 53 </script> |
54 </head> | 54 </head> |
55 | 55 |
56 <body onload="onload()"> | 56 <body onload="onload()"> |
57 <p id="p1"> | 57 <p id="p1"> |
58 Tests that inspect() command line api works. | 58 Tests that inspect() command line api works. |
59 </p> | 59 </p> |
60 | 60 |
61 </body> | 61 </body> |
62 </html> | 62 </html> |
OLD | NEW |