Index: test/mjsunit/debug-set-variable-value.js |
diff --git a/test/mjsunit/debug-set-variable-value.js b/test/mjsunit/debug-set-variable-value.js |
index 7b6a98b18165fd567b2a3661a0669472c7003c57..4667a71d6b717f35f1615d9bb4503f0b4cd0caef 100644 |
--- a/test/mjsunit/debug-set-variable-value.js |
+++ b/test/mjsunit/debug-set-variable-value.js |
@@ -257,6 +257,38 @@ RunPauseTest(0, 'mouse', 'v1', 'dog', 'dog', (function Factory() { |
})()); |
+// Check that we correctly update local variable that |
+// is referenced from an inner closure. |
+RunPauseTest(0, 'Blue', 'v', 'Green', 'Green', (function Factory() { |
+ return function() { |
+ function A() { |
+ var v = "Blue"; |
+ function Inner() { |
+ return void v; |
+ } |
+ debugger; |
+ return v; |
+ } |
+ return A(); |
+ } |
+})()); |
+ |
+// Check that we correctly update parameter, that is known to be stored |
+// both on stack and in heap. |
+RunPauseTest(0, 5, 'p', 2012, 2012, (function Factory() { |
+ return function() { |
+ function A(p) { |
+ function Inner() { |
+ return void p; |
+ } |
+ debugger; |
+ return p; |
+ } |
+ return A(5); |
+ } |
+})()); |
+ |
+ |
// Test value description protocol JSON |
assertEquals(true, Debug.TestApi.CommandProcessorResolveValue({value: true})); |