3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/console-test.js"></script>
5 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
8 function testFunction()
15 InspectorTest
.addSniffer(WebInspector
.Main
.prototype, "inspect", inspect
);
16 InspectorTest
.addSniffer(WebInspector
.Revealer
, "revealPromise", oneRevealPromise
, true);
18 function oneRevealPromise(node
, revealPromise
)
20 if (!(node
instanceof WebInspector
.RemoteObject
))
22 revealPromise
.then(updateFocusedNode
);
25 function updateFocusedNode()
27 InspectorTest
.addResult("Selected node id: '" + WebInspector
.panels
.elements
.selectedDOMNode().getAttribute("id") + "'.");
28 InspectorTest
.completeDebuggerTest();
31 function inspect(objectId
, hints
)
33 InspectorTest
.addResult("WebInspector.inspect called with: " + objectId
.description
);
34 InspectorTest
.addResult("WebInspector.inspect's hints are: " + JSON
.stringify(Object
.keys(hints
)));
37 InspectorTest
.startDebuggerTest(step1
);
41 InspectorTest
.runTestFunctionAndWaitUntilPaused(step2
);
44 function step2(callFrames
)
46 InspectorTest
.evaluateInConsoleAndDump("inspect($('#p1'))");
53 <body onload=
"runTest()">
55 Tests that inspect() command line api works while on breakpoint.