| Index: cc/trees/layer_tree_host_unittest_context.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
|
| index 6b95121ac7ee304f513f6f4af07130f18b9c0fe1..abde0a85a4b874d7d2b6ff4a876efb3d2ae9e5ef 100644
|
| --- a/cc/trees/layer_tree_host_unittest_context.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_context.cc
|
| @@ -155,7 +155,8 @@ class LayerTreeHostContextTest : public LayerTreeTest {
|
| LayerTreeHostImpl::FrameData* frame,
|
| bool result)
|
| OVERRIDE {
|
| - EXPECT_TRUE(result);
|
| + bool expect_success = !frame->has_no_damage;
|
| + EXPECT_EQ(expect_success, result);
|
| if (!times_to_lose_during_draw_)
|
| return result;
|
|
|
| @@ -269,7 +270,8 @@ class LayerTreeHostContextTestLostContextSucceeds
|
| }
|
|
|
| virtual void InvalidateAndSetNeedsCommit() {
|
| - layer_tree_host()->SetNeedsCommit();
|
| + // Cause damage so we try to draw.
|
| + layer_tree_host()->root_layer()->SetNeedsDisplay();
|
| }
|
|
|
| bool NextTestCase() {
|
| @@ -1050,10 +1052,9 @@ class LayerTreeHostContextTestDontUseLostResources
|
| }
|
| }
|
|
|
| - virtual bool PrepareToDrawOnThread(
|
| - LayerTreeHostImpl* host_impl,
|
| - LayerTreeHostImpl::FrameData* frame,
|
| - bool result) OVERRIDE {
|
| + virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
|
| + LayerTreeHostImpl::FrameData* frame,
|
| + bool result) OVERRIDE {
|
| if (host_impl->active_tree()->source_frame_number() == 2) {
|
| // Lose the context during draw on the second commit. This will cause
|
| // a third commit to recover.
|
|
|