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

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

Issue 2636613002: [inspector] expose V8InspectorSession::breakProgram in test harness. (Closed)
Patch Set: addressed comments Created 3 years, 11 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
« no previous file with comments | « no previous file | test/inspector/debugger/inspector-break-api-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 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 print("Checks breakProgram,(schedule|cancel)PauseOnNextStatement test API");
6
7 InspectorTest.addScript(`
8 function callBreakProgram() {
9 breakProgram('reason', JSON.stringify({a: 42}));
10 }
11
12 function foo() {
13 return 42;
14 }`, 7, 26);
15
16 InspectorTest.setupScriptMap();
17 Protocol.Debugger.onPaused(message => {
18 InspectorTest.log('Stack:');
19 InspectorTest.logCallFrames(message.params.callFrames);
20 delete message.params.callFrames;
21 InspectorTest.log('Other data:');
22 InspectorTest.logMessage(message);
23 InspectorTest.log('');
24 Protocol.Debugger.resume();
25 });
26
27 Protocol.Debugger.enable();
28
29 InspectorTest.runTestSuite([
30 function testBreakProgram(next) {
31 Protocol.Runtime.evaluate({ expression: 'callBreakProgram()'})
32 .then(next);
33 },
34
35 function testSchedulePauseOnNextStatement(next) {
36 schedulePauseOnNextStatement('reason', JSON.stringify({a: 42}));
37 Protocol.Runtime.evaluate({ expression: 'foo()//# sourceURL=expr1.js'})
38 .then(() => Protocol.Runtime.evaluate({
39 expression: 'foo()//# sourceURL=expr2.js'}))
40 .then(next);
41 },
42
43 function testCancelPauseOnNextStatement(next) {
44 schedulePauseOnNextStatement('reason', JSON.stringify({a: 42}));
45 cancelPauseOnNextStatement();
46 Protocol.Runtime.evaluate({ expression: 'foo()'})
47 .then(next);
48 }
49 ]);
OLDNEW
« no previous file with comments | « no previous file | test/inspector/debugger/inspector-break-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698