Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-ui / debugger-expand-scope.html
blob0dcee13642a2d9797b5e22c6fc7d4193aacb58de
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>
7 function makeClosure(n)
9 var makeClosureLocalVar = "local." + n;
10 return function innerFunction(x)
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;
21 return n + makeClosureLocalVar + x + innerFunctionLocalVar;
25 function testFunction()
27 var f = makeClosure("TextParam");
28 f(2010);
31 function test()
33 InspectorTest.startDebuggerTest(step1);
35 function step1()
37 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
40 function step2()
42 InspectorTest.expandScopeVariablesSidebarPane(step3);
45 function step3()
47 InspectorTest.addResult("");
48 InspectorTest.dumpScopeVariablesSidebarPane();
49 InspectorTest.completeDebuggerTest();
53 </script>
54 </head>
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>