| 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 250cb101284a43379b162e8d21ef33f4f5aa0a86..31167d6f8a37e1bf7c8af915e3982c6b170ad5f6 100644
|
| --- a/cc/trees/layer_tree_host_unittest_context.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_context.cc
|
| @@ -1003,6 +1003,11 @@ class LayerTreeHostContextTestDontUseLostResources
|
| DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
|
| LayerTreeHostImpl::FrameData* frame,
|
| DrawResult draw_result) override {
|
| + if (host_impl->active_tree()->source_frame_number() == 2) {
|
| + // Lose the context after draw on the second commit. This will cause
|
| + // a third commit to recover.
|
| + context3d_->set_times_bind_texture_succeeds(0);
|
| + }
|
| return draw_result;
|
| }
|
|
|
| @@ -1018,13 +1023,6 @@ class LayerTreeHostContextTestDontUseLostResources
|
|
|
| void DidCommitAndDrawFrame() override {
|
| ASSERT_TRUE(layer_tree_host()->hud_layer());
|
| -
|
| - if (layer_tree_host()->SourceFrameNumber() == 2) {
|
| - // Lose the context after draw on the second commit. This will cause
|
| - // a third commit to recover.
|
| - context3d_->set_times_bind_texture_succeeds(0);
|
| - }
|
| -
|
| // End the test once we know the 3nd frame drew.
|
| if (layer_tree_host()->SourceFrameNumber() < 5) {
|
| layer_tree_host()->root_layer()->SetNeedsDisplay();
|
|
|