| Index: cc/trees/layer_tree_host_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
|
| index 4e3850febc071865acdb902fafcf1f71c9e845d9..9b6bce1bba7bb25bf12ff0ec801439b6991a5155 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -464,7 +464,7 @@ class LayerTreeHostFreeWorkerContextResourcesTest : public LayerTreeHostTest {
|
| explicit MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface(
|
| bool delegated_rendering)
|
| : FakeOutputSurface(TestContextProvider::Create(),
|
| - TestContextProvider::Create(),
|
| + TestContextProvider::CreateWorker(),
|
| delegated_rendering) {}
|
| MOCK_METHOD1(SetWorkerContextShouldAggressivelyFreeResources,
|
| void(bool is_visible));
|
| @@ -6189,5 +6189,21 @@ class LayerTreeHostScrollingAndScalingUpdatesLayers : public LayerTreeHostTest {
|
|
|
| MULTI_THREAD_TEST_F(LayerTreeHostScrollingAndScalingUpdatesLayers);
|
|
|
| +class LayerTreeHostTestDestroyWhileInitializingOutputSurface
|
| + : public LayerTreeHostTest {
|
| + protected:
|
| + void BeginTest() override {
|
| + // By ending the test immediately we start initialization of an output
|
| + // surface but destroy the LTH before it completes. This test verifies
|
| + // that this works correctly and the output surface is destroyed on
|
| + // the correct thread.
|
| + EndTest();
|
| + }
|
| +
|
| + void AfterTest() override {}
|
| +};
|
| +
|
| +MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface);
|
| +
|
| } // namespace
|
| } // namespace cc
|
|
|