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

Unified Diff: cc/tiles/tile_manager_unittest.cc

Issue 1336733002: Re-land: cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shutdown fix Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: cc/tiles/tile_manager_unittest.cc
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index e1fd51e9fc5d484f5a1379a74ea1c274b8c5c798..44bc75637aee2e7c4ce8da77887089ebca142eaf 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -46,6 +46,7 @@ class TileManagerTilePriorityQueueTest : public testing::Test {
ready_to_activate_(false),
id_(7),
proxy_(base::ThreadTaskRunnerHandle::Get()),
+ output_surface_(FakeOutputSurface::Create3d()),
host_impl_(LowResTilingsSettings(),
&proxy_,
&shared_bitmap_manager_,
@@ -74,7 +75,7 @@ class TileManagerTilePriorityQueueTest : public testing::Test {
}
virtual void InitializeRenderer() {
- host_impl_.InitializeRenderer(FakeOutputSurface::Create3d());
+ host_impl_.InitializeRenderer(output_surface_.get());
}
void SetupDefaultTrees(const gfx::Size& layer_bounds) {
@@ -156,6 +157,7 @@ class TileManagerTilePriorityQueueTest : public testing::Test {
bool ready_to_activate_;
int id_;
FakeImplProxy proxy_;
+ scoped_ptr<OutputSurface> output_surface_;
FakeLayerTreeHostImpl host_impl_;
FakePictureLayerImpl* pending_layer_;
FakePictureLayerImpl* active_layer_;
@@ -1423,7 +1425,11 @@ TEST_F(TileManagerTilePriorityQueueTest, RasterQueueAllUsesCorrectTileBounds) {
class TileManagerTest : public testing::Test {
public:
TileManagerTest()
- : host_impl_(&proxy_, &shared_bitmap_manager_, &task_graph_runner_) {}
+ : output_surface_(FakeOutputSurface::CreateSoftware(
+ make_scoped_ptr(new SoftwareOutputDevice))),
+ host_impl_(&proxy_, &shared_bitmap_manager_, &task_graph_runner_) {
+ host_impl_.InitializeRenderer(output_surface_.get());
+ }
protected:
// MockLayerTreeHostImpl allows us to intercept tile manager callbacks.
@@ -1432,10 +1438,7 @@ class TileManagerTest : public testing::Test {
MockLayerTreeHostImpl(Proxy* proxy,
SharedBitmapManager* manager,
TaskGraphRunner* task_graph_runner)
- : FakeLayerTreeHostImpl(proxy, manager, task_graph_runner) {
- InitializeRenderer(FakeOutputSurface::CreateSoftware(
- make_scoped_ptr(new SoftwareOutputDevice)));
- }
+ : FakeLayerTreeHostImpl(proxy, manager, task_graph_runner) {}
MOCK_METHOD0(NotifyAllTileTasksCompleted, void());
};
@@ -1443,6 +1446,7 @@ class TileManagerTest : public testing::Test {
TestSharedBitmapManager shared_bitmap_manager_;
TestTaskGraphRunner task_graph_runner_;
FakeImplProxy proxy_;
+ scoped_ptr<OutputSurface> output_surface_;
MockLayerTreeHostImpl host_impl_;
};

Powered by Google App Engine
This is Rietveld 408576698