| 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 makeClosure(n) | |
| 8 { | |
| 9 var makeClosureLocalVar = "local." + n; | |
| 10 return function innerFunction(x) | |
| 11 { | |
| 12 var innerFunctionLocalVar = x + 2; | |
| 13 var negInf = -Infinity; | |
| 14 var negZero = 1 / negInf; | |
| 15 try { | |
| 16 throw new Error("An exception"); | |
| 17 } catch (e) { | |
| 18 e.toString(); | |
| 19 debugger; | |
| 20 } | |
| 21 return n + makeClosureLocalVar + x + innerFunctionLocalVar; | |
| 22 } | |
| 23 } | |
| 24 | |
| 25 function testFunction() | |
| 26 { | |
| 27 var f = makeClosure("TextParam"); | |
| 28 f(2010); | |
| 29 } | |
| 30 | |
| 31 function test() | |
| 32 { | |
| 33 InspectorTest.startDebuggerTest(step1); | |
| 34 | |
| 35 function step1() | |
| 36 { | |
| 37 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | |
| 38 } | |
| 39 | |
| 40 function step2() | |
| 41 { | |
| 42 InspectorTest.expandScopeVariablesSidebarPane(step3); | |
| 43 } | |
| 44 | |
| 45 function step3() | |
| 46 { | |
| 47 InspectorTest.addResult(""); | |
| 48 InspectorTest.dumpScopeVariablesSidebarPane(); | |
| 49 InspectorTest.completeDebuggerTest(); | |
| 50 } | |
| 51 } | |
| 52 | |
| 53 </script> | |
| 54 </head> | |
| 55 | |
| 56 <body onload="runTest()"> | |
| 57 <input type='button' onclick='testFunction()' value='Test'/> | |
| 58 <p> | |
| 59 Test that sections representing scopes of the current call frame are expandable | |
| 60 and contain correct data. | |
| 61 </p> | |
| 62 </body> | |
| 63 </html> | |
| OLD | NEW |