Index: test/mjsunit/debug-scopes.js |
diff --git a/test/mjsunit/debug-scopes.js b/test/mjsunit/debug-scopes.js |
index 0e822fce1c0e0249d0d3c8751f1757dc8b7b3875..eb9e69822509fff781c348643e2eb6f84fed05f5 100644 |
--- a/test/mjsunit/debug-scopes.js |
+++ b/test/mjsunit/debug-scopes.js |
@@ -157,20 +157,20 @@ |
} |
-// Check that the scope contains at least minimum_content. For functions just |
-// check that there is a function. |
-function CheckScopeContent(minimum_content, number, exec_state) { |
+// Check that the content of the scope is as expected. For functions just check |
+// that there is a function. |
+function CheckScopeContent(content, number, exec_state) { |
var scope = exec_state.frame().scope(number); |
- var minimum_count = 0; |
- for (var p in minimum_content) { |
+ var count = 0; |
+ for (var p in content) { |
var property_mirror = scope.scopeObject().property(p); |
assertFalse(property_mirror.isUndefined(), 'property ' + p + ' not found in scope'); |
- if (typeof(minimum_content[p]) === 'function') { |
+ if (typeof(content[p]) === 'function') { |
assertTrue(property_mirror.value().isFunction()); |
} else { |
- assertEquals(minimum_content[p], property_mirror.value().value(), 'property ' + p + ' has unexpected value'); |
- } |
- minimum_count++; |
+ assertEquals(content[p], property_mirror.value().value(), 'property ' + p + ' has unexpected value'); |
+ } |
+ count++; |
} |
// 'arguments' and might be exposed in the local and closure scope. Just |
@@ -186,14 +186,14 @@ |
// Temporary variables introduced by the parser have not been materialized. |
assertTrue(scope.scopeObject().property('').isUndefined()); |
- if (scope_size < minimum_count) { |
+ if (count != scope_size) { |
print('Names found in scope:'); |
var names = scope.scopeObject().propertyNames(); |
for (var i = 0; i < names.length; i++) { |
print(names[i]); |
} |
} |
- assertTrue(scope_size >= minimum_count); |
+ assertEquals(count, scope_size); |
// Get the debug command processor. |
var dcp = exec_state.debugCommandProcessor("unspecified_running_state"); |