Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-frameworks/frameworks-skip-break-program.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../debugger/resources/framework.js"></script> 5 <script src="../debugger/resources/framework.js"></script>
6 <script> 6 <script>
7 7
8 function testFunction() 8 function testFunction()
9 { 9 {
10 debugger; 10 debugger;
11 Promise.resolve() 11 Promise.resolve()
12 // Should not pause on console.assert() inside framework. 12 // Should not pause on console.assert() inside framework.
13 .then(Framework.bind(Framework.assert, null, false, "Assert from test")) 13 .then(Framework.bind(Framework.assert, null, false, "Assert from test"))
14 // Should not pause on setTimeout inside the framework. 14 // Should not pause on setTimeout inside the framework.
15 .then(Framework.willSchedule(Framework.empty, 0)) 15 .then(Framework.willSchedule(Framework.empty, 0))
16 .then(stop) 16 .then(stop)
17 .catch(function FAIL_should_not_pause(e) { debugger; throw e; }); 17 .catch(function FAIL_should_not_pause(e) { debugger; throw e; });
18 } 18 }
19 19
20 function stop() 20 function stop()
21 { 21 {
22 setTimeout(function() {}, 0); // Should pause here. 22 setTimeout(function() {}, 0); // Should pause here.
23 } 23 }
24 24
25 function test() 25 function test()
26 { 26 {
27 var frameworkRegexString = "/framework\\.js$"; 27 var frameworkRegexString = "/framework\\.js$";
28 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng); 28 Common.settingForTest("skipStackFramesPattern").set(frameworkRegexString);
29 29
30 var pane = self.runtime.sharedInstance(WebInspector.EventListenerBreakpoints SidebarPane); 30 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpointsSideb arPane);
31 31
32 InspectorTest.startDebuggerTest(step1, true); 32 InspectorTest.startDebuggerTest(step1, true);
33 33
34 function step1() 34 function step1()
35 { 35 {
36 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); 36 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
37 } 37 }
38 38
39 function step2() 39 function step2()
40 { 40 {
41 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo del.PauseOnExceptionsState.PauseOnAllExceptions); 41 InspectorTest.DebuggerAgent.setPauseOnExceptions(SDK.DebuggerModel.Pause OnExceptionsState.PauseOnAllExceptions);
42 pane._setBreakpoint("instrumentation:setTimer"); 42 pane._setBreakpoint("instrumentation:setTimer");
43 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Inspect orTest, didPause)); 43 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Inspect orTest, didPause));
44 } 44 }
45 45
46 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) 46 function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
47 { 47 {
48 InspectorTest.captureStackTrace(callFrames); 48 InspectorTest.captureStackTrace(callFrames);
49 completeTest(); 49 completeTest();
50 } 50 }
51 51
52 function completeTest() 52 function completeTest()
53 { 53 {
54 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo del.PauseOnExceptionsState.DontPauseOnExceptions); 54 InspectorTest.DebuggerAgent.setPauseOnExceptions(SDK.DebuggerModel.Pause OnExceptionsState.DontPauseOnExceptions);
55 pane._removeBreakpoint("instrumentation:setTimer"); 55 pane._removeBreakpoint("instrumentation:setTimer");
56 InspectorTest.completeDebuggerTest(); 56 InspectorTest.completeDebuggerTest();
57 } 57 }
58 } 58 }
59 59
60 </script> 60 </script>
61 </head> 61 </head>
62 62
63 <body onload="runTest()"> 63 <body onload="runTest()">
64 <input type='button' onclick='testFunction()' value='Test'/> 64 <input type='button' onclick='testFunction()' value='Test'/>
65 <p> 65 <p>
66 Tests that framework blackboxing skips instant pauses (e.g. breakpoints on conso le.assert(), setTimeout(), etc.) if they happen entirely inside the framework. 66 Tests that framework blackboxing skips instant pauses (e.g. breakpoints on conso le.assert(), setTimeout(), etc.) if they happen entirely inside the framework.
67 </p> 67 </p>
68 </body> 68 </body>
69 </html> 69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698