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

Side by Side Diff: LayoutTests/inspector/sources/debugger/rethrow-error-from-bindings-crash.html

Issue 558333003: DevTools: Add a test on a crash fix in ScriptDebugServer::wrapCallFrames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tweaked the test Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/rethrow-error-from-bindings-crash-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 <script src="../../../http/tests/inspector/console-test.js"></script>
6 <script>
7 var functions;
8
9 function testFunction()
10 {
11 console.clear();
12 // This used to be a racy crash. Test some sequence of functions.
13 functions = [f2, f1, f2, f1, f2, f1, f2, f1];
14 functions.push(function() {});
15 functions.shift()();
16 }
17
18 function f1() {
19 setTimeout(functions.shift(), 0);
20 document.body.appendChild("<throw_exception>");
21 }
22
23 function f2() {
24 setTimeout(functions.shift(), 0);
25 new Range().compareBoundaryPoints(1, 2);
26 }
27
28 var test = function()
29 {
30 var expectedErrorsCount = 8;
31
32 InspectorTest.setQuiet(true);
33 InspectorTest.startDebuggerTest(step1);
34
35 function step1()
36 {
37 DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExc eptionsState.PauseOnUncaughtExceptions);
38 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
39 }
40
41 function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
42 {
43 --expectedErrorsCount;
44 if (!expectedErrorsCount) {
45 InspectorTest.waitUntilNthMessageReceived(1, step2);
46 InspectorTest.resumeExecution();
47 } else {
48 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Ins pectorTest, didPause));
49 }
50 }
51
52 function step2()
53 {
54 InspectorTest.dumpConsoleMessages();
55 completeTest();
56 }
57
58 function completeTest()
59 {
60 DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExc eptionsState.DontPauseOnExceptions);
61 InspectorTest.completeDebuggerTest();
62 }
63 }
64
65 </script>
66 </head>
67 <body onload="window.testRunner ? runTest() : testFunction()">
68 <p>
69 Tests that pausing on uncaught exceptions thrown from C++ bindings will not cras h.
70 </p>
71 </body>
72 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/rethrow-error-from-bindings-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698