Index: test/mjsunit/debug-evaluate-shadowed-context.js |
diff --git a/test/mjsunit/debug-evaluate-shadowed-context.js b/test/mjsunit/debug-evaluate-shadowed-context.js |
index 221efb39d071e07832908c0c67164b66b6860a6d..6847a93f66216d1306007022211d4758a8b5da66 100644 |
--- a/test/mjsunit/debug-evaluate-shadowed-context.js |
+++ b/test/mjsunit/debug-evaluate-shadowed-context.js |
@@ -29,7 +29,8 @@ function listener(event, exec_state, event_data, data) { |
} |
assertEquals("[object global]", |
String(exec_state.frame(0).evaluate("this").value())); |
- exec_state.frame(0).evaluate("y = 'Y'"); |
+ assertEquals("y", exec_state.frame(0).evaluate("y").value()); |
+ assertEquals("a", exec_state.frame(0).evaluate("a").value()); |
exec_state.frame(0).evaluate("a = 'A'"); |
assertThrows(() => exec_state.frame(0).evaluate("z"), ReferenceError); |
} catch (e) { |
@@ -41,7 +42,7 @@ function listener(event, exec_state, event_data, data) { |
Debug.setListener(listener); |
var a = "a"; |
-assertEquals("Y", (function() { |
+(function() { |
var x = 1; // context allocate x |
(() => x); |
var y = "y"; |
@@ -54,12 +55,12 @@ assertEquals("Y", (function() { |
})(); // 2 |
})(); // 1 |
return y; |
-})()); |
+})(); |
assertEquals("A", a); |
a = "a"; |
-assertEquals("Y", (function() { |
+(function() { |
var x = 1; // context allocate x |
(() => x); |
var y = "y"; |
@@ -74,7 +75,7 @@ assertEquals("Y", (function() { |
})(); // 2 |
})(); // 1 |
return y; |
-})()); |
+})(); |
assertEquals("A", a); |