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

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

Issue 22990003: Add RemovePrototype to FunctionTemplate (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/objects-inl.h ('k') | no next file » | 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 3be500814533e45ee0b6273f45577438fa35019f..66d5cc838f33a4b061921fd4b2ced714e27e0fcc 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -9522,6 +9522,17 @@ THREADED_TEST(SetPrototypeThrows) {
}
+THREADED_TEST(FunctionRemovePrototype) {
+ LocalContext context;
+ v8::HandleScope handle_scope(context->GetIsolate());
+
+ Local<v8::FunctionTemplate> t1 = v8::FunctionTemplate::New();
+ t1->RemovePrototype();
+ context->Global()->Set(v8_str("fun"), t1->GetFunction());
+ CHECK(!CompileRun("'prototype' in fun")->BooleanValue());
Michael Starzinger 2013/08/15 08:49:24 Can we add an additional check that "fun" actually
+}
+
+
THREADED_TEST(GetterSetterExceptions) {
LocalContext context;
v8::HandleScope handle_scope(context->GetIsolate());
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698