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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "cc/base/thread.h" | 10 #include "cc/base/thread.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 using ::testing::Mock; | 22 using ::testing::Mock; |
23 using ::testing::_; | 23 using ::testing::_; |
24 using ::testing::AtLeast; | 24 using ::testing::AtLeast; |
25 using ::testing::AnyNumber; | 25 using ::testing::AnyNumber; |
26 | 26 |
27 namespace cc { | 27 namespace cc { |
28 namespace { | 28 namespace { |
29 | 29 |
30 class MockLayerTreeHost : public LayerTreeHost { | 30 class MockLayerTreeHost : public LayerTreeHost { |
31 public: | 31 public: |
32 MockLayerTreeHost(LayerTreeHostClient* client) | 32 explicit MockLayerTreeHost(LayerTreeHostClient* client) |
33 : LayerTreeHost(client, LayerTreeSettings()) { | 33 : LayerTreeHost(client, LayerTreeSettings()) { |
34 Initialize(scoped_ptr<Thread>(NULL)); | 34 Initialize(scoped_ptr<Thread>(NULL)); |
35 } | 35 } |
36 | 36 |
37 MOCK_METHOD0(AcquireLayerTextures, void()); | 37 MOCK_METHOD0(AcquireLayerTextures, void()); |
38 MOCK_METHOD0(SetNeedsCommit, void()); | 38 MOCK_METHOD0(SetNeedsCommit, void()); |
39 }; | 39 }; |
40 | 40 |
41 class TextureLayerTest : public testing::Test { | 41 class TextureLayerTest : public testing::Test { |
42 public: | 42 public: |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 EXPECT_CALL(test_data_.mock_callback_, Release(_, _)).Times(0); | 469 EXPECT_CALL(test_data_.mock_callback_, Release(_, _)).Times(0); |
470 provider->DeleteResource(id); | 470 provider->DeleteResource(id); |
471 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); | 471 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); |
472 EXPECT_CALL(test_data_.mock_callback_, Release(test_data_.mailbox_name1_, _)) | 472 EXPECT_CALL(test_data_.mock_callback_, Release(test_data_.mailbox_name1_, _)) |
473 .Times(1); | 473 .Times(1); |
474 provider->ReceiveFromParent(list); | 474 provider->ReceiveFromParent(list); |
475 } | 475 } |
476 | 476 |
477 } // namespace | 477 } // namespace |
478 } // namespace cc | 478 } // namespace cc |
OLD | NEW |