| OLD | NEW | 
|   1 <html> |   1 <html> | 
|   2 <head> |   2 <head> | 
|   3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |   3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 
|   4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |   4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 
|   5 <script> |   5 <script> | 
|   6  |   6  | 
|   7 function makeClosure(n) |   7 function makeClosure(n) | 
|   8 { |   8 { | 
|   9     var makeClosureLocalVar = "local." + n; |   9     var makeClosureLocalVar = "local." + n; | 
|  10     return function innerFunction(x) |  10     return function innerFunction(x) | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
|  23 } |  23 } | 
|  24  |  24  | 
|  25 function testFunction() |  25 function testFunction() | 
|  26 { |  26 { | 
|  27     var f = makeClosure("TextParam"); |  27     var f = makeClosure("TextParam"); | 
|  28     f(2010); |  28     f(2010); | 
|  29 } |  29 } | 
|  30  |  30  | 
|  31 function test() |  31 function test() | 
|  32 { |  32 { | 
|  33     InspectorTest.startDebuggerTest(step1); |  33     InspectorTest.startDebuggerTest(onTestStarted); | 
|  34  |  34  | 
|  35     function step1() |  35     function onTestStarted() | 
|  36     { |  36     { | 
|  37         InspectorTest.runTestFunctionAndWaitUntilPaused(step2); |  37         InspectorTest.runTestFunctionAndWaitUntilPaused(onDebuggerPaused); | 
|  38     } |  38     } | 
|  39  |  39  | 
|  40     function step2() |  40     function onDebuggerPaused() | 
|  41     { |  41     { | 
|  42         InspectorTest.expandScopeVariablesSidebarPane(step3); |  42         InspectorTest.addSniffer(WebInspector.ScopeChainSidebarPane.prototype, "
    _sidebarPaneUpdatedForTest", onSidebarRendered, true); | 
|  43     } |  43     } | 
|  44  |  44  | 
|  45     function step3() |  45     function onSidebarRendered() | 
 |  46     { | 
 |  47         InspectorTest.expandScopeVariablesSidebarPane(onScopeVariablesExpanded); | 
 |  48     } | 
 |  49  | 
 |  50     function onScopeVariablesExpanded() | 
|  46     { |  51     { | 
|  47         InspectorTest.addResult(""); |  52         InspectorTest.addResult(""); | 
|  48         InspectorTest.dumpScopeVariablesSidebarPane(); |  53         InspectorTest.dumpScopeVariablesSidebarPane(); | 
|  49         InspectorTest.completeDebuggerTest(); |  54         InspectorTest.completeDebuggerTest(); | 
|  50     } |  55     } | 
|  51 } |  56 } | 
|  52  |  57  | 
|  53 </script> |  58 </script> | 
|  54 </head> |  59 </head> | 
|  55  |  60  | 
|  56 <body onload="runTest()"> |  61 <body onload="runTest()"> | 
|  57 <input type='button' onclick='testFunction()' value='Test'/> |  62 <input type='button' onclick='testFunction()' value='Test'/> | 
|  58 <p> |  63 <p> | 
|  59 Test that sections representing scopes of the current call frame are expandable |  64 Test that sections representing scopes of the current call frame are expandable | 
|  60 and contain correct data. |  65 and contain correct data. | 
|  61 </p> |  66 </p> | 
|  62 </body> |  67 </body> | 
|  63 </html> |  68 </html> | 
| OLD | NEW |