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

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

Issue 17636007: Allow debugger evaluate expressions to mute local variables (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: follow code review Created 7 years, 6 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/runtime.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-evaluate-locals.js
diff --git a/test/mjsunit/debug-evaluate-locals.js b/test/mjsunit/debug-evaluate-locals.js
index a68162d9bdcfd71aa42e0d021c0d1259f79d5894..e6326e18e038132146b54710e8a8f4a9f408667e 100644
--- a/test/mjsunit/debug-evaluate-locals.js
+++ b/test/mjsunit/debug-evaluate-locals.js
@@ -38,6 +38,7 @@ function h() {
var b = 2;
var eval = 5; // Overriding eval should not break anything.
debugger; // Breakpoint.
+ return a;
}
function checkFrame0(frame) {
@@ -60,7 +61,7 @@ function checkFrame0(frame) {
function g() {
var a = 3;
eval("var b = 4;");
- h();
+ return h() + a;
}
function checkFrame1(frame) {
@@ -83,7 +84,7 @@ function f() {
var a = 5;
var b = 0;
with ({b:6}) {
- g();
+ return g();
}
}
@@ -125,6 +126,10 @@ function listener(event, exec_state, event_data, data) {
assertEquals(6, exec_state.frame(2).evaluate('b').value());
assertEquals("function",
typeof exec_state.frame(2).evaluate('eval').value());
+ assertEquals("foo",
+ exec_state.frame(0).evaluate('a = "foo"').value());
+ assertEquals("bar",
+ exec_state.frame(1).evaluate('a = "bar"').value());
// Indicate that all was processed.
listenerComplete = true;
}
@@ -137,7 +142,9 @@ function listener(event, exec_state, event_data, data) {
// Add the debug event listener.
Debug.setListener(listener);
-f();
+var f_result = f();
+
+assertEquals('foobar', f_result);
// Make sure that the debug event listener was invoked.
assertFalse(exception, "exception in listener")
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698