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

Unified Diff: gin/runner_unittest.cc

Issue 76353002: Introduce a Gin class instead of using global functions to control gin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: gin/runner_unittest.cc
diff --git a/gin/runner_unittest.cc b/gin/runner_unittest.cc
index adcebed4cbc94d297f8f695851fe25d0c8a76416..0a5b8f48b7e994e06065c416bd27c9dcab27913b 100644
--- a/gin/runner_unittest.cc
+++ b/gin/runner_unittest.cc
@@ -5,7 +5,9 @@
#include "gin/runner.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "gin/converter.h"
+#include "gin/gin.h"
#include "testing/gtest/include/gtest/gtest.h"
using v8::Isolate;
@@ -18,8 +20,10 @@ namespace gin {
TEST(RunnerTest, Run) {
std::string source = "this.result = 'PASS';\n";
+ scoped_ptr<gin::Gin> instance(new gin::Gin);
abarth-chromium 2013/11/19 15:49:21 Why not allocate on the stack?
jochen (gone - plz use gerrit) 2013/11/19 15:57:24 Done.
+
RunnerDelegate delegate;
- Isolate* isolate = Isolate::GetCurrent();
+ Isolate* isolate = instance->isolate();
Runner runner(&delegate, isolate);
Runner::Scope scope(&runner);
runner.Run(source);

Powered by Google App Engine
This is Rietveld 408576698