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

Unified Diff: test/inspector/debugger/doesnt-step-into-injected-script.js

Issue 2748503002: [inspector] changed a way of preserving stepping between tasks (Closed)
Patch Set: rebased on tunned stepping at return 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/isolate.cc ('k') | test/inspector/debugger/doesnt-step-into-injected-script-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/debugger/doesnt-step-into-injected-script.js
diff --git a/test/inspector/debugger/doesnt-step-into-injected-script.js b/test/inspector/debugger/doesnt-step-into-injected-script.js
index 2023da51f477be131eb6bb34368278833352d86c..45ca0ee0ddecf84275443201c1984944bd166a68 100644
--- a/test/inspector/debugger/doesnt-step-into-injected-script.js
+++ b/test/inspector/debugger/doesnt-step-into-injected-script.js
@@ -2,31 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.");
+InspectorTest.log('Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.');
-InspectorTest.addScript(
-`function foo()
-{
- return 239;
-}`);
+(async function test() {
+ InspectorTest.setupScriptMap();
+ await Protocol.Debugger.enable();
+ Protocol.Runtime.evaluate({expression: '(function boo() { setTimeout(() => 239, 0); debugger; })()\n'});
+ await waitPauseAndDumpLocation();
+ Protocol.Debugger.stepInto();
+ await waitPauseAndDumpLocation();
+ Protocol.Debugger.stepInto();
+ await waitPauseAndDumpLocation();
+ Protocol.Debugger.stepInto();
+ await waitPauseAndDumpLocation();
+ await Protocol.Debugger.disable();
+ InspectorTest.completeTest();
+})();
-Protocol.Debugger.enable();
-Protocol.Debugger.onPaused(debuggerPaused);
-Protocol.Runtime.evaluate({ "expression": "(function boo() { setTimeout(foo, 0); debugger; })()" });
-
-var actions = [ "stepInto", "stepInto", "stepInto" ];
-function debuggerPaused(result)
-{
- InspectorTest.log("Stack trace:");
- for (var callFrame of result.params.callFrames)
- InspectorTest.log(callFrame.functionName + ":" + callFrame.location.lineNumber + ":" + callFrame.location.columnNumber);
- InspectorTest.log("");
-
- var action = actions.shift();
- if (!action) {
- Protocol.Debugger.resume().then(InspectorTest.completeTest);
- return;
- }
- InspectorTest.log("Perform " + action);
- Protocol.Debugger[action]();
+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/isolate.cc ('k') | test/inspector/debugger/doesnt-step-into-injected-script-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698