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

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

Issue 6794050: Revert "[Arguments] Merge (7442,7496] from bleeding_edge." (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: Created 9 years, 9 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 | « test/cctest/test-alloc.cc ('k') | test/cctest/test-assembler-arm.cc » ('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 d5748ce2c4ced06605cef90c096cecd229f61f1d..33d505eaaa2640c1cb5018c5e60c521602a46a72 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -13629,102 +13629,3 @@ TEST(DefinePropertyPostDetach) {
context->DetachGlobal();
define_property->Call(proxy, 0, NULL);
}
-
-
-static void InstallContextId(v8::Handle<Context> context, int id) {
- Context::Scope scope(context);
- CompileRun("Object.prototype").As<Object>()->
- Set(v8_str("context_id"), v8::Integer::New(id));
-}
-
-
-static void CheckContextId(v8::Handle<Object> object, int expected) {
- CHECK_EQ(expected, object->Get(v8_str("context_id"))->Int32Value());
-}
-
-
-THREADED_TEST(CreationContext) {
- HandleScope handle_scope;
- Persistent<Context> context1 = Context::New();
- InstallContextId(context1, 1);
- Persistent<Context> context2 = Context::New();
- InstallContextId(context2, 2);
- Persistent<Context> context3 = Context::New();
- InstallContextId(context3, 3);
-
- Local<v8::FunctionTemplate> tmpl = v8::FunctionTemplate::New();
-
- Local<Object> object1;
- Local<Function> func1;
- {
- Context::Scope scope(context1);
- object1 = Object::New();
- func1 = tmpl->GetFunction();
- }
-
- Local<Object> object2;
- Local<Function> func2;
- {
- Context::Scope scope(context2);
- object2 = Object::New();
- func2 = tmpl->GetFunction();
- }
-
- Local<Object> instance1;
- Local<Object> instance2;
-
- {
- Context::Scope scope(context3);
- instance1 = func1->NewInstance();
- instance2 = func2->NewInstance();
- }
-
- CHECK(object1->CreationContext() == context1);
- CheckContextId(object1, 1);
- CHECK(func1->CreationContext() == context1);
- CheckContextId(func1, 1);
- CHECK(instance1->CreationContext() == context1);
- CheckContextId(instance1, 1);
- CHECK(object2->CreationContext() == context2);
- CheckContextId(object2, 2);
- CHECK(func2->CreationContext() == context2);
- CheckContextId(func2, 2);
- CHECK(instance2->CreationContext() == context2);
- CheckContextId(instance2, 2);
-
- {
- Context::Scope scope(context1);
- CHECK(object1->CreationContext() == context1);
- CheckContextId(object1, 1);
- CHECK(func1->CreationContext() == context1);
- CheckContextId(func1, 1);
- CHECK(instance1->CreationContext() == context1);
- CheckContextId(instance1, 1);
- CHECK(object2->CreationContext() == context2);
- CheckContextId(object2, 2);
- CHECK(func2->CreationContext() == context2);
- CheckContextId(func2, 2);
- CHECK(instance2->CreationContext() == context2);
- CheckContextId(instance2, 2);
- }
-
- {
- Context::Scope scope(context2);
- CHECK(object1->CreationContext() == context1);
- CheckContextId(object1, 1);
- CHECK(func1->CreationContext() == context1);
- CheckContextId(func1, 1);
- CHECK(instance1->CreationContext() == context1);
- CheckContextId(instance1, 1);
- CHECK(object2->CreationContext() == context2);
- CheckContextId(object2, 2);
- CHECK(func2->CreationContext() == context2);
- CheckContextId(func2, 2);
- CHECK(instance2->CreationContext() == context2);
- CheckContextId(instance2, 2);
- }
-
- context1.Dispose();
- context2.Dispose();
- context3.Dispose();
-}
« no previous file with comments | « test/cctest/test-alloc.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698