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

Unified Diff: cc/layers/layer_proto_converter_unittest.cc

Issue 2159513003: Setup LayerTree class, refactor 2 functions from LayerTreeHost to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Layer GetLayerTree now directly uses LayerTree pointer. Created 4 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
Index: cc/layers/layer_proto_converter_unittest.cc
diff --git a/cc/layers/layer_proto_converter_unittest.cc b/cc/layers/layer_proto_converter_unittest.cc
index 5f88dc39632b0f9585a9805194cb7800cf685c5b..87a4a30c185a553e384d463ab20c07f9b898ebd4 100644
--- a/cc/layers/layer_proto_converter_unittest.cc
+++ b/cc/layers/layer_proto_converter_unittest.cc
@@ -200,26 +200,22 @@ TEST_F(LayerProtoConverterTest, RecursivePropertiesSerialization) {
// All flags for pushing properties should have been cleared.
EXPECT_FALSE(
- layer_src_root->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ layer_src_root->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
layer_src_root.get()));
+ EXPECT_FALSE(layer_src_a->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_a.get()));
+ EXPECT_FALSE(layer_src_b->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b.get()));
EXPECT_FALSE(
- layer_src_a->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_a.get()));
- EXPECT_FALSE(
- layer_src_b->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_b.get()));
- EXPECT_FALSE(
- layer_src_b_mask->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b_mask->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
layer_src_b_mask.get()));
EXPECT_FALSE(
- layer_src_b_replica->layer_tree_host()
- ->LayerNeedsPushPropertiesForTesting(layer_src_b_replica.get()));
- EXPECT_FALSE(
- layer_src_c->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_c.get()));
- EXPECT_FALSE(
- layer_src_d->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_d.get()));
+ layer_src_b_replica->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b_replica.get()));
+ EXPECT_FALSE(layer_src_c->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_c.get()));
+ EXPECT_FALSE(layer_src_d->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_d.get()));
// All layers needs to push properties as their layer tree host changed.
ASSERT_EQ(7, layer_update.layers_size());
@@ -240,26 +236,22 @@ TEST_F(LayerProtoConverterTest, RecursivePropertiesSerialization) {
// All flags for pushing properties should have been cleared.
EXPECT_FALSE(
- layer_src_root->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ layer_src_root->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
layer_src_root.get()));
+ EXPECT_FALSE(layer_src_a->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_a.get()));
+ EXPECT_FALSE(layer_src_b->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b.get()));
EXPECT_FALSE(
- layer_src_a->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_a.get()));
- EXPECT_FALSE(
- layer_src_b->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_b.get()));
- EXPECT_FALSE(
- layer_src_b_mask->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b_mask->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
layer_src_b_mask.get()));
EXPECT_FALSE(
- layer_src_b_replica->layer_tree_host()
- ->LayerNeedsPushPropertiesForTesting(layer_src_b_replica.get()));
- EXPECT_FALSE(
- layer_src_c->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_c.get()));
- EXPECT_FALSE(
- layer_src_d->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_d.get()));
+ layer_src_b_replica->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b_replica.get()));
+ EXPECT_FALSE(layer_src_c->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_c.get()));
+ EXPECT_FALSE(layer_src_d->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_d.get()));
// Only 4 of the layers should have been serialized.
ASSERT_EQ(4, layer_update.layers_size());
@@ -307,17 +299,15 @@ TEST_F(LayerProtoConverterTest, RecursivePropertiesSerializationSingleChild) {
// All flags for pushing properties should have been cleared.
EXPECT_FALSE(
- layer_src_root->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ layer_src_root->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
layer_src_root.get()));
+ EXPECT_FALSE(layer_src_b->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b.get()));
EXPECT_FALSE(
- layer_src_b->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_b.get()));
- EXPECT_FALSE(
- layer_src_b_mask->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ layer_src_b_mask->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
layer_src_b_mask.get()));
- EXPECT_FALSE(
- layer_src_c->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_c.get()));
+ EXPECT_FALSE(layer_src_c->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ layer_src_c.get()));
// Only 2 of the layers should have been serialized.
ASSERT_EQ(2, layer_update.layers_size());

Powered by Google App Engine
This is Rietveld 408576698