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

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: add proto to gyp file and modify inproper comment. 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 49da6c86b7265caa2f85245441745b9b6b8be52a..b2cc9dfbadbe245984b332f17c611598aba488a0 100644
--- a/cc/layers/layer_proto_converter_unittest.cc
+++ b/cc/layers/layer_proto_converter_unittest.cc
@@ -203,27 +203,29 @@ TEST_F(LayerProtoConverterTest, RecursivePropertiesSerialization) {
layer_src_root->layer_tree_host(), &layer_update);
// All flags for pushing properties should have been cleared.
+ EXPECT_FALSE(layer_src_root->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_root.get()));
+ EXPECT_FALSE(layer_src_a->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_a.get()));
+ EXPECT_FALSE(layer_src_b->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_b.get()));
EXPECT_FALSE(
- layer_src_root->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_root.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.get()));
+ layer_src_b_mask->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_b_mask.get()));
EXPECT_FALSE(
layer_src_b_replica->layer_tree_host()
+ ->GetLayerTree()
->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()));
+ EXPECT_FALSE(layer_src_c->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_c.get()));
+ EXPECT_FALSE(layer_src_d->layer_tree_host()
+ ->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());
@@ -243,27 +245,29 @@ TEST_F(LayerProtoConverterTest, RecursivePropertiesSerialization) {
layer_src_root->layer_tree_host(), &layer_update);
// All flags for pushing properties should have been cleared.
+ EXPECT_FALSE(layer_src_root->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_root.get()));
+ EXPECT_FALSE(layer_src_a->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_a.get()));
+ EXPECT_FALSE(layer_src_b->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_b.get()));
EXPECT_FALSE(
- layer_src_root->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_root.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.get()));
+ layer_src_b_mask->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_b_mask.get()));
EXPECT_FALSE(
layer_src_b_replica->layer_tree_host()
+ ->GetLayerTree()
->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()));
+ EXPECT_FALSE(layer_src_c->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_c.get()));
+ EXPECT_FALSE(layer_src_d->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_d.get()));
// Only 4 of the layers should have been serialized.
ASSERT_EQ(4, layer_update.layers_size());
@@ -310,18 +314,19 @@ TEST_F(LayerProtoConverterTest, RecursivePropertiesSerializationSingleChild) {
layer_src_root->layer_tree_host(), &layer_update);
// All flags for pushing properties should have been cleared.
+ EXPECT_FALSE(layer_src_root->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_root.get()));
+ EXPECT_FALSE(layer_src_b->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_b.get()));
EXPECT_FALSE(
- layer_src_root->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_root.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.get()));
- EXPECT_FALSE(
- layer_src_c->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
- layer_src_c.get()));
+ layer_src_b_mask->layer_tree_host()
+ ->GetLayerTree()
+ ->LayerNeedsPushPropertiesForTesting(layer_src_b_mask.get()));
+ EXPECT_FALSE(layer_src_c->layer_tree_host()
+ ->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