Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / sources / debugger / debugger-eval-on-call-frame.html
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/console-test.js"></script>
5 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script>
7
8 var a = 1;
9 function testFunction()
10 {
11     var a = 2;
12     debugger;
13 }
14
15 var test = function()
16 {
17     InspectorTest.startDebuggerTest(step1);
18
19     function step1()
20     {
21         InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
22     }
23
24     function step2()
25     {
26         InspectorTest.evaluateInConsole("a", step3);
27     }
28
29     function step3(result)
30     {
31         InspectorTest.addResult("Evaluated in console in the top frame context: a = " + result);
32         InspectorTest.completeDebuggerTest();
33     }
34 }
35
36 </script>
37 </head>
38
39 <body onload="runTest()">
40 <p>
41 Test that evaluation in the context of top frame will see values
42 of its local variables, even if there are global variables with
43 same names. On success the test will print a = 2(value of the
44 local variable a). <a href="https://bugs.webkit.org/show_bug.cgi?id=47358">Bug 47358.</a>
45 </p>
46
47 </body>
48 </html>