Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl_unittest.cc |
| diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc |
| index 80f250ebe892e4891561617886e7e0e4b063a96d..87fd7d11cc10300bd6eedd2234c81768805782b5 100644 |
| --- a/cc/trees/layer_tree_host_impl_unittest.cc |
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc |
| @@ -5740,6 +5740,24 @@ TEST_F(LayerTreeHostImplTest, MemoryPolicy) { |
| EXPECT_EQ(nothing_cutoff_value, current_priority_cutoff_value_); |
| } |
| +TEST_F(LayerTreeHostImplTest, RequireHighResWhenVisible) { |
| + ASSERT_TRUE(host_impl_->active_tree()); |
| + |
|
danakj
2014/05/13 18:14:26
can you verify the state of RequiresHighResToDraw
|
| + host_impl_->SetVisible(false); |
| + EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw()); |
| + host_impl_->SetVisible(true); |
| + EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw()); |
| + host_impl_->SetVisible(false); |
| + EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw()); |
| + |
| + host_impl_->CreatePendingTree(); |
| + host_impl_->ActivatePendingTree(); |
| + |
| + EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw()); |
| + host_impl_->SetVisible(true); |
| + EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw()); |
| +} |
| + |
| class LayerTreeHostImplTestManageTiles : public LayerTreeHostImplTest { |
| public: |
| virtual void SetUp() OVERRIDE { |