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

Unified Diff: cc/trees/layer_tree_host_unittest_serialization.cc

Issue 1584653004: Ensure Layers have valid sequence numbers for PropertyTrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « cc/trees/layer_tree_host.cc ('k') | 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_unittest_serialization.cc
diff --git a/cc/trees/layer_tree_host_unittest_serialization.cc b/cc/trees/layer_tree_host_unittest_serialization.cc
index 2f662b6e218ac88173e3f049a69a72d941faaa24..977019a5cb523631d449eda97fd47e02bd07ad5d 100644
--- a/cc/trees/layer_tree_host_unittest_serialization.cc
+++ b/cc/trees/layer_tree_host_unittest_serialization.cc
@@ -142,6 +142,15 @@ class LayerTreeHostSerializationTest : public testing::Test {
layer_tree_host_dst_->surface_id_namespace_);
EXPECT_EQ(layer_tree_host_src_->next_surface_sequence_,
layer_tree_host_dst_->next_surface_sequence_);
+
+ // All layers must have a property tree index that matches PropertyTrees.
+ if (layer_tree_host_dst_->property_trees_.sequence_number) {
+ int seq_num = layer_tree_host_dst_->property_trees_.sequence_number;
+ LayerTreeHostCommon::CallFunctionForSubtree(
+ layer_tree_host_dst_->root_layer_.get(), [seq_num](Layer* layer) {
+ EXPECT_EQ(seq_num, layer->property_tree_sequence_number());
+ });
+ }
}
void RunAllMembersChangedTest() {
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698