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

Unified Diff: test/mjsunit/debug-evaluate-locals-optimized.js

Issue 726643002: harmony-scoping: Implement debugger support for script scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nit + rebased Created 6 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 | « test/cctest/test-debug.cc ('k') | test/mjsunit/debug-evaluate-locals-optimized-double.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-evaluate-locals-optimized.js
diff --git a/test/mjsunit/debug-evaluate-locals-optimized.js b/test/mjsunit/debug-evaluate-locals-optimized.js
index d424001b891bb82c97388dfc5d7a03e9f8d97ea6..9d539fe2824f0d726e7b364c188924dc62e24407 100644
--- a/test/mjsunit/debug-evaluate-locals-optimized.js
+++ b/test/mjsunit/debug-evaluate-locals-optimized.js
@@ -79,10 +79,11 @@ function listener(event, exec_state, event_data, data) {
frame.argumentValue(j).value());
}
- // All frames except the bottom one have two scopes.
- assertEquals(2, frame.scopeCount());
+ // All frames except the bottom one have three scopes.
+ assertEquals(3, frame.scopeCount());
assertEquals(debug.ScopeType.Local, frame.scope(0).scopeType());
- assertEquals(debug.ScopeType.Global, frame.scope(1).scopeType());
+ assertEquals(debug.ScopeType.Script, frame.scope(1).scopeType());
+ assertEquals(debug.ScopeType.Global, frame.scope(2).scopeType());
Object.keys(expected_locals).forEach(function (name) {
assertEquals(expected_locals[name],
@@ -124,9 +125,10 @@ function listener(event, exec_state, event_data, data) {
assertEquals(expected_args_sum,
frame.evaluate(arguments_sum).value());
} else {
- // The bottom frame only have the global scope.
- assertEquals(1, frame.scopeCount());
- assertEquals(debug.ScopeType.Global, frame.scope(0).scopeType());
+ // The bottom frame only have the script scope and the global scope.
+ assertEquals(2, frame.scopeCount());
+ assertEquals(debug.ScopeType.Script, frame.scope(0).scopeType());
+ assertEquals(debug.ScopeType.Global, frame.scope(1).scopeType());
}
// Check the frame function.
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/mjsunit/debug-evaluate-locals-optimized-double.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698