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

Side by Side Diff: test/inspector/debugger/break-on-exception.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 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 InspectorTest.log("Check that inspector correctly change break on exception stat e."); 5 let {session, contextGroup, Protocol} = InspectorTest.start("Check that inspecto r correctly change break on exception state.");
6 6
7 InspectorTest.addScript(` 7 contextGroup.addScript(`
8 function scheduleUncaughtException() 8 function scheduleUncaughtException()
9 { 9 {
10 setTimeout(throwUncaughtException, 0); 10 setTimeout(throwUncaughtException, 0);
11 } 11 }
12 function throwUncaughtException() 12 function throwUncaughtException()
13 { 13 {
14 throw new Error(); 14 throw new Error();
15 } 15 }
16 function throwCaughtException() 16 function throwCaughtException()
17 { 17 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 function noBreakInEvaluateInSilentMode(next) 63 function noBreakInEvaluateInSilentMode(next)
64 { 64 {
65 Protocol.Debugger.enable(); 65 Protocol.Debugger.enable();
66 Protocol.Debugger.setPauseOnExceptions({ state: "all" }) 66 Protocol.Debugger.setPauseOnExceptions({ state: "all" })
67 .then(() => Protocol.Runtime.evaluate({ expression: "throwCaughtException( )", silent: true })) 67 .then(() => Protocol.Runtime.evaluate({ expression: "throwCaughtException( )", silent: true }))
68 .then(() => Protocol.Debugger.disable()) 68 .then(() => Protocol.Debugger.disable())
69 .then(next); 69 .then(next);
70 } 70 }
71 ]); 71 ]);
OLDNEW
« no previous file with comments | « test/inspector/debugger/async-stack-for-promise.js ('k') | test/inspector/debugger/break-on-exception-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698