| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../http/tests/inspector/inspector-test2.js"></script> | 3 <script src="../http/tests/inspector/inspector-test2.js"></script> |
| 4 <script src="../http/tests/inspector/debugger-test2.js"></script> | 4 <script src="../http/tests/inspector/debugger-test2.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function makeClosure(n) { | 7 function makeClosure(n) { |
| 8 var makeClosureLocalVar = 'local.' + n; | 8 var makeClosureLocalVar = 'local.' + n; |
| 9 return function innerFunction(x) { | 9 return function innerFunction(x) { |
| 10 var innerFunctionLocalVar = x + 2; | 10 var innerFunctionLocalVar = x + 2; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 function step1() | 28 function step1() |
| 29 { | 29 { |
| 30 InspectorTest.evaluateInConsole(scriptToEvaluate, InspectorTest.addResul
t.bind(InspectorTest, "Evaluated script in console.")); | 30 InspectorTest.evaluateInConsole(scriptToEvaluate, InspectorTest.addResul
t.bind(InspectorTest, "Evaluated script in console.")); |
| 31 InspectorTest.waitUntilPaused(step2); | 31 InspectorTest.waitUntilPaused(step2); |
| 32 } | 32 } |
| 33 | 33 |
| 34 function step2() | 34 function step2() |
| 35 { | 35 { |
| 36 // Expand all but global scopes. Expanding global scope takes for too lo
ng | 36 // Expand all but global scopes. Expanding global scope takes for too lo
ng |
| 37 // so we keep it collapsed. | 37 // so we keep it collapsed. |
| 38 var sections = WebInspector.currentPanel.sidebarPanes.scopechain.section
s; | 38 var sections = WebInspector.currentPanel.sidebarPanes.scopechain._sectio
ns; |
| 39 // global scope is always the last one. | 39 // global scope is always the last one. |
| 40 for (var i = 0; i < sections.length - 1; i++) | 40 for (var i = 0; i < sections.length - 1; i++) |
| 41 sections[i].expand(); | 41 sections[i].expand(); |
| 42 InspectorTest.runAfterPendingDispatches(step3); | 42 InspectorTest.runAfterPendingDispatches(step3); |
| 43 } | 43 } |
| 44 | 44 |
| 45 function step3() | 45 function step3() |
| 46 { | 46 { |
| 47 var sections = WebInspector.currentPanel.sidebarPanes.scopechain.section
s; | 47 var sections = WebInspector.currentPanel.sidebarPanes.scopechain._sectio
ns; |
| 48 InspectorTest.addResult(""); | 48 InspectorTest.addResult(""); |
| 49 InspectorTest.addResult("Dump scope sections:"); | 49 InspectorTest.addResult("Dump scope sections:"); |
| 50 for (var i = 0; i < sections.length; i++) { | 50 for (var i = 0; i < sections.length; i++) { |
| 51 var section = sections[i]; | 51 var section = sections[i]; |
| 52 InspectorTest.addResult("- " + section.headerElement.textContent); | 52 InspectorTest.addResult("- " + section.headerElement.textContent); |
| 53 if (!section.expanded) { | 53 if (!section.expanded) { |
| 54 InspectorTest.addResult(" <section collapsed>"); | 54 InspectorTest.addResult(" <section collapsed>"); |
| 55 continue; | 55 continue; |
| 56 } | 56 } |
| 57 var properties = section.propertiesForTest; | 57 var properties = section.propertiesForTest; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 72 </head> | 72 </head> |
| 73 | 73 |
| 74 <body onload="runTest()"> | 74 <body onload="runTest()"> |
| 75 <input type='button' onclick='testFunction()' value='Test'/> | 75 <input type='button' onclick='testFunction()' value='Test'/> |
| 76 <p> | 76 <p> |
| 77 Test that sections representing scopes of the current call frame are expandable | 77 Test that sections representing scopes of the current call frame are expandable |
| 78 and contain correct data. | 78 and contain correct data. |
| 79 </p> | 79 </p> |
| 80 </body> | 80 </body> |
| 81 </html> | 81 </html> |
| OLD | NEW |