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

Unified Diff: test/mjsunit/bugs/harmony/debug-blockscopes.js

Issue 2536573002: [debug] remove debug command processor from scope 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/debug-scopes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/bugs/harmony/debug-blockscopes.js
diff --git a/test/mjsunit/bugs/harmony/debug-blockscopes.js b/test/mjsunit/bugs/harmony/debug-blockscopes.js
index b8b2f8d99e0eed688a953227de45ad81c3d60a71..da907fc81ee61163859ee93865038dabd39edf8f 100644
--- a/test/mjsunit/bugs/harmony/debug-blockscopes.js
+++ b/test/mjsunit/bugs/harmony/debug-blockscopes.js
@@ -93,31 +93,6 @@ function CheckScopeChain(scopes, exec_state) {
assertPropertiesEqual(this, scope.scopeObject().value());
}
}
-
- // Get the debug command processor.
- var dcp = exec_state.debugCommandProcessor("unspecified_running_state");
-
- // Send a scopes request and check the result.
- var json;
- var request_json = '{"seq":0,"type":"request","command":"scopes"}';
- var response_json = dcp.processDebugJSONRequest(request_json);
- var response = JSON.parse(response_json);
- assertEquals(scopes.length, response.body.scopes.length);
- for (var i = 0; i < scopes.length; i++) {
- assertEquals(i, response.body.scopes[i].index);
- assertEquals(scopes[i], response.body.scopes[i].type);
- if (scopes[i] == debug.ScopeType.Local ||
- scopes[i] == debug.ScopeType.Closure) {
- assertTrue(response.body.scopes[i].object.ref < 0);
- } else {
- assertTrue(response.body.scopes[i].object.ref >= 0);
- }
- var found = false;
- for (var j = 0; j < response.refs.length && !found; j++) {
- found = response.refs[j].handle == response.body.scopes[i].object.ref;
- }
- assertTrue(found, "Scope object " + response.body.scopes[i].object.ref + " not found");
- }
}
// Check that the content of the scope is as expected. For functions just check
@@ -130,11 +105,13 @@ function CheckScopeContent(content, number, exec_state) {
if (property_mirror.isUndefined()) {
print('property ' + p + ' not found in scope');
}
- assertFalse(property_mirror.isUndefined(), 'property ' + p + ' not found in scope');
+ assertFalse(property_mirror.isUndefined(),
+ 'property ' + p + ' not found in scope');
if (typeof(content[p]) === 'function') {
assertTrue(property_mirror.value().isFunction());
} else {
- assertEquals(content[p], property_mirror.value().value(), 'property ' + p + ' has unexpected value');
+ assertEquals(content[p], property_mirror.value().value(),
+ 'property ' + p + ' has unexpected value');
}
count++;
}
@@ -158,30 +135,6 @@ function CheckScopeContent(content, number, exec_state) {
}
}
assertEquals(count, scope_size);
-
- // Get the debug command processor.
- var dcp = exec_state.debugCommandProcessor("unspecified_running_state");
-
- // Send a scope request for information on a single scope and check the
- // result.
- var request_json = '{"seq":0,"type":"request","command":"scope","arguments":{"number":';
- request_json += scope.scopeIndex();
- request_json += '}}';
- var response_json = dcp.processDebugJSONRequest(request_json);
- var response = JSON.parse(response_json);
- assertEquals(scope.scopeType(), response.body.type);
- assertEquals(number, response.body.index);
- if (scope.scopeType() == debug.ScopeType.Local ||
- scope.scopeType() == debug.ScopeType.Closure) {
- assertTrue(response.body.object.ref < 0);
- } else {
- assertTrue(response.body.object.ref >= 0);
- }
- var found = false;
- for (var i = 0; i < response.refs.length && !found; i++) {
- found = response.refs[i].handle == response.body.object.ref;
- }
- assertTrue(found, "Scope object " + response.body.object.ref + " not found");
}
« no previous file with comments | « no previous file | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698