Upstream version 5.34.104.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     WebInspector.showPanel("sources");
4
5     InspectorTest.addSniffer(WebInspector.CallStackSidebarPane.prototype, "setStatus", setStatus, false);
6
7     function setStatus(status)
8     {
9         // FIXME: For whatever reason, this isn't getting called consistently.
10         // Commenting it out to avoid flakeyness. https://bugs.webkit.org/show_bug.cgi?id=96867
11         // InspectorTest.addResult("Callstack status set to: '" + status + "'.");
12     }
13
14     InspectorTest.startDebuggerTest(step1);
15
16     function step1()
17     {
18         DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
19         InspectorTest.evaluateInPage("setTimeout(testAction, 0);");
20         InspectorTest.waitUntilPaused(step2);
21     }
22
23     function step2(callFrames)
24     {
25         InspectorTest.captureStackTrace(callFrames);
26         InspectorTest.completeDebuggerTest();
27     }
28 }
29
30 window.addEventListener('load', runTest);