6171dba310f85fa579c81018308cfdcf87ff65f6
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / sources / debugger / eval-on-pause-blocked.html
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 <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'">
6 <script>
7 function testFunction()
8 {
9     var foo = 2012;
10     debugger;
11 }
12
13 var test = function()
14 {
15     InspectorTest.startDebuggerTest(step1);
16
17     function step1()
18     {
19         InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
20     }
21
22     function step2()
23     {
24         InspectorTest.evaluateInConsole("foo", step3);
25     }
26
27     function step3(result)
28     {
29         InspectorTest.addResult("Evaluated in console in the top frame context: foo = " + result);
30         InspectorTest.completeDebuggerTest();
31     }
32 }
33
34 </script>
35 </head>
36 <body onload="runTest()">
37 <p>
38 Test that evaluation in the context of top frame will not be blocked by Content-Security-Policy.
39 <a href="https://bugs.webkit.org/show_bug.cgi?id=77203">Bug 77203.</a>
40 </p>
41
42 </body>
43 </html>