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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 1257443003: Remove Duplicate LayerTreeHostCommonTest on Main Thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index ed69ff9bd39c37878f155c2e6a884a98c80522ec..2d6f7160a364802b31be97b043be2880f5ec6ddd 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -4833,65 +4833,6 @@ INSTANTIATE_TEST_CASE_P(LayerTreeHostCommonTest,
testing::Bool(),
testing::Bool()));
-TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayer) {
- FakeImplProxy proxy;
- TestSharedBitmapManager shared_bitmap_manager;
- TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
- &task_graph_runner);
- host_impl.CreatePendingTree();
- const gfx::Transform identity_matrix;
-
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
- SetLayerPropertiesForTesting(root.get(),
- identity_matrix,
- gfx::Point3F(),
- gfx::PointF(),
- gfx::Size(50, 50),
- true,
- false);
- root->SetIsDrawable(true);
-
- scoped_refptr<Layer> child = Layer::Create(layer_settings());
- SetLayerPropertiesForTesting(child.get(),
- identity_matrix,
- gfx::Point3F(),
- gfx::PointF(),
- gfx::Size(40, 40),
- true,
- false);
- child->SetIsDrawable(true);
-
- scoped_refptr<Layer> grand_child = Layer::Create(layer_settings());
- SetLayerPropertiesForTesting(grand_child.get(),
- identity_matrix,
- gfx::Point3F(),
- gfx::PointF(),
- gfx::Size(30, 30),
- true,
- false);
- grand_child->SetIsDrawable(true);
- grand_child->SetHideLayerAndSubtree(true);
-
- child->AddChild(grand_child);
- root->AddChild(child);
-
- host()->SetRootLayer(root);
-
- RenderSurfaceLayerList render_surface_layer_list;
- LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs(
- root.get(), root->bounds(), &render_surface_layer_list);
- inputs.can_adjust_raster_scales = true;
- LayerTreeHostCommon::CalculateDrawProperties(&inputs);
-
- // We should have one render surface and two layers. The grand child has
- // hidden itself.
- ASSERT_EQ(1u, render_surface_layer_list.size());
- ASSERT_EQ(2u, root->render_surface()->layer_list().size());
- EXPECT_EQ(root->id(), root->render_surface()->layer_list().at(0)->id());
- EXPECT_EQ(child->id(), root->render_surface()->layer_list().at(1)->id());
-}
-
TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) {
FakeImplProxy proxy;
TestSharedBitmapManager shared_bitmap_manager;
@@ -4939,64 +4880,6 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) {
EXPECT_EQ(2, root->render_surface()->layer_list().at(1)->id());
}
-TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayers) {
- FakeImplProxy proxy;
- TestSharedBitmapManager shared_bitmap_manager;
- TestTaskGraphRunner task_graph_runner;
- FakeLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager,
- &task_graph_runner);
- host_impl.CreatePendingTree();
- const gfx::Transform identity_matrix;
-
- scoped_refptr<Layer> root = Layer::Create(layer_settings());
- SetLayerPropertiesForTesting(root.get(),
- identity_matrix,
- gfx::Point3F(),
- gfx::PointF(),
- gfx::Size(50, 50),
- true,
- false);
- root->SetIsDrawable(true);
-
- scoped_refptr<Layer> child = Layer::Create(layer_settings());
- SetLayerPropertiesForTesting(child.get(),
- identity_matrix,
- gfx::Point3F(),
- gfx::PointF(),
- gfx::Size(40, 40),
- true,
- false);
- child->SetIsDrawable(true);
- child->SetHideLayerAndSubtree(true);
-
- scoped_refptr<Layer> grand_child = Layer::Create(layer_settings());
- SetLayerPropertiesForTesting(grand_child.get(),
- identity_matrix,
- gfx::Point3F(),
- gfx::PointF(),
- gfx::Size(30, 30),
- true,
- false);
- grand_child->SetIsDrawable(true);
-
- child->AddChild(grand_child);
- root->AddChild(child);
-
- host()->SetRootLayer(root);
-
- RenderSurfaceLayerList render_surface_layer_list;
- LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs(
- root.get(), root->bounds(), &render_surface_layer_list);
- inputs.can_adjust_raster_scales = true;
- LayerTreeHostCommon::CalculateDrawProperties(&inputs);
-
- // We should have one render surface and one layers. The child has
- // hidden itself and the grand child.
- ASSERT_EQ(1u, render_surface_layer_list.size());
- ASSERT_EQ(1u, root->render_surface()->layer_list().size());
- EXPECT_EQ(root->id(), root->render_surface()->layer_list().at(0)->id());
-}
-
TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayersImpl) {
FakeImplProxy proxy;
TestSharedBitmapManager shared_bitmap_manager;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698