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 44347d3e88493e6e617298c1b1cda2ac18812b4d..c6b6ba396254b511cb335c286cf846f671d06643 100644 |
--- a/cc/trees/layer_tree_host_unittest_context.cc |
+++ b/cc/trees/layer_tree_host_unittest_context.cc |
@@ -1286,7 +1286,7 @@ class LayerTreeHostContextTestDontUseLostResources |
virtual scoped_ptr<OutputSurface> CreateOutputSurface( |
bool fallback) OVERRIDE { |
- if (layer_tree_host()) { |
+ if (layer_tree_host()->source_frame_number() > 0) { |
danakj
2013/11/26 16:35:15
Can you explain this one?
no sievers
2013/11/26 19:28:37
What this function was doing is return an output s
no sievers
2013/11/26 19:30:23
Actually, it's not failing the output surface crea
danakj
2013/11/26 19:44:58
Ah, right ok. Comment would be nice thanks :)
|
lost_context_ = true; |
EXPECT_EQ(layer_tree_host()->source_frame_number(), 3); |
} |
@@ -1762,43 +1762,6 @@ class LayerTreeHostContextTestFailsToCreateSurface |
SINGLE_AND_MULTI_THREAD_TEST_F( |
LayerTreeHostContextTestFailsToCreateSurface); |
-// Not reusing LayerTreeTest because it expects creating LTH to always succeed. |
-class LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface |
- : public testing::Test, |
- public FakeLayerTreeHostClient { |
- public: |
- LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface() |
- : FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D) {} |
- |
- // FakeLayerTreeHostClient implementation. |
- virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) |
- OVERRIDE { |
- return scoped_ptr<OutputSurface>(); |
- } |
- |
- void RunTest(bool threaded, |
- bool delegating_renderer, |
- bool impl_side_painting) { |
- LayerTreeSettings settings; |
- settings.impl_side_painting = impl_side_painting; |
- if (threaded) { |
- scoped_ptr<base::Thread> impl_thread(new base::Thread("LayerTreeTest")); |
- ASSERT_TRUE(impl_thread->Start()); |
- ASSERT_TRUE(impl_thread->message_loop_proxy().get()); |
- scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::CreateThreaded( |
- this, NULL, settings, impl_thread->message_loop_proxy()); |
- EXPECT_FALSE(layer_tree_host); |
- } else { |
- scoped_ptr<LayerTreeHost> layer_tree_host = |
- LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings); |
- EXPECT_FALSE(layer_tree_host); |
- } |
- } |
-}; |
- |
-SINGLE_AND_MULTI_THREAD_TEST_F( |
- LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface); |
- |
class UIResourceLostTest : public LayerTreeHostContextTest { |
public: |
UIResourceLostTest() : time_step_(0) {} |