3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
7 function testFunction()
11 var b
= [1, 2, 3, 4, 5];
12 var c
= new Array(100); c
[10] = 1;
21 InspectorTest
.startDebuggerTest(runTestFunction
);
22 InspectorTest
.setQuiet(true);
26 function runTestFunction()
28 InspectorTest
.addSniffer(WebInspector
.JavaScriptSourceFrame
.prototype, "setExecutionLocation", onSetExecutionLocation
);
29 InspectorTest
.evaluateInPage("setTimeout(testFunction, 0)");
32 function onSetExecutionLocation(uiLocation
)
34 InspectorTest
.runAfterPendingDispatches(dumpAndContinue
.bind(null, this.textEditor
, uiLocation
.lineNumber
));
37 function dumpAndContinue(textEditor
, lineNumber
)
39 InspectorTest
.addResult("=========== 8< ==========");
40 for (var i
= 8; i
< 18; ++i
) {
41 var output
= ["[" + (i
< 10 ? " " : "") + i
+ "]"];
42 output
.push(i
== lineNumber
? ">" : " ");
43 output
.push(textEditor
.line(i
));
45 for (var element
of textEditor
._elementToWidget
.keys()) {
46 if (i
=== element
.__lineNumber
)
47 output
.push(element
.deepTextContent());
49 InspectorTest
.addResult(output
.join(" "));
52 InspectorTest
.addSniffer(WebInspector
.JavaScriptSourceFrame
.prototype, "setExecutionLocation", onSetExecutionLocation
);
54 WebInspector
.panels
.sources
._stepOverButton
.element
.click();
56 InspectorTest
.completeDebuggerTest();
63 <body onload=
"runTest()">
65 Tests inline values rendering in the sources panel.