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

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

Issue 2171143002: cc: Get rid of non-delegated rendering in most cc unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@killdirecttests
Patch Set: fakeoutputsurface: no-constructor Created 4 years, 4 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 | « cc/trees/tree_synchronizer_unittest.cc ('k') | no next file » | 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/animation/animation_host.h" 8 #include "cc/animation/animation_host.h"
9 #include "cc/resources/ui_resource_bitmap.h" 9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "cc/test/fake_layer_tree_host_client.h" 10 #include "cc/test/fake_layer_tree_host_client.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 private: 83 private:
84 DISALLOW_COPY_AND_ASSIGN(MockLayerTreeHost); 84 DISALLOW_COPY_AND_ASSIGN(MockLayerTreeHost);
85 }; 85 };
86 86
87 } // namespace 87 } // namespace
88 88
89 class ResourceManagerTest : public testing::Test { 89 class ResourceManagerTest : public testing::Test {
90 public: 90 public:
91 ResourceManagerTest() 91 ResourceManagerTest()
92 : window_android_(WindowAndroid::createForTesting()), 92 : window_android_(WindowAndroid::createForTesting()),
93 resource_manager_(window_android_), 93 resource_manager_(window_android_) {
94 fake_client_(cc::FakeLayerTreeHostClient::DIRECT_3D) {
95 cc::LayerTreeHost::InitParams params; 94 cc::LayerTreeHost::InitParams params;
96 cc::LayerTreeSettings settings; 95 cc::LayerTreeSettings settings;
97 params.client = &fake_client_; 96 params.client = &fake_client_;
98 params.settings = &settings; 97 params.settings = &settings;
99 params.task_graph_runner = &task_graph_runner_; 98 params.task_graph_runner = &task_graph_runner_;
100 params.animation_host = 99 params.animation_host =
101 cc::AnimationHost::CreateForTesting(cc::ThreadInstance::MAIN); 100 cc::AnimationHost::CreateForTesting(cc::ThreadInstance::MAIN);
102 host_.reset(new MockLayerTreeHost(&params, 101 host_.reset(new MockLayerTreeHost(&params,
103 cc::CompositorMode::SINGLE_THREADED)); 102 cc::CompositorMode::SINGLE_THREADED));
104 resource_manager_.Init(host_.get()); 103 resource_manager_.Init(host_.get());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 EXPECT_EQ(kNumFrames, actual_rects.size()); 180 EXPECT_EQ(kNumFrames, actual_rects.size());
182 for (size_t i = 0; i < kNumFrames; i++) { 181 for (size_t i = 0; i < kNumFrames; i++) {
183 EXPECT_EQ(expected_rects[i].size(), actual_rects[i].size()); 182 EXPECT_EQ(expected_rects[i].size(), actual_rects[i].size());
184 for (size_t j = 0; j < actual_rects[i].size(); j++) { 183 for (size_t j = 0; j < actual_rects[i].size(); j++) {
185 EXPECT_EQ(expected_rects[i][j], actual_rects[i][j]); 184 EXPECT_EQ(expected_rects[i][j], actual_rects[i][j]);
186 } 185 }
187 } 186 }
188 } 187 }
189 188
190 } // namespace ui 189 } // namespace ui
OLDNEW
« no previous file with comments | « cc/trees/tree_synchronizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698