Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / sources / debugger / resources / pause-on-blocked-by-csp.js
1 function test()
2 {
3
4     InspectorTest.addSniffer(WebInspector.CallStackSidebarPane.prototype, "setStatus", setStatus, false);
5
6     function setStatus(status)
7     {
8         // FIXME: For whatever reason, this isn't getting called consistently.
9         // Commenting it out to avoid flakeyness. https://bugs.webkit.org/show_bug.cgi?id=96867
10         // InspectorTest.addResult("Callstack status set to: '" + status + "'.");
11     }
12
13     InspectorTest.startDebuggerTest(step1);
14
15     function step1()
16     {
17         DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
18         InspectorTest.evaluateInPage("setTimeout(testAction, 0);");
19         InspectorTest.waitUntilPaused(step2);
20     }
21
22     function step2(callFrames)
23     {
24         InspectorTest.captureStackTrace(callFrames);
25         InspectorTest.completeDebuggerTest();
26     }
27 }
28
29 window.addEventListener('load', runTest);