Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CompositorMutatorClientTest.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/callback.h" 7 #include "base/callback.h"
8 #include "platform/graphics/CompositorMutation.h" 8 #include "platform/graphics/CompositorMutation.h"
9 #include "platform/graphics/CompositorMutationsTarget.h" 9 #include "platform/graphics/CompositorMutationsTarget.h"
10 #include "platform/graphics/CompositorMutator.h" 10 #include "platform/graphics/CompositorMutator.h"
(...skipping 20 matching lines...) Expand all
31 class MockCompositoMutationsTarget : public CompositorMutationsTarget { 31 class MockCompositoMutationsTarget : public CompositorMutationsTarget {
32 public: 32 public:
33 MOCK_METHOD1(applyMutations, void(CompositorMutations*)); 33 MOCK_METHOD1(applyMutations, void(CompositorMutations*));
34 }; 34 };
35 35
36 TEST(CompositorMutatorClient, CallbackForNonNullMutationsShouldApply) { 36 TEST(CompositorMutatorClient, CallbackForNonNullMutationsShouldApply) {
37 MockCompositoMutationsTarget target; 37 MockCompositoMutationsTarget target;
38 38
39 CompositorMutatorClient client(new StubCompositorMutator, &target); 39 CompositorMutatorClient client(new StubCompositorMutator, &target);
40 std::unique_ptr<CompositorMutations> mutations = 40 std::unique_ptr<CompositorMutations> mutations =
41 makeUnique<CompositorMutations>(); 41 WTF::makeUnique<CompositorMutations>();
42 client.setMutationsForTesting(std::move(mutations)); 42 client.setMutationsForTesting(std::move(mutations));
43 43
44 EXPECT_CALL(target, applyMutations(_)); 44 EXPECT_CALL(target, applyMutations(_));
45 client.TakeMutations().Run(); 45 client.TakeMutations().Run();
46 } 46 }
47 47
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698