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

Side by Side Diff: test/inspector/debugger/call-frame-function-location.js

Issue 2390733002: [inspector] Make InspectorTest.sendCommand* private (Closed)
Patch Set: addressed comments Created 4 years, 2 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.evaluateInPage( 5 InspectorTest.addScript(
6 `function testFunction() 6 `function testFunction()
7 { 7 {
8 var a = 2; 8 var a = 2;
9 debugger; 9 debugger;
10 }`); 10 }`);
11 11
12 InspectorTest.sendCommand("Debugger.enable", {}); 12 Protocol.Debugger.enable();
13 InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPaused; 13 Protocol.Debugger.oncePaused().then(handleDebuggerPaused);
14 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(testFu nction, 0)" }); 14 Protocol.Runtime.evaluate({ "expression": "setTimeout(testFunction, 0)" });
15 15
16 function handleDebuggerPaused(messageObject) 16 function handleDebuggerPaused(messageObject)
17 { 17 {
18 InspectorTest.log("Paused on 'debugger;'"); 18 InspectorTest.log("Paused on 'debugger;'");
19 var topFrame = messageObject.params.callFrames[0]; 19 var topFrame = messageObject.params.callFrames[0];
20 topFrame.location.scriptId = "42"; 20 topFrame.location.scriptId = "42";
21 topFrame.functionLocation.scriptId = "42"; 21 topFrame.functionLocation.scriptId = "42";
22 InspectorTest.log("Top frame location: " + JSON.stringify(topFrame.location)); 22 InspectorTest.log("Top frame location: " + JSON.stringify(topFrame.location));
23 InspectorTest.log("Top frame functionLocation: " + JSON.stringify(topFrame.fun ctionLocation)); 23 InspectorTest.log("Top frame functionLocation: " + JSON.stringify(topFrame.fun ctionLocation));
24 InspectorTest.completeTest(); 24 InspectorTest.completeTest();
25 } 25 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/async-console-count-doesnt-crash.js ('k') | test/inspector/debugger/continue-to-location.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698