| Index: cc/surfaces/display_unittest.cc
|
| diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
|
| index 7b82d961312394cf82eff0cde63c3fb2654afa7a..6b0ab1287f42ffff1ffd3bf503362a77cc194bc4 100644
|
| --- a/cc/surfaces/display_unittest.cc
|
| +++ b/cc/surfaces/display_unittest.cc
|
| @@ -395,6 +395,30 @@ TEST_F(DisplayTest, DisplayDamaged) {
|
| EXPECT_EQ(6u, output_surface_ptr_->num_sent_frames());
|
| }
|
|
|
| + {
|
| + // Surface that's damaged completely should be resized and swapped.
|
| + pass = RenderPass::Create();
|
| + pass->output_rect = gfx::Rect(0, 0, 99, 99);
|
| + pass->damage_rect = gfx::Rect(0, 0, 99, 99);
|
| + pass->id = RenderPassId(1, 1);
|
| +
|
| + pass_list.push_back(pass.Pass());
|
| + scheduler.ResetDamageForTest();
|
| + SubmitCompositorFrame(&pass_list, surface_id);
|
| + EXPECT_TRUE(scheduler.damaged);
|
| + EXPECT_FALSE(scheduler.display_resized_);
|
| + EXPECT_FALSE(scheduler.has_new_root_surface);
|
| +
|
| + scheduler.swapped = false;
|
| + display.DrawAndSwap();
|
| + EXPECT_TRUE(scheduler.swapped);
|
| + EXPECT_EQ(7u, output_surface_ptr_->num_sent_frames());
|
| + EXPECT_EQ(gfx::Size(100, 100),
|
| + software_output_device_->viewport_pixel_size());
|
| + EXPECT_EQ(gfx::Rect(0, 0, 100, 100),
|
| + software_output_device_->damage_rect());
|
| + }
|
| +
|
| factory_.Destroy(surface_id);
|
| }
|
|
|
|
|