Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index d0aa54815ca5d6f9794e9b2a562376c7615385c5..b04fb94d3ac92801f23ef9b44ecade040319e1a8 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -6658,61 +6658,6 @@ TEST(StrongModeFreeVariablesDeclaredInGlobalPrototype) { |
} |
-TEST(StrongModeFreeVariablesNotDeclared) { |
- i::FLAG_strong_mode = true; |
- v8::V8::Initialize(); |
- v8::HandleScope scope(CcTest::isolate()); |
- v8::Context::Scope context_scope(v8::Context::New(CcTest::isolate())); |
- v8::TryCatch try_catch(CcTest::isolate()); |
- |
- // Test that referencing unintroduced variables in sloppy mode is ok. |
- const char* script1 = |
- "if (false) { \n" |
- " not_there1; \n" |
- "} \n"; |
- CompileRun(v8_str(script1)); |
- CHECK(!try_catch.HasCaught()); |
- |
- // But not in strong mode. |
- { |
- const char* script2 = |
- "\"use strong\"; \n" |
- "if (false) { \n" |
- " not_there2; \n" |
- "} \n"; |
- v8::TryCatch try_catch2(CcTest::isolate()); |
- v8_compile(v8_str(script2)); |
- CHECK(try_catch2.HasCaught()); |
- v8::String::Utf8Value exception(try_catch2.Exception()); |
- CHECK_EQ(0, |
- strcmp( |
- "ReferenceError: In strong mode, using an undeclared global " |
- "variable 'not_there2' is not allowed", |
- *exception)); |
- } |
- |
- // Check that the variable reference is detected inside a strong function too, |
- // even if the script scope is not strong. |
- { |
- const char* script3 = |
- "(function not_lazy() { \n" |
- " \"use strong\"; \n" |
- " if (false) { \n" |
- " not_there3; \n" |
- " } \n" |
- "})(); \n"; |
- v8::TryCatch try_catch2(CcTest::isolate()); |
- v8_compile(v8_str(script3)); |
- CHECK(try_catch2.HasCaught()); |
- v8::String::Utf8Value exception(try_catch2.Exception()); |
- CHECK_EQ(0, |
- strcmp( |
- "ReferenceError: In strong mode, using an undeclared global " |
- "variable 'not_there3' is not allowed", |
- *exception)); |
- } |
-} |
- |
static const ParserFlag kAllDestructuringFlags[] = { |
kAllowHarmonyDestructuring, kAllowHarmonyDestructuringAssignment, |
kAllowHarmonyDefaultParameters}; |