OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
9 #include "cc/layers/delegated_frame_provider.h" | 9 #include "cc/layers/delegated_frame_provider.h" |
10 #include "cc/layers/delegated_frame_resource_collection.h" | 10 #include "cc/layers/delegated_frame_resource_collection.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 return; | 126 return; |
127 --times_to_lose_during_commit_; | 127 --times_to_lose_during_commit_; |
128 LoseContext(); | 128 LoseContext(); |
129 | 129 |
130 times_to_fail_create_ = times_to_fail_recreate_; | 130 times_to_fail_create_ = times_to_fail_recreate_; |
131 times_to_fail_recreate_ = 0; | 131 times_to_fail_recreate_ = 0; |
132 } | 132 } |
133 | 133 |
134 void DidFailToInitializeOutputSurface() override { ++times_create_failed_; } | 134 void DidFailToInitializeOutputSurface() override { ++times_create_failed_; } |
135 | 135 |
136 virtual void TearDown() override { | 136 void TearDown() override { |
137 LayerTreeTest::TearDown(); | 137 LayerTreeTest::TearDown(); |
138 EXPECT_EQ(times_to_expect_create_failed_, times_create_failed_); | 138 EXPECT_EQ(times_to_expect_create_failed_, times_create_failed_); |
139 } | 139 } |
140 | 140 |
141 void ExpectCreateToFail() { ++times_to_expect_create_failed_; } | 141 void ExpectCreateToFail() { ++times_to_expect_create_failed_; } |
142 | 142 |
143 protected: | 143 protected: |
144 TestWebGraphicsContext3D* context3d_; | 144 TestWebGraphicsContext3D* context3d_; |
145 int times_to_fail_create_; | 145 int times_to_fail_create_; |
146 int times_to_lose_during_commit_; | 146 int times_to_lose_during_commit_; |
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 void AfterTest() override {} | 1777 void AfterTest() override {} |
1778 | 1778 |
1779 bool deferred_; | 1779 bool deferred_; |
1780 }; | 1780 }; |
1781 | 1781 |
1782 SINGLE_AND_MULTI_THREAD_TEST_F( | 1782 SINGLE_AND_MULTI_THREAD_TEST_F( |
1783 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1783 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
1784 | 1784 |
1785 } // namespace | 1785 } // namespace |
1786 } // namespace cc | 1786 } // namespace cc |
OLD | NEW |