Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 8a1e9147369fbde7d20e996c91e45089c0545e67..e151d3d373c34fb7de7f3c94e83b219df66404f6 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -7662,7 +7662,7 @@ THREADED_TEST(ShadowObject) { |
value = Script::Compile(v8_str("f()"))->Run(); |
CHECK_EQ(42, value->Int32Value()); |
- Script::Compile(v8_str("y = 42"))->Run(); |
+ Script::Compile(v8_str("y = 43"))->Run(); |
CHECK_EQ(1, shadow_y_setter_call_count); |
value = Script::Compile(v8_str("y"))->Run(); |
CHECK_EQ(1, shadow_y_getter_call_count); |
@@ -10306,11 +10306,11 @@ THREADED_TEST(Overriding) { |
value = v8_compile("o.g")->Run(); |
CHECK_EQ(42, value->Int32Value()); |
- // Check 'h' can be shadowed. |
+ // Check that 'h' cannot be shadowed. |
value = v8_compile("o.h = 3; o.h")->Run(); |
- CHECK_EQ(3, value->Int32Value()); |
+ CHECK_EQ(1, value->Int32Value()); |
- // Check 'i' is cannot be shadowed or changed. |
+ // Check that 'i' cannot be shadowed or changed. |
value = v8_compile("o.i = 3; o.i")->Run(); |
CHECK_EQ(42, value->Int32Value()); |
} |
@@ -12148,7 +12148,7 @@ TEST(RegExpStringModification) { |
} |
-// Test that we can set a property on the global object even if there |
+// Test that we cannot set a property on the global object if there |
// is a read-only property in the prototype chain. |
TEST(ReadOnlyPropertyInGlobalProto) { |
v8::HandleScope scope; |
@@ -12162,12 +12162,13 @@ TEST(ReadOnlyPropertyInGlobalProto) { |
// Check without 'eval' or 'with'. |
v8::Handle<v8::Value> res = |
CompileRun("function f() { x = 42; return x; }; f()"); |
+ CHECK_EQ(v8::Integer::New(0), res); |
// Check with 'eval'. |
- res = CompileRun("function f() { eval('1'); y = 42; return y; }; f()"); |
- CHECK_EQ(v8::Integer::New(42), res); |
+ res = CompileRun("function f() { eval('1'); y = 43; return y; }; f()"); |
+ CHECK_EQ(v8::Integer::New(0), res); |
// Check with 'with'. |
- res = CompileRun("function f() { with (this) { y = 42 }; return y; }; f()"); |
- CHECK_EQ(v8::Integer::New(42), res); |
+ res = CompileRun("function f() { with (this) { y = 44 }; return y; }; f()"); |
+ CHECK_EQ(v8::Integer::New(0), res); |
} |
static int force_set_set_count = 0; |