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

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

Issue 3446028: Merge r5509, r5512, r5530 to 2.3 branch ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: '' Created 10 years, 3 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-874.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
===================================================================
--- test/cctest/test-api.cc (revision 5530)
+++ test/cctest/test-api.cc (working copy)
@@ -3064,6 +3064,27 @@
}
+THREADED_TEST(IndexedInterceptorWithGetOwnPropertyDescriptor) {
+ v8::HandleScope scope;
+ Local<ObjectTemplate> templ = ObjectTemplate::New();
+ templ->SetIndexedPropertyHandler(IdentityIndexedPropertyGetter);
+
+ LocalContext context;
+ context->Global()->Set(v8_str("obj"), templ->NewInstance());
+
+ // Check fast object case.
+ const char* fast_case_code =
+ "Object.getOwnPropertyDescriptor(obj, 0).value.toString()";
+ ExpectString(fast_case_code, "0");
+
+ // Check slow case.
+ const char* slow_case_code =
+ "obj.x = 1; delete obj.x;"
+ "Object.getOwnPropertyDescriptor(obj, 1).value.toString()";
+ ExpectString(slow_case_code, "1");
+}
+
+
THREADED_TEST(IndexedInterceptorWithNoSetter) {
v8::HandleScope scope;
Local<ObjectTemplate> templ = ObjectTemplate::New();
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-874.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698