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

Side by Side Diff: ui/android/resources/resource_manager_impl_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/android/resources/resource_manager.h ('k') | ui/android/window_android_compositor.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "cc/resources/ui_resource_bitmap.h" 8 #include "cc/resources/ui_resource_bitmap.h"
9 #include "cc/test/fake_layer_tree_host_client.h" 9 #include "cc/test/fake_layer_tree_host_client.h"
10 #include "cc/test/test_task_graph_runner.h" 10 #include "cc/test/test_task_graph_runner.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 void SetResourceAsLoaded(ui::SystemUIResourceType type) { 115 void SetResourceAsLoaded(ui::SystemUIResourceType type) {
116 resource_manager_.SetResourceAsLoaded(ui::ANDROID_RESOURCE_TYPE_SYSTEM, 116 resource_manager_.SetResourceAsLoaded(ui::ANDROID_RESOURCE_TYPE_SYSTEM,
117 type); 117 type);
118 } 118 }
119 119
120 private: 120 private:
121 WindowAndroid* window_android_; 121 WindowAndroid* window_android_;
122 122
123 protected: 123 protected:
124 scoped_ptr<MockLayerTreeHost> host_; 124 std::unique_ptr<MockLayerTreeHost> host_;
125 TestResourceManagerImpl resource_manager_; 125 TestResourceManagerImpl resource_manager_;
126 cc::TestTaskGraphRunner task_graph_runner_; 126 cc::TestTaskGraphRunner task_graph_runner_;
127 cc::FakeLayerTreeHostClient fake_client_; 127 cc::FakeLayerTreeHostClient fake_client_;
128 }; 128 };
129 129
130 TEST_F(ResourceManagerTest, GetResource) { 130 TEST_F(ResourceManagerTest, GetResource) {
131 const cc::UIResourceId kResourceId = 99; 131 const cc::UIResourceId kResourceId = 99;
132 EXPECT_CALL(*host_.get(), CreateUIResource(_)) 132 EXPECT_CALL(*host_.get(), CreateUIResource(_))
133 .WillOnce(Return(kResourceId)) 133 .WillOnce(Return(kResourceId))
134 .RetiresOnSaturation(); 134 .RetiresOnSaturation();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 EXPECT_EQ(kNumFrames, actual_rects.size()); 178 EXPECT_EQ(kNumFrames, actual_rects.size());
179 for (size_t i = 0; i < kNumFrames; i++) { 179 for (size_t i = 0; i < kNumFrames; i++) {
180 EXPECT_EQ(expected_rects[i].size(), actual_rects[i].size()); 180 EXPECT_EQ(expected_rects[i].size(), actual_rects[i].size());
181 for (size_t j = 0; j < actual_rects[i].size(); j++) { 181 for (size_t j = 0; j < actual_rects[i].size(); j++) {
182 EXPECT_EQ(expected_rects[i][j], actual_rects[i][j]); 182 EXPECT_EQ(expected_rects[i][j], actual_rects[i][j]);
183 } 183 }
184 } 184 }
185 } 185 }
186 186
187 } // namespace ui 187 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/resources/resource_manager.h ('k') | ui/android/window_android_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698