| 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, "_updateFocusedNode", step2); | 38 InspectorTest.addSniffer(WebInspector.Revealer, "reveal", step2); |
| 39 evalAndDump("inspect($('#p1'))"); | 39 evalAndDump("inspect($('#p1'))"); |
| 40 | 40 |
| 41 function step2() | 41 function step2(node) |
| 42 { | 42 { |
| 43 if (!(node instanceof WebInspector.DOMNode)) |
| 44 return; |
| 45 |
| 43 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") + "'."); |
| 44 next(); | 47 next(); |
| 45 } | 48 } |
| 46 } | 49 } |
| 47 ]); | 50 ]); |
| 48 } | 51 } |
| 49 | 52 |
| 50 </script> | 53 </script> |
| 51 </head> | 54 </head> |
| 52 | 55 |
| 53 <body onload="onload()"> | 56 <body onload="onload()"> |
| 54 <p id="p1"> | 57 <p id="p1"> |
| 55 Tests that inspect() command line api works. | 58 Tests that inspect() command line api works. |
| 56 </p> | 59 </p> |
| 57 | 60 |
| 58 </body> | 61 </body> |
| 59 </html> | 62 </html> |
| OLD | NEW |