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 exceptionThrown is supported by test runner.") | 5 let {session, contextGroup, Protocol} = InspectorTest.start("Check that exceptio
nThrown is supported by test runner.") |
6 | 6 |
7 Protocol.Runtime.enable(); | 7 Protocol.Runtime.enable(); |
8 Protocol.Runtime.onExceptionThrown(message => InspectorTest.logMessage(message))
; | 8 Protocol.Runtime.onExceptionThrown(message => InspectorTest.logMessage(message))
; |
9 Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw new Error(
) }, 0)" }); | 9 Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw new Error(
) }, 0)" }); |
10 Protocol.Runtime.evaluate({ expression: "setTimeout(\" }\", 0)" }); | 10 Protocol.Runtime.evaluate({ expression: "setTimeout(\" }\", 0)" }); |
11 Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw 239; }, 0)
" }); | 11 Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw 239; }, 0)
" }); |
12 InspectorTest.completeTestAfterPendingTimeouts(); | 12 InspectorTest.waitForPendingTasks().then(InspectorTest.completeTest); |
OLD | NEW |