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

Unified Diff: ui/compositor/layer_unittest.cc

Issue 12093067: Handle ui::Layer's visibility using cc::Layer's m_isDrawable flag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address review comments Created 7 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
« ui/compositor/layer.cc ('K') | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_unittest.cc
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index fb32a9f7a5c96ba04539ef23022bd5cfdea793bd..011ad89f78cb480dd7c889d4f07ab5e0d4c418f6 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -629,9 +629,9 @@ TEST_F(LayerWithNullDelegateTest, Visibility) {
EXPECT_TRUE(l1->IsDrawn());
EXPECT_TRUE(l2->IsDrawn());
EXPECT_TRUE(l3->IsDrawn());
- EXPECT_EQ(1.f, l1->cc_layer()->opacity());
- EXPECT_EQ(1.f, l2->cc_layer()->opacity());
- EXPECT_EQ(1.f, l3->cc_layer()->opacity());
+ EXPECT_TRUE(l1->cc_layer()->drawsContent());
+ EXPECT_TRUE(l2->cc_layer()->drawsContent());
+ EXPECT_TRUE(l3->cc_layer()->drawsContent());
compositor()->SetRootLayer(l1.get());
@@ -641,19 +641,25 @@ TEST_F(LayerWithNullDelegateTest, Visibility) {
EXPECT_FALSE(l1->IsDrawn());
EXPECT_FALSE(l2->IsDrawn());
EXPECT_FALSE(l3->IsDrawn());
- EXPECT_EQ(0.f, l1->cc_layer()->opacity());
+ EXPECT_FALSE(l1->cc_layer()->drawsContent());
+ EXPECT_FALSE(l2->cc_layer()->drawsContent());
+ EXPECT_FALSE(l3->cc_layer()->drawsContent());
l3->SetVisible(false);
EXPECT_FALSE(l1->IsDrawn());
EXPECT_FALSE(l2->IsDrawn());
EXPECT_FALSE(l3->IsDrawn());
- EXPECT_EQ(0.f, l3->cc_layer()->opacity());
+ EXPECT_FALSE(l1->cc_layer()->drawsContent());
+ EXPECT_FALSE(l2->cc_layer()->drawsContent());
+ EXPECT_FALSE(l3->cc_layer()->drawsContent());
l1->SetVisible(true);
EXPECT_TRUE(l1->IsDrawn());
EXPECT_TRUE(l2->IsDrawn());
EXPECT_FALSE(l3->IsDrawn());
- EXPECT_EQ(1.f, l1->cc_layer()->opacity());
+ EXPECT_TRUE(l1->cc_layer()->drawsContent());
+ EXPECT_TRUE(l2->cc_layer()->drawsContent());
+ EXPECT_FALSE(l3->cc_layer()->drawsContent());
}
// Checks that stacking-related methods behave as advertised.
« ui/compositor/layer.cc ('K') | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698