OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 MOCK_METHOD1(appendBrightnessFilter, void(float)); | 62 MOCK_METHOD1(appendBrightnessFilter, void(float)); |
63 MOCK_METHOD1(appendContrastFilter, void(float)); | 63 MOCK_METHOD1(appendContrastFilter, void(float)); |
64 MOCK_METHOD1(appendOpacityFilter, void(float)); | 64 MOCK_METHOD1(appendOpacityFilter, void(float)); |
65 MOCK_METHOD1(appendBlurFilter, void(float)); | 65 MOCK_METHOD1(appendBlurFilter, void(float)); |
66 MOCK_METHOD3(appendDropShadowFilter, void(WebPoint, float, WebColor)); | 66 MOCK_METHOD3(appendDropShadowFilter, void(WebPoint, float, WebColor)); |
67 MOCK_METHOD1(appendColorMatrixFilter, void(SkScalar[20])); | 67 MOCK_METHOD1(appendColorMatrixFilter, void(SkScalar[20])); |
68 MOCK_METHOD2(appendZoomFilter, void(float, int)); | 68 MOCK_METHOD2(appendZoomFilter, void(float, int)); |
69 MOCK_METHOD1(appendSaturatingBrightnessFilter, void(float)); | 69 MOCK_METHOD1(appendSaturatingBrightnessFilter, void(float)); |
70 MOCK_METHOD1(appendReferenceFilter, void(SkImageFilter*)); | 70 MOCK_METHOD1(appendReferenceFilter, void(SkImageFilter*)); |
71 MOCK_METHOD0(clear, void()); | 71 MOCK_METHOD0(clear, void()); |
| 72 MOCK_CONST_METHOD0(isEmpty, bool()); |
72 }; | 73 }; |
73 | 74 |
74 TEST(AnimationTranslationUtilTest, transformsWork) | 75 TEST(AnimationTranslationUtilTest, transformsWork) |
75 { | 76 { |
76 TransformOperations ops; | 77 TransformOperations ops; |
77 WebTransformOperationsMock outOps; | 78 WebTransformOperationsMock outOps; |
78 | 79 |
79 EXPECT_CALL(outOps, appendTranslate(2, 0, 0)); | 80 EXPECT_CALL(outOps, appendTranslate(2, 0, 0)); |
80 EXPECT_CALL(outOps, appendRotate(0.1, 0.2, 0.3, 200000.4)); | 81 EXPECT_CALL(outOps, appendRotate(0.1, 0.2, 0.3, 200000.4)); |
81 EXPECT_CALL(outOps, appendScale(50.2, 100, -4)); | 82 EXPECT_CALL(outOps, appendScale(50.2, 100, -4)); |
(...skipping 15 matching lines...) Expand all Loading... |
97 EXPECT_CALL(outOps, appendOpacityFilter(0.1f)); | 98 EXPECT_CALL(outOps, appendOpacityFilter(0.1f)); |
98 | 99 |
99 ops.operations().append(BasicColorMatrixFilterOperation::create(0.5, FilterO
peration::SATURATE)); | 100 ops.operations().append(BasicColorMatrixFilterOperation::create(0.5, FilterO
peration::SATURATE)); |
100 ops.operations().append(BasicColorMatrixFilterOperation::create(0.2, FilterO
peration::GRAYSCALE)); | 101 ops.operations().append(BasicColorMatrixFilterOperation::create(0.2, FilterO
peration::GRAYSCALE)); |
101 ops.operations().append(BasicColorMatrixFilterOperation::create(0.8, FilterO
peration::SEPIA)); | 102 ops.operations().append(BasicColorMatrixFilterOperation::create(0.8, FilterO
peration::SEPIA)); |
102 ops.operations().append(BasicColorMatrixFilterOperation::create(0.1, FilterO
peration::OPACITY)); | 103 ops.operations().append(BasicColorMatrixFilterOperation::create(0.1, FilterO
peration::OPACITY)); |
103 toWebFilterOperations(ops, &outOps); | 104 toWebFilterOperations(ops, &outOps); |
104 } | 105 } |
105 | 106 |
106 } // namespace blink | 107 } // namespace blink |
OLD | NEW |