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

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

Issue 6883045: Add CallAsFunction method to the Object class in the API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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
« src/api.cc ('K') | « src/api.cc ('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 28a9be159937b9f1399efa6f7de5e9734751ba55..7167bba63a103e3ea209a7a8b61b3745baf7bbfa 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -7006,6 +7006,13 @@ THREADED_TEST(CallAsFunction) {
value = CompileRun("new obj(43)");
CHECK(!try_catch.HasCaught());
CHECK_EQ(-43, value->Int32Value());
+
+ // Check that the call-as-function handler can be called through
Mads Ager (chromium) 2011/04/28 11:53:05 This needs more testing. Please add tests for call
+ // the API.
+ v8::Handle<Value> args1[] = { v8_num(28) };
+ value = instance->Call(instance, 1, args1);
+ CHECK(!try_catch.HasCaught());
+ CHECK_EQ(28, value->Int32Value());
}
« src/api.cc ('K') | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698