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

Unified Diff: test/mjsunit/regress/regress-1081309.js

Issue 2535733002: [debug] remove debug command processor from regress tests. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | test/mjsunit/regress/regress-1639.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-1081309.js
diff --git a/test/mjsunit/regress/regress-1081309.js b/test/mjsunit/regress/regress-1081309.js
index 5a6c52412ed77bb953e985d63eaec6b93ba26b61..329dc1d6cff85681350529e6f599d2ea23e78060 100644
--- a/test/mjsunit/regress/regress-1081309.js
+++ b/test/mjsunit/regress/regress-1081309.js
@@ -34,57 +34,21 @@ Debug = debug.Debug
listenerCalled = false;
exception = false;
-function ParsedResponse(json) {
- this.response_ = eval('(' + json + ')');
- this.refs_ = [];
- if (this.response_.refs) {
- for (var i = 0; i < this.response_.refs.length; i++) {
- this.refs_[this.response_.refs[i].handle] = this.response_.refs[i];
- }
- }
-}
-
-
-ParsedResponse.prototype.response = function() {
- return this.response_;
-}
-
-
-ParsedResponse.prototype.body = function() {
- return this.response_.body;
-}
-
-
-ParsedResponse.prototype.lookup = function(handle) {
- return this.refs_[handle];
-}
-
-
function listener(event, exec_state, event_data, data) {
try {
- if (event == Debug.DebugEvent.Exception)
- {
- // The expected backtrace is
- // 1: g
- // 0: [anonymous]
-
- // Get the debug command processor.
- var dcp = exec_state.debugCommandProcessor(false);
+ if (event == Debug.DebugEvent.Exception) {
+ // The expected backtrace is
+ // 1: g
+ // 0: [anonymous]
- // Get the backtrace.
- var json;
- json = '{"seq":0,"type":"request","command":"backtrace"}'
- var response = new ParsedResponse(dcp.processDebugJSONRequest(json));
- var backtrace = response.body();
- assertEquals(2, backtrace.totalFrames);
- assertEquals(2, backtrace.frames.length);
+ assertEquals(2, exec_state.frameCount());
+ assertEquals("g", exec_state.frame(0).func().name());
+ assertEquals("", exec_state.frame(1).func().name());
- assertEquals("g", response.lookup(backtrace.frames[0].func.ref).name);
- assertEquals("", response.lookup(backtrace.frames[1].func.ref).name);
-
- listenerCalled = true;
- }
+ listenerCalled = true;
+ }
} catch (e) {
+ print(e);
exception = e
};
};
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1639.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698