OLD | NEW |
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/converter.h" | 5 #include "gin/converter.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "gin/public/isolate_holder.h" | 12 #include "gin/public/isolate_holder.h" |
14 #include "gin/test/v8_test.h" | 13 #include "gin/test/v8_test.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "v8/include/v8.h" | 15 #include "v8/include/v8.h" |
17 | 16 |
18 namespace gin { | 17 namespace gin { |
19 | 18 |
20 using v8::Array; | 19 using v8::Array; |
21 using v8::Boolean; | 20 using v8::Boolean; |
22 using v8::HandleScope; | 21 using v8::HandleScope; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 EXPECT_TRUE(maybe.ToLocal(&js_value)); | 122 EXPECT_TRUE(maybe.ToLocal(&js_value)); |
124 Local<Array> js_array2 = Local<Array>::Cast(js_value); | 123 Local<Array> js_array2 = Local<Array>::Cast(js_value); |
125 EXPECT_EQ(3u, js_array2->Length()); | 124 EXPECT_EQ(3u, js_array2->Length()); |
126 for (size_t i = 0; i < expected.size(); ++i) { | 125 for (size_t i = 0; i < expected.size(); ++i) { |
127 EXPECT_TRUE(Integer::New(instance_->isolate(), expected[i]) | 126 EXPECT_TRUE(Integer::New(instance_->isolate(), expected[i]) |
128 ->StrictEquals(js_array2->Get(static_cast<int>(i)))); | 127 ->StrictEquals(js_array2->Get(static_cast<int>(i)))); |
129 } | 128 } |
130 } | 129 } |
131 | 130 |
132 } // namespace gin | 131 } // namespace gin |
OLD | NEW |