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

Side by Side Diff: gin/converter_unittest.cc

Issue 1848423002: Convert //gin to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « no previous file | gin/isolate_holder.cc » ('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/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
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
OLDNEW
« no previous file with comments | « no previous file | gin/isolate_holder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698