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

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

Issue 1754483002: [DevTools] Added setBlackboxPatterns method to protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@provide-hash-for-anonymous-scripts
Patch Set: Created 4 years, 9 months 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 Framework.throwFrameworkExceptionAndCatch(); 10 Framework.throwFrameworkExceptionAndCatch();
11 Framework.throwInNativeAndCatch(); 11 Framework.throwInNativeAndCatch();
12 12
13 // All above should be skipped. 13 // All above should be skipped.
14 debugger; 14 debugger;
15 } 15 }
16 16
17 function test() 17 function test()
18 { 18 {
19 var frameworkRegexString = "/framework\\.js$"; 19 var frameworkRegexString = "/framework\\.js$";
20 InspectorTest.addSniffer(WebInspector.BlackboxManager.prototype, "_patternCh angeFinishedForTests", step1);
20 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng); 21 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng);
21 22
22 InspectorTest.setQuiet(true); 23 function step1()
23 InspectorTest.startDebuggerTest(step1); 24 {
25 InspectorTest.setQuiet(true);
26 InspectorTest.startDebuggerTest(step2);
27 }
24 28
25 function step1() 29 function step2()
26 { 30 {
27 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo del.PauseOnExceptionsState.PauseOnAllExceptions); 31 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo del.PauseOnExceptionsState.PauseOnAllExceptions);
28 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); 32 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
29 } 33 }
30 34
31 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) 35 function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
32 { 36 {
33 InspectorTest.captureStackTrace(callFrames); 37 InspectorTest.captureStackTrace(callFrames);
34 completeTest(); 38 completeTest();
35 } 39 }
36 40
37 function completeTest() 41 function completeTest()
38 { 42 {
39 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo del.PauseOnExceptionsState.DontPauseOnExceptions); 43 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo del.PauseOnExceptionsState.DontPauseOnExceptions);
40 InspectorTest.completeDebuggerTest(); 44 InspectorTest.completeDebuggerTest();
41 } 45 }
42 } 46 }
43 47
44 </script> 48 </script>
45 </head> 49 </head>
46 50
47 <body onload="runTest()"> 51 <body onload="runTest()">
48 <input type='button' onclick='testFunction()' value='Test'/> 52 <input type='button' onclick='testFunction()' value='Test'/>
49 <p> 53 <p>
50 Tests that framework black-boxing skips exceptions, including those that happene d deeper inside V8 native script. 54 Tests that framework black-boxing skips exceptions, including those that happene d deeper inside V8 native script.
51 </p> 55 </p>
52 </body> 56 </body>
53 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698