Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: test/cctest/test-api.cc

Issue 2680353004: Fixes Object::SetAccessor to return false if the prop is unconfigurable. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « src/api.cc ('k') | test/unittests/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 9bab2e1cc463ee99329379c34192d75f834def07..93bd1969ba4594b170621681230e983c42f77247 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -6459,14 +6459,14 @@ THREADED_TEST(DefineAPIAccessorOnObject) {
ExpectString("obj1.x", "z");
ExpectString("obj2.x", "z");
- CHECK(GetGlobalProperty(&context, "obj1")
+ CHECK(!GetGlobalProperty(&context, "obj1")
->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
v8_str("donut"))
- .IsNothing());
- CHECK(GetGlobalProperty(&context, "obj2")
+ .FromJust());
+ CHECK(!GetGlobalProperty(&context, "obj2")
->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
v8_str("donut"))
- .IsNothing());
+ .FromJust());
ExpectString("obj1.x", "z");
ExpectString("obj2.x", "z");
@@ -6500,14 +6500,14 @@ THREADED_TEST(DontDeleteAPIAccessorsCannotBeOverriden) {
ExpectTrue("!Object.getOwnPropertyDescriptor(obj1, 'x').configurable");
ExpectTrue("!Object.getOwnPropertyDescriptor(obj2, 'x').configurable");
- CHECK(GetGlobalProperty(&context, "obj1")
+ CHECK(!GetGlobalProperty(&context, "obj1")
->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
v8_str("donut"))
- .IsNothing());
- CHECK(GetGlobalProperty(&context, "obj2")
+ .FromJust());
+ CHECK(!GetGlobalProperty(&context, "obj2")
->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
v8_str("donut"))
- .IsNothing());
+ .FromJust());
{
v8::TryCatch try_catch(isolate);
« no previous file with comments | « src/api.cc ('k') | test/unittests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698