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

Unified Diff: gin/test/v8_test.cc

Issue 67763002: Add gin, a lightweight bindings system for V8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Aaron's comments Created 7 years, 1 month 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 | « gin/test/v8_test.h ('k') | gin/wrapper_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/test/v8_test.cc
diff --git a/gin/test/v8_test.cc b/gin/test/v8_test.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c95d946e638eda1e908f956851e09940973f2d15
--- /dev/null
+++ b/gin/test/v8_test.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "gin/test/v8_test.h"
+
+using v8::Context;
+using v8::Local;
+using v8::HandleScope;
+using v8::Isolate;
+
+namespace gin {
+
+V8Test::V8Test() {
+}
+
+V8Test::~V8Test() {
+}
+
+void V8Test::SetUp() {
+ isolate_ = Isolate::GetCurrent();
+ HandleScope handle_scope(isolate_);
+ context_.Reset(isolate_, Context::New(isolate_));
+ Local<Context>::New(isolate_, context_)->Enter();
+}
+
+void V8Test::TearDown() {
+ HandleScope handle_scope(isolate_);
+ Local<Context>::New(isolate_, context_)->Exit();
+ context_.Reset();
+}
+
+} // namespace gin
« no previous file with comments | « gin/test/v8_test.h ('k') | gin/wrapper_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698