| 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 17 matching lines...) Expand all Loading... |
| 28 #include "core/animation/CompositorAnimations.h" | 28 #include "core/animation/CompositorAnimations.h" |
| 29 #include "public/platform/Platform.h" | 29 #include "public/platform/Platform.h" |
| 30 #include "public/platform/WebCompositorSupport.h" | 30 #include "public/platform/WebCompositorSupport.h" |
| 31 #include "public/platform/WebFloatAnimationCurve.h" | 31 #include "public/platform/WebFloatAnimationCurve.h" |
| 32 #include "public/platform/WebFloatKeyframe.h" | 32 #include "public/platform/WebFloatKeyframe.h" |
| 33 #include "wtf/PassOwnPtr.h" | 33 #include "wtf/PassOwnPtr.h" |
| 34 | 34 |
| 35 #include <gmock/gmock.h> | 35 #include <gmock/gmock.h> |
| 36 #include <gtest/gtest.h> | 36 #include <gtest/gtest.h> |
| 37 | 37 |
| 38 | |
| 39 namespace testing { | |
| 40 | |
| 41 template<typename T> | |
| 42 PassOwnPtr<T> CloneToPassOwnPtr(T& o) | |
| 43 { | |
| 44 return adoptPtr(new T(o)); | |
| 45 } | |
| 46 | |
| 47 } // namespace testing | |
| 48 | |
| 49 | |
| 50 // Test helpers and mocks for Web* types | 38 // Test helpers and mocks for Web* types |
| 51 // ----------------------------------------------------------------------- | 39 // ----------------------------------------------------------------------- |
| 52 namespace blink { | 40 namespace blink { |
| 53 | 41 |
| 54 // WebFloatKeyframe is a plain struct, so we just create an == operator | 42 // WebFloatKeyframe is a plain struct, so we just create an == operator |
| 55 // for it. | 43 // for it. |
| 56 inline bool operator==(const WebFloatKeyframe& a, const WebFloatKeyframe& b) | 44 inline bool operator==(const WebFloatKeyframe& a, const WebFloatKeyframe& b) |
| 57 { | 45 { |
| 58 return a.time == b.time && a.value == b.value; | 46 return a.time == b.time && a.value == b.value; |
| 59 } | 47 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 void setCompositorForTesting(WebCompositorSupportMock& mock) | 168 void setCompositorForTesting(WebCompositorSupportMock& mock) |
| 181 { | 169 { |
| 182 ASSERT(!m_mockCompositor); | 170 ASSERT(!m_mockCompositor); |
| 183 m_mockCompositor = &mock; | 171 m_mockCompositor = &mock; |
| 184 } | 172 } |
| 185 }; | 173 }; |
| 186 | 174 |
| 187 } | 175 } |
| 188 | 176 |
| 189 #endif | 177 #endif |
| OLD | NEW |