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

Unified Diff: ui/gfx/compositor/layer_unittest.cc

Issue 8400014: Fix visibility on WebLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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 | « ui/gfx/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/gfx/compositor/layer_unittest.cc
diff --git a/ui/gfx/compositor/layer_unittest.cc b/ui/gfx/compositor/layer_unittest.cc
index ae63345959994d4b5c8227df728384659c7f0ca6..a5e64febc619faf0bf0fda4ea86b353e51c9c233 100644
--- a/ui/gfx/compositor/layer_unittest.cc
+++ b/ui/gfx/compositor/layer_unittest.cc
@@ -867,6 +867,11 @@ TEST_F(LayerWithNullDelegateTest, Visibility) {
EXPECT_TRUE(l1->IsDrawn());
EXPECT_TRUE(l2->IsDrawn());
EXPECT_TRUE(l3->IsDrawn());
+#if defined(USE_WEBKIT_COMPOSITOR)
+ EXPECT_EQ(1.f, l1->web_layer().opacity());
+ EXPECT_EQ(1.f, l2->web_layer().opacity());
+ EXPECT_EQ(1.f, l3->web_layer().opacity());
+#endif
compositor()->SetRootLayer(l1.get());
@@ -876,16 +881,25 @@ TEST_F(LayerWithNullDelegateTest, Visibility) {
EXPECT_FALSE(l1->IsDrawn());
EXPECT_FALSE(l2->IsDrawn());
EXPECT_FALSE(l3->IsDrawn());
+#if defined(USE_WEBKIT_COMPOSITOR)
+ EXPECT_EQ(0.f, l1->web_layer().opacity());
+#endif
l3->SetVisible(false);
EXPECT_FALSE(l1->IsDrawn());
EXPECT_FALSE(l2->IsDrawn());
EXPECT_FALSE(l3->IsDrawn());
+#if defined(USE_WEBKIT_COMPOSITOR)
+ EXPECT_EQ(0.f, l3->web_layer().opacity());
+#endif
l1->SetVisible(true);
EXPECT_TRUE(l1->IsDrawn());
EXPECT_TRUE(l2->IsDrawn());
EXPECT_FALSE(l3->IsDrawn());
+#if defined(USE_WEBKIT_COMPOSITOR)
+ EXPECT_EQ(1.f, l1->web_layer().opacity());
+#endif
}
} // namespace ui
« no previous file with comments | « ui/gfx/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698