| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function testFunction() | 7 function testFunction() |
| 8 { | 8 { |
| 9 debugger; | 9 debugger; |
| 10 } | 10 } |
| 11 | 11 |
| 12 var test = function() | 12 var test = function() |
| 13 { | 13 { |
| 14 InspectorTest.addSniffer(WebInspector, "inspect", inspect); | 14 InspectorTest.addSniffer(WebInspector, "inspect", inspect); |
| 15 InspectorTest.addSniffer(WebInspector, "_updateFocusedNode", updateFocusedNo
de); | 15 InspectorTest.addSniffer(WebInspector.Revealer, "reveal", updateFocusedNode)
; |
| 16 | 16 |
| 17 function updateFocusedNode() | 17 function updateFocusedNode(node) |
| 18 { | 18 { |
| 19 if (!(node instanceof WebInspector.DOMNode)) |
| 20 return; |
| 21 |
| 19 InspectorTest.addResult("Selected node id: '" + WebInspector.panels.elem
ents.selectedDOMNode().getAttribute("id") + "'."); | 22 InspectorTest.addResult("Selected node id: '" + WebInspector.panels.elem
ents.selectedDOMNode().getAttribute("id") + "'."); |
| 20 InspectorTest.completeDebuggerTest(); | 23 InspectorTest.completeDebuggerTest(); |
| 21 } | 24 } |
| 22 | 25 |
| 23 function inspect(objectId, hints) | 26 function inspect(objectId, hints) |
| 24 { | 27 { |
| 25 InspectorTest.addResult("WebInspector.inspect called with: " + objectId.
description); | 28 InspectorTest.addResult("WebInspector.inspect called with: " + objectId.
description); |
| 26 InspectorTest.addResult("WebInspector.inspect's hints are: " + JSON.stri
ngify(Object.keys(hints))); | 29 InspectorTest.addResult("WebInspector.inspect's hints are: " + JSON.stri
ngify(Object.keys(hints))); |
| 27 } | 30 } |
| 28 | 31 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 42 </script> | 45 </script> |
| 43 </head> | 46 </head> |
| 44 | 47 |
| 45 <body onload="runTest()"> | 48 <body onload="runTest()"> |
| 46 <p id="p1"> | 49 <p id="p1"> |
| 47 Tests that inspect() command line api works while on breakpoint. | 50 Tests that inspect() command line api works while on breakpoint. |
| 48 </p> | 51 </p> |
| 49 | 52 |
| 50 </body> | 53 </body> |
| 51 </html> | 54 </html> |
| OLD | NEW |