Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index d18667018d4bb8baec8f5866372ae138464e6493..b0421234cc71dac91c3df0bf876c012ad6f7bd7e 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -3022,6 +3022,27 @@ static v8::Handle<Value> IdentityIndexedPropertyGetter( |
} |
+THREADED_TEST(IndexedInterceptorWithGetOwnPropertyDescriptor) { |
+ v8::HandleScope scope; |
+ Local<ObjectTemplate> templ = ObjectTemplate::New(); |
+ templ->SetIndexedPropertyHandler(IdentityIndexedPropertyGetter); |
antonm
2010/09/22 13:26:38
you probably need to extend this test case for cas
|
+ |
+ 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(); |