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

Side by Side Diff: test/inspector/debugger/caught-uncaught-exceptions.js

Issue 2713023004: [inspector] added reconnect method for tests (Closed)
Patch Set: rebased Created 3 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 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 print("Check that inspector correctly passes caught/uncaught information."); 5 InspectorTest.log("Check that inspector correctly passes caught/uncaught informa tion.");
6 6
7 InspectorTest.addScript( 7 InspectorTest.addScript(
8 `function throwCaught() { try { throw new Error(); } catch (_) {} } 8 `function throwCaught() { try { throw new Error(); } catch (_) {} }
9 function throwUncaught() { throw new Error(); } 9 function throwUncaught() { throw new Error(); }
10 function schedule(f) { setTimeout(f, 0); } 10 function schedule(f) { setTimeout(f, 0); }
11 `); 11 `);
12 12
13 Protocol.Debugger.enable(); 13 Protocol.Debugger.enable();
14 14
15 Protocol.Debugger.setPauseOnExceptions({ "state": "all" }); 15 Protocol.Debugger.setPauseOnExceptions({ "state": "all" });
16 Protocol.Debugger.onPaused(message => { 16 Protocol.Debugger.onPaused(message => {
17 InspectorTest.log("paused in " + message.params.callFrames[0].functionName); 17 InspectorTest.log("paused in " + message.params.callFrames[0].functionName);
18 InspectorTest.log("uncaught: " + message.params.data.uncaught); 18 InspectorTest.log("uncaught: " + message.params.data.uncaught);
19 Protocol.Debugger.resume(); 19 Protocol.Debugger.resume();
20 }); 20 });
21 21
22 Protocol.Runtime.evaluate({ "expression": "schedule(throwCaught);" }) 22 Protocol.Runtime.evaluate({ "expression": "schedule(throwCaught);" })
23 .then(() => Protocol.Runtime.evaluate( 23 .then(() => Protocol.Runtime.evaluate(
24 { "expression": "schedule(throwUncaught);" })) 24 { "expression": "schedule(throwUncaught);" }))
25 .then(() => InspectorTest.completeTest()); 25 .then(() => InspectorTest.completeTest());
OLDNEW
« no previous file with comments | « test/inspector/debugger/break-on-exception.js ('k') | test/inspector/debugger/command-line-api-with-bound-function.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698