OLD | NEW |
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 Loading... |
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 ]); |
OLD | NEW |