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

Side by Side Diff: third_party/WebKit/Source/platform/testing/WebLayerMock.h

Issue 1550243002: Blink CompositorAnimations: Add more tests for integration with CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assert-if
Patch Set: Rebase. Mock abortAnimation methods. Created 4 years, 11 months 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
(Empty)
1 /*
2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND AN Y
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR AN Y
17 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND O N
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25 #ifndef WebLayerMock_h
26 #define WebLayerMock_h
27
28 #include "platform/transforms/TransformationMatrix.h"
29 #include "public/platform/WebLayer.h"
30 #include "public/platform/WebLayerPositionConstraint.h"
31
32 #include <gmock/gmock.h>
33 #include <gtest/gtest.h>
34
35 namespace blink {
36
37 class WebLayerMock : public WebLayer {
38 public:
Ian Vollick 2015/12/29 20:32:24 How will developers know to update this if they ch
loyso (OOO) 2015/12/29 23:54:25 webkit_unit_tests target will fail to compile, AFA
39 MOCK_CONST_METHOD0(id, int());
40 MOCK_METHOD1(invalidateRect, void(const WebRect&));
41 MOCK_METHOD0(invalidate, void());
42 MOCK_METHOD1(addChild, void(WebLayer*));
43 MOCK_METHOD2(insertChild, void(WebLayer*, size_t index));
44 MOCK_METHOD2(replaceChild, void(WebLayer* reference, WebLayer* newLayer));
45 MOCK_METHOD0(removeFromParent, void());
46 MOCK_METHOD0(removeAllChildren, void());
47 MOCK_METHOD1(setBounds, void(const WebSize&));
48 MOCK_CONST_METHOD0(bounds, WebSize());
49 MOCK_METHOD1(setMasksToBounds, void(bool));
50 MOCK_CONST_METHOD0(masksToBounds, bool());
51 MOCK_METHOD1(setMaskLayer, void(WebLayer*));
52 MOCK_METHOD1(setReplicaLayer, void(WebLayer*));
53 MOCK_METHOD1(setOpacity, void(float));
54 MOCK_CONST_METHOD0(opacity, float());
55 MOCK_METHOD1(setBlendMode, void(WebBlendMode));
56 MOCK_CONST_METHOD0(blendMode, WebBlendMode());
57 MOCK_METHOD1(setIsRootForIsolatedGroup, void(bool));
58 MOCK_METHOD0(isRootForIsolatedGroup, bool());
59 MOCK_METHOD1(setOpaque, void(bool));
60 MOCK_CONST_METHOD0(opaque, bool());
61 MOCK_METHOD1(setPosition, void(const WebFloatPoint&));
62 MOCK_CONST_METHOD0(position, WebFloatPoint());
63 MOCK_METHOD1(setTransform, void(const SkMatrix44&));
64 MOCK_CONST_METHOD0(transform, SkMatrix44());
65 MOCK_METHOD1(setTransformOrigin, void(const WebFloatPoint3D&));
66 MOCK_CONST_METHOD0(transformOrigin, WebFloatPoint3D());
67 MOCK_METHOD1(setDrawsContent, void(bool));
68 MOCK_CONST_METHOD0(drawsContent, bool());
69 MOCK_METHOD1(setDoubleSided, void(bool));
70 MOCK_METHOD1(setShouldFlattenTransform, void(bool));
71 MOCK_METHOD1(setRenderingContext, void(int id));
72 MOCK_METHOD1(setUseParentBackfaceVisibility, void(bool));
73 MOCK_METHOD1(setBackgroundColor, void(WebColor));
74 MOCK_CONST_METHOD0(backgroundColor, WebColor());
75 MOCK_METHOD1(setFilters, void(const WebFilterOperations&));
76 MOCK_METHOD1(setBackgroundFilters, void(const WebFilterOperations&));
77 MOCK_METHOD1(setAnimationDelegate, void(WebCompositorAnimationDelegate*));
78 MOCK_METHOD1(addAnimation, bool(WebCompositorAnimation*));
79 MOCK_METHOD1(removeAnimation, void(int animationId));
80 MOCK_METHOD2(removeAnimation, void(int animationId, WebCompositorAnimation:: TargetProperty));
81 MOCK_METHOD2(pauseAnimation, void(int animationId, double timeOffset));
82 MOCK_METHOD1(abortAnimation, void(int animationId));
83 MOCK_METHOD0(hasActiveAnimation, bool());
84 MOCK_METHOD1(setScrollParent, void(WebLayer*));
85 MOCK_METHOD1(setClipParent, void(WebLayer*));
86 MOCK_METHOD1(setScrollPositionDouble, void(WebDoublePoint));
87 MOCK_CONST_METHOD0(scrollPositionDouble, WebDoublePoint());
88 MOCK_METHOD1(setScrollCompensationAdjustment, void(WebDoublePoint));
89 MOCK_METHOD1(setScrollClipLayer, void(WebLayer*));
90 MOCK_CONST_METHOD0(scrollable, bool());
91 MOCK_METHOD2(setUserScrollable, void(bool horizontal, bool vertical));
92 MOCK_CONST_METHOD0(userScrollableHorizontal, bool());
93 MOCK_CONST_METHOD0(userScrollableVertical, bool());
94 MOCK_METHOD1(setHaveWheelEventHandlers, void(bool));
95 MOCK_CONST_METHOD0(haveWheelEventHandlers, bool());
96 MOCK_METHOD1(setHaveScrollEventHandlers, void(bool));
97 MOCK_CONST_METHOD0(haveScrollEventHandlers, bool());
98 MOCK_METHOD1(setShouldScrollOnMainThread, void(bool));
99 MOCK_CONST_METHOD0(shouldScrollOnMainThread, bool());
100 MOCK_METHOD1(setNonFastScrollableRegion, void(const WebVector<WebRect>&));
101 MOCK_CONST_METHOD0(nonFastScrollableRegion, WebVector<WebRect>());
102 MOCK_METHOD1(setTouchEventHandlerRegion, void(const WebVector<WebRect>&));
103 MOCK_CONST_METHOD0(touchEventHandlerRegion, WebVector<WebRect>());
104 MOCK_METHOD1(setFrameTimingRequests, void(const WebVector<std::pair<int64_t, WebRect>>&));
105 MOCK_CONST_METHOD0(frameTimingRequests, WebVector<std::pair<int64_t, WebRect >>());
106 MOCK_METHOD1(setScrollBlocksOn, void(WebScrollBlocksOn));
107 MOCK_CONST_METHOD0(scrollBlocksOn, WebScrollBlocksOn());
108 MOCK_METHOD1(setIsContainerForFixedPositionLayers, void(bool));
109 MOCK_CONST_METHOD0(isContainerForFixedPositionLayers, bool());
110 MOCK_METHOD1(setPositionConstraint, void(const WebLayerPositionConstraint&)) ;
111 MOCK_CONST_METHOD0(positionConstraint, WebLayerPositionConstraint());
112 MOCK_METHOD1(setScrollClient, void(WebLayerScrollClient*));
113 MOCK_METHOD1(setForceRenderSurface, void(bool));
114 MOCK_CONST_METHOD0(isOrphan, bool());
115 MOCK_METHOD1(setLayerClient, void(cc::LayerClient*));
116 MOCK_CONST_METHOD0(ccLayer, const cc::Layer*());
117 MOCK_METHOD1(setElementId, void(uint64_t));
118 MOCK_CONST_METHOD0(elementId, uint64_t());
119 MOCK_METHOD1(setCompositorMutableProperties, void(uint32_t));
120 MOCK_CONST_METHOD0(compositorMutableProperties, uint32_t());
121 };
122
123 } // namespace blink
124
125 #endif // WebLayerMock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698