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

Unified Diff: test/inspector/debugger/stepping-and-break-program-api.js

Issue 2738503006: [inspector] don't make v8::debug::Call for breakProgram. (Closed)
Patch Set: addressed comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/inspector/debugger/stepping-and-break-program-api-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/debugger/stepping-and-break-program-api.js
diff --git a/test/inspector/debugger/stepping-and-break-program-api.js b/test/inspector/debugger/stepping-and-break-program-api.js
new file mode 100644
index 0000000000000000000000000000000000000000..4900843fc533fd54066497f7794a0ece6d09398f
--- /dev/null
+++ b/test/inspector/debugger/stepping-and-break-program-api.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+InspectorTest.log('Checks that stepping is cleared after breakProgram.');
+
+InspectorTest.addScript(`
+function callBreakProgram() {
+ debugger;
+ breakProgram('reason', '');
+}`);
+
+InspectorTest.setupScriptMap();
+(async function test() {
+ Protocol.Debugger.enable();
+ Protocol.Runtime.evaluate({expression: 'callBreakProgram();'});
+ // Should break at this debugger statement, not at end of callBreakProgram.
+ Protocol.Runtime.evaluate({expression: 'setTimeout(\'debugger;\', 0);'});
+ await waitPauseAndDumpLocation();
+ Protocol.Debugger.stepOver();
+ await waitPauseAndDumpLocation();
+ Protocol.Debugger.stepOver();
+ await waitPauseAndDumpLocation();
+ Protocol.Debugger.resume();
+ await waitPauseAndDumpLocation();
+ InspectorTest.completeTest();
+})();
+
+async function waitPauseAndDumpLocation() {
+ var message = await Protocol.Debugger.oncePaused();
+ InspectorTest.log('paused at:');
+ InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ return message;
+}
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/inspector/debugger/stepping-and-break-program-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698