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

Side by Side Diff: gin/runner_unittest.cc

Issue 89723002: Convert the rest of the functions in core.cc to use CreateFunctionTemplate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase+comments Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gin/modules/module_registry.cc ('k') | gin/wrappable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gin/runner.h" 5 #include "gin/runner.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "gin/converter.h" 8 #include "gin/converter.h"
9 #include "gin/public/isolate_holder.h" 9 #include "gin/public/isolate_holder.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 10 matching lines...) Expand all
21 21
22 gin::IsolateHolder instance; 22 gin::IsolateHolder instance;
23 23
24 RunnerDelegate delegate; 24 RunnerDelegate delegate;
25 Isolate* isolate = instance.isolate(); 25 Isolate* isolate = instance.isolate();
26 Runner runner(&delegate, isolate); 26 Runner runner(&delegate, isolate);
27 Runner::Scope scope(&runner); 27 Runner::Scope scope(&runner);
28 runner.Run(source, "test_data.js"); 28 runner.Run(source, "test_data.js");
29 29
30 std::string result; 30 std::string result;
31 EXPECT_TRUE(Converter<std::string>::FromV8( 31 EXPECT_TRUE(Converter<std::string>::FromV8(isolate,
32 runner.global()->Get(StringToV8(isolate, "result")), 32 runner.global()->Get(StringToV8(isolate, "result")),
33 &result)); 33 &result));
34 EXPECT_EQ("PASS", result); 34 EXPECT_EQ("PASS", result);
35 } 35 }
36 36
37 } // namespace gin 37 } // namespace gin
OLDNEW
« no previous file with comments | « gin/modules/module_registry.cc ('k') | gin/wrappable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698