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 var length = 123; |
| 10 var a = [1, 2, 3]; |
| 11 if (a.length) { |
| 12 var b = 42; |
| 13 console.log(a.length); |
| 14 debugger; |
| 15 return b; |
| 16 } |
| 17 } |
| 18 |
| 19 var test = function() |
| 20 { |
| 21 InspectorTest.startDebuggerTest(step1, true); |
| 22 |
| 23 function step1() |
| 24 { |
| 25 InspectorTest.addSnifferPromise(WebInspector.JavaScriptSourceFrame.proto
type, "_renderDecorations").then(step2); |
| 26 InspectorTest.runTestFunctionAndWaitUntilPaused(); |
| 27 } |
| 28 |
| 29 function step2() |
| 30 { |
| 31 var currentFrame = WebInspector.panels.sources.visibleView; |
| 32 var decorations = currentFrame.textEditor._decorations; |
| 33 for (var line of decorations.keysArray()) { |
| 34 var lineDecorations = Array.from(decorations.get(line)).map(decorati
on => decoration.element.textContent).join(", "); |
| 35 InspectorTest.addResult(`${line + 1}: ${lineDecorations}`); |
| 36 } |
| 37 InspectorTest.completeDebuggerTest(); |
| 38 } |
| 39 } |
| 40 |
| 41 </script> |
| 42 </head> |
| 43 <body onload="runTest()"> |
| 44 <p>Tests that inline scope variables are rendering correctly.</p> |
| 45 </body> |
| 46 </html> |
OLD | NEW |