Chromium Code Reviews| 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); |
| } |