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

Unified Diff: test/mjsunit/debug-backtrace.js

Issue 99342: Added support to backtrace from botton of stack to debugger protocol (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/debug-delay.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-backtrace.js
===================================================================
--- test/mjsunit/debug-backtrace.js (revision 1840)
+++ test/mjsunit/debug-backtrace.js (working copy)
@@ -124,6 +124,23 @@
assertEquals(2, frames[1].index);
assertEquals("", response.lookup(frames[1].func.ref).name);
+ // Get backtrace with bottom two frames.
+ json = '{"seq":0,"type":"request","command":"backtrace","arguments":{"fromFrame":0,"toFrame":2, "bottom":true}}'
+ response = new ParsedResponse(dcp.processDebugJSONRequest(json));
+ backtrace = response.body();
+ assertEquals(1, backtrace.fromFrame);
+ assertEquals(3, backtrace.toFrame);
+ assertEquals(3, backtrace.totalFrames);
+ var frames = backtrace.frames;
+ assertEquals(2, frames.length);
+ for (var i = 0; i < frames.length; i++) {
+ assertEquals('frame', frames[i].type);
+ }
+ assertEquals(1, frames[0].index);
+ assertEquals("g", response.lookup(frames[0].func.ref).name);
+ assertEquals(2, frames[1].index);
+ assertEquals("", response.lookup(frames[1].func.ref).name);
+
// Get the individual frames.
json = '{"seq":0,"type":"request","command":"frame"}'
response = new ParsedResponse(dcp.processDebugJSONRequest(json));
« no previous file with comments | « src/debug-delay.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698