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

Unified Diff: cc/layers/layer_unittest.cc

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « cc/layers/layer_impl.cc ('k') | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index a9caa02f651b9efba26c64f705509d35f957616a..75d433563223ffdf60a4da81df9eb69fb8035178 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -1897,6 +1897,28 @@ TEST_F(LayerTest, DeleteMaskAndReplicaLayer) {
EXPECT_EQ(nullptr, layer_dest_root->replica_layer());
}
+TEST_F(LayerTest, ElementIdAndMutablePropertiesArePushed) {
+ scoped_refptr<Layer> test_layer = Layer::Create(layer_settings_);
+ scoped_ptr<LayerImpl> impl_layer =
+ LayerImpl::Create(host_impl_.active_tree(), 1);
+
+ EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
+ layer_tree_host_->SetRootLayer(test_layer));
+
+ EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(2);
+
+ test_layer->SetElementId(2);
+ test_layer->SetMutableProperties(kMutablePropertyTransform);
+
+ EXPECT_EQ(0lu, impl_layer->element_id());
+ EXPECT_EQ(kMutablePropertyNone, impl_layer->mutable_properties());
+
+ test_layer->PushPropertiesTo(impl_layer.get());
+
+ EXPECT_EQ(2lu, impl_layer->element_id());
+ EXPECT_EQ(kMutablePropertyTransform, impl_layer->mutable_properties());
+}
+
TEST_F(LayerTest, SimplePropertiesSerialization) {
/* Testing serialization of properties for a tree that looks like this:
root+
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698