Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-ui / debugger-inline-values.html
blob67a451f3efa70fa7067be5e38adb8234cd322275
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
7 function testFunction()
9 debugger;
10 var a = { k: 1 };
11 var b = [1, 2, 3, 4, 5];
12 var c = new Array(100); c[10] = 1;
13 a.k = 2;
14 a.l = window;
15 b[1]++;
16 b[2] = document.body;
19 function test()
21 InspectorTest.startDebuggerTest(runTestFunction);
22 InspectorTest.setQuiet(true);
24 var stepCount = 0;
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));
44 output.push("\t");
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);
53 if (++stepCount < 10)
54 WebInspector.panels.sources._stepOverButton.element.click();
55 else
56 InspectorTest.completeDebuggerTest();
60 </script>
61 </head>
63 <body onload="runTest()">
64 <p>
65 Tests inline values rendering in the sources panel.
66 </p>
68 </body>
69 </html>