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

Unified Diff: test/inspector/debugger/step-snapshot.js

Issue 2836623002: [inspector] always include user scripts in the snapshot. (Closed)
Patch Set: rebase Created 3 years, 8 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/snapshot/startup-serializer.cc ('k') | test/inspector/debugger/step-snapshot-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/debugger/step-snapshot.js
diff --git a/test/inspector/debugger/step-snapshot.js b/test/inspector/debugger/step-snapshot.js
new file mode 100644
index 0000000000000000000000000000000000000000..6e9ee8e7d18b2bf137e2a3f693ffcfe808664028
--- /dev/null
+++ b/test/inspector/debugger/step-snapshot.js
@@ -0,0 +1,30 @@
+// 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.
+
+// Embed a user function in the snapshot and step through it.
+
+// Flags: --embed 'function c(f, ...args) { return f(...args); }'
+
+InspectorTest.setupScriptMap();
+
+InspectorTest.addScript(`
+function test() {
+ function f(x) {
+ return x * 2;
+ }
+ debugger;
+ c(f, 2);
+}
+//# sourceURL=test.js`);
+
+Protocol.Debugger.onPaused(message => {
+ InspectorTest.log("paused");
+ var frames = message.params.callFrames;
+ InspectorTest.logSourceLocation(frames[0].location);
+ Protocol.Debugger.stepInto();
+})
+
+Protocol.Debugger.enable()
+ .then(() => Protocol.Runtime.evaluate({ expression: 'test()' }))
+ .then(InspectorTest.completeTest);
« no previous file with comments | « src/snapshot/startup-serializer.cc ('k') | test/inspector/debugger/step-snapshot-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698