summaryrefslogtreecommitdiffstats
path: root/gin/converter_unittest.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-27 03:38:26 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-27 03:38:26 +0000
commit7618ebbb8685c7bb6d1477791c524d667cae2f70 (patch)
tree4ae52faf34f9b2afd83cb81ceb6ef60a3db66e93 /gin/converter_unittest.cc
parent2ff0a25baaf6a542fadd4cfd32589476b8eba3b0 (diff)
downloadchromium_src-7618ebbb8685c7bb6d1477791c524d667cae2f70.zip
chromium_src-7618ebbb8685c7bb6d1477791c524d667cae2f70.tar.gz
chromium_src-7618ebbb8685c7bb6d1477791c524d667cae2f70.tar.bz2
Convert the rest of the functions in core.cc to use CreateFunctionTemplate.
BUG= Review URL: https://codereview.chromium.org/89723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gin/converter_unittest.cc')
-rw-r--r--gin/converter_unittest.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/gin/converter_unittest.cc b/gin/converter_unittest.cc
index 0a6bbba..58ae625 100644
--- a/gin/converter_unittest.cc
+++ b/gin/converter_unittest.cc
@@ -57,11 +57,13 @@ TEST_F(ConverterTest, Bool) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) {
bool result = false;
- EXPECT_TRUE(Converter<bool>::FromV8(test_data[i].input, &result));
+ EXPECT_TRUE(Converter<bool>::FromV8(instance_->isolate(),
+ test_data[i].input, &result));
EXPECT_EQ(test_data[i].expected, result);
result = true;
- EXPECT_TRUE(Converter<bool>::FromV8(test_data[i].input, &result));
+ EXPECT_TRUE(Converter<bool>::FromV8(instance_->isolate(),
+ test_data[i].input, &result));
EXPECT_EQ(test_data[i].expected, result);
}
}
@@ -97,7 +99,8 @@ TEST_F(ConverterTest, Int32) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data_from); ++i) {
int32_t result = std::numeric_limits<int32_t>::min();
- bool success = Converter<int32_t>::FromV8(test_data_from[i].input, &result);
+ bool success = Converter<int32_t>::FromV8(instance_->isolate(),
+ test_data_from[i].input, &result);
EXPECT_EQ(test_data_from[i].expect_sucess, success) << i;
if (success)
EXPECT_EQ(test_data_from[i].expected_result, result) << i;
@@ -122,7 +125,8 @@ TEST_F(ConverterTest, Vector) {
}
std::vector<int> actual;
- EXPECT_TRUE(Converter<std::vector<int> >::FromV8(js_array, &actual));
+ EXPECT_TRUE(Converter<std::vector<int> >::FromV8(instance_->isolate(),
+ js_array, &actual));
EXPECT_EQ(expected, actual);
}