Index: test/cctest/test-decls.cc |
diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc |
index f3dc77710281e8bc8ffbbe03785a72df5ee9b5f0..bb8e0f3cc34f30482675b143d9455aa10be1cb8d 100644 |
--- a/test/cctest/test-decls.cc |
+++ b/test/cctest/test-decls.cc |
@@ -923,6 +923,27 @@ TEST(CrossScriptDynamicLookup) { |
} |
+TEST(CrossScriptGlobal0) { |
Michael Starzinger
2015/04/22 12:42:18
nit: Do we need to add this test, since it's just
|
+ HandleScope handle_scope(CcTest::isolate()); |
+ { |
+ SimpleContext context; |
+ |
+ context.Check( |
+ "var global = this;" |
+ "global.x = 255;" |
+ "x", |
+ EXPECT_RESULT, Number::New(CcTest::isolate(), 255)); |
+ context.Check( |
+ "'use strict';" |
+ "let x = 1;" |
+ "global.x", |
+ EXPECT_RESULT, Number::New(CcTest::isolate(), 255)); |
+ context.Check("global.x = 15; x", EXPECT_RESULT, |
+ Number::New(CcTest::isolate(), 1)); |
+ } |
+} |
+ |
+ |
TEST(CrossScriptGlobal) { |
HandleScope handle_scope(CcTest::isolate()); |
{ |