| OLD | NEW |
| (Empty) |
| 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> | |
| 6 | |
| 7 function testFunction() | |
| 8 { | |
| 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; | |
| 17 } | |
| 18 | |
| 19 function test() | |
| 20 { | |
| 21 InspectorTest.startDebuggerTest(runTestFunction); | |
| 22 InspectorTest.setQuiet(true); | |
| 23 | |
| 24 var stepCount = 0; | |
| 25 | |
| 26 function runTestFunction() | |
| 27 { | |
| 28 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prototype, "
setExecutionLocation", onSetExecutionLocation); | |
| 29 InspectorTest.evaluateInPage("setTimeout(testFunction, 0)"); | |
| 30 } | |
| 31 | |
| 32 function onSetExecutionLocation(uiLocation) | |
| 33 { | |
| 34 InspectorTest.runAfterPendingDispatches(dumpAndContinue.bind(null, this.
textEditor, uiLocation.lineNumber)); | |
| 35 } | |
| 36 | |
| 37 function dumpAndContinue(textEditor, lineNumber) | |
| 38 { | |
| 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()); | |
| 48 } | |
| 49 InspectorTest.addResult(output.join(" ")); | |
| 50 } | |
| 51 | |
| 52 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prototype, "
setExecutionLocation", onSetExecutionLocation); | |
| 53 if (++stepCount < 10) | |
| 54 WebInspector.panels.sources._stepOverButton.element.click(); | |
| 55 else | |
| 56 InspectorTest.completeDebuggerTest(); | |
| 57 } | |
| 58 } | |
| 59 | |
| 60 </script> | |
| 61 </head> | |
| 62 | |
| 63 <body onload="runTest()"> | |
| 64 <p> | |
| 65 Tests inline values rendering in the sources panel. | |
| 66 </p> | |
| 67 | |
| 68 </body> | |
| 69 </html> | |
| OLD | NEW |