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

Unified Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 2044803002: cc: Clear always_use_active_tree_opacity_effect_ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | cc/trees/property_tree_builder.cc » ('j') | cc/trees/property_tree_builder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/scrollbar_layer_unittest.cc
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index a9df426fde8d4735f52a0c267aa6f7cef5e3dcd5..d9d92ac2193a99c42b7b0612ae70dde8f4093397 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -527,6 +527,18 @@ TEST_F(ScrollbarLayerTest, ScrollbarLayerOpacity) {
layer_tree_root->SetBounds(gfx::Size(2, 2));
scroll_layer->SetBounds(gfx::Size(10, 10));
+ // Building property trees twice shouldn't change the size of
+ // PropertyTrees::always_use_active_tree_opacity_effect_ids.
+ layer_tree_host_->BuildPropertyTreesForTesting();
+ EXPECT_EQ(layer_tree_host_->property_trees()
+ ->always_use_active_tree_opacity_effect_ids.size(),
+ 1u);
+ layer_tree_host_->property_trees()->needs_rebuild = true;
+ layer_tree_host_->BuildPropertyTreesForTesting();
+ EXPECT_EQ(layer_tree_host_->property_trees()
+ ->always_use_active_tree_opacity_effect_ids.size(),
+ 1u);
+
// A solid color scrollbar layer's opacity is initialized to 0 on main thread
layer_tree_host_->UpdateLayers();
EffectNode* node = layer_tree_host_->property_trees()->effect_tree.Node(
« no previous file with comments | « no previous file | cc/trees/property_tree_builder.cc » ('j') | cc/trees/property_tree_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698