OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/graphics/CompositorMutatorClient.h" | 5 #include "platform/graphics/CompositorMutatorClient.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "base/callback.h" | 8 #include "base/callback.h" |
8 #include "platform/graphics/CompositorMutation.h" | 9 #include "platform/graphics/CompositorMutation.h" |
9 #include "platform/graphics/CompositorMutationsTarget.h" | 10 #include "platform/graphics/CompositorMutationsTarget.h" |
10 #include "platform/graphics/CompositorMutator.h" | 11 #include "platform/graphics/CompositorMutator.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "wtf/PtrUtil.h" | 14 #include "wtf/PtrUtil.h" |
14 #include <memory> | |
15 | 15 |
16 using ::testing::_; | 16 using ::testing::_; |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 namespace { | 19 namespace { |
20 | 20 |
21 class StubCompositorMutator : public CompositorMutator { | 21 class StubCompositorMutator : public CompositorMutator { |
22 public: | 22 public: |
23 StubCompositorMutator() {} | 23 StubCompositorMutator() {} |
24 | 24 |
(...skipping 23 matching lines...) Expand all Loading... |
48 TEST(CompositorMutatorClient, CallbackForNullMutationsShouldBeNoop) { | 48 TEST(CompositorMutatorClient, CallbackForNullMutationsShouldBeNoop) { |
49 MockCompositoMutationsTarget target; | 49 MockCompositoMutationsTarget target; |
50 CompositorMutatorClient client(new StubCompositorMutator, &target); | 50 CompositorMutatorClient client(new StubCompositorMutator, &target); |
51 | 51 |
52 EXPECT_CALL(target, applyMutations(_)).Times(0); | 52 EXPECT_CALL(target, applyMutations(_)).Times(0); |
53 EXPECT_TRUE(client.TakeMutations().is_null()); | 53 EXPECT_TRUE(client.TakeMutations().is_null()); |
54 } | 54 } |
55 | 55 |
56 } // namespace | 56 } // namespace |
57 } // namespace blink | 57 } // namespace blink |
OLD | NEW |