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

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

Issue 8515006: A fix for LayerNoTextureSetFillsBoundsOpaquely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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.h ('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 a6fd0fb777d2fdfc72fac5d2243655dc130810b7..c25615ae6363d7a888c111541e650617173ef00d 100644
--- a/ui/gfx/compositor/layer_unittest.cc
+++ b/ui/gfx/compositor/layer_unittest.cc
@@ -465,6 +465,10 @@ class LayerWithNullDelegateTest : public LayerWithDelegateTest {
return layer;
}
+ void RunPendingMessages() {
+ MessageLoopForUI::current()->RunAllPending();
+ }
+
private:
scoped_ptr<NullLayerDelegate> default_layer_delegate_;
@@ -479,7 +483,17 @@ TEST_F(LayerWithNullDelegateTest, LayerNoTextureSetFillsBoundsOpaquely) {
parent->Add(child.get());
compositor()->SetRootLayer(parent.get());
+ parent->SetFillsBoundsOpaquely(true);
sky 2011/11/10 20:20:53 Why should this matter if the layer has texture?
+ child->SetFillsBoundsOpaquely(true);
+ Draw();
+ RunPendingMessages();
+ EXPECT_TRUE(child->texture() == NULL);
+ EXPECT_TRUE(parent->texture() == NULL);
+
+ parent->SetFillsBoundsOpaquely(false);
+ child->SetFillsBoundsOpaquely(false);
Draw();
+ RunPendingMessages();
EXPECT_TRUE(child->texture() == NULL);
EXPECT_TRUE(parent->texture() == NULL);
}
« no previous file with comments | « ui/gfx/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698