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/layers/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 using ::testing::Mock; | 36 using ::testing::Mock; |
37 using ::testing::_; | 37 using ::testing::_; |
38 using ::testing::AtLeast; | 38 using ::testing::AtLeast; |
39 using ::testing::AnyNumber; | 39 using ::testing::AnyNumber; |
40 | 40 |
41 namespace cc { | 41 namespace cc { |
42 namespace { | 42 namespace { |
43 | 43 |
44 class MockLayerTreeHost : public LayerTreeHost { | 44 class MockLayerTreeHost : public LayerTreeHost { |
45 public: | 45 public: |
46 explicit MockLayerTreeHost(LayerTreeHostClient* client) | 46 explicit MockLayerTreeHost(FakeLayerTreeHostClient* client) |
47 : LayerTreeHost(client, NULL, LayerTreeSettings()) { | 47 : LayerTreeHost(client, NULL, LayerTreeSettings()) { |
48 Initialize(NULL); | 48 InitializeSingleThreaded(client); |
49 } | 49 } |
50 | 50 |
51 MOCK_METHOD0(AcquireLayerTextures, void()); | 51 MOCK_METHOD0(AcquireLayerTextures, void()); |
52 MOCK_METHOD0(SetNeedsCommit, void()); | 52 MOCK_METHOD0(SetNeedsCommit, void()); |
53 MOCK_METHOD0(SetNeedsUpdateLayers, void()); | 53 MOCK_METHOD0(SetNeedsUpdateLayers, void()); |
54 MOCK_METHOD0(StartRateLimiter, void()); | 54 MOCK_METHOD0(StartRateLimiter, void()); |
55 MOCK_METHOD0(StopRateLimiter, void()); | 55 MOCK_METHOD0(StopRateLimiter, void()); |
56 }; | 56 }; |
57 | 57 |
58 class TextureLayerTest : public testing::Test { | 58 class TextureLayerTest : public testing::Test { |
(...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2144 int callback_count_; | 2144 int callback_count_; |
2145 scoped_refptr<Layer> root_; | 2145 scoped_refptr<Layer> root_; |
2146 scoped_refptr<TextureLayer> layer_; | 2146 scoped_refptr<TextureLayer> layer_; |
2147 }; | 2147 }; |
2148 | 2148 |
2149 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 2149 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
2150 TextureLayerWithMailboxImplThreadDeleted); | 2150 TextureLayerWithMailboxImplThreadDeleted); |
2151 | 2151 |
2152 } // namespace | 2152 } // namespace |
2153 } // namespace cc | 2153 } // namespace cc |
OLD | NEW |