Index: Source/core/platform/animation/TimingFunctionTestHelper.h |
diff --git a/Source/core/platform/image-encoders/skia/JPEGImageEncoder.h b/Source/core/platform/animation/TimingFunctionTestHelper.h |
similarity index 67% |
copy from Source/core/platform/image-encoders/skia/JPEGImageEncoder.h |
copy to Source/core/platform/animation/TimingFunctionTestHelper.h |
index ca3ef4886ea0f5bccbbf3cb80d39f7121169b62e..d4bc077c37b5ffcbf37ad2177408f6dd2f62a29d 100644 |
--- a/Source/core/platform/image-encoders/skia/JPEGImageEncoder.h |
+++ b/Source/core/platform/animation/TimingFunctionTestHelper.h |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (c) 2010, Google Inc. All rights reserved. |
+ * Copyright (c) 2013, Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -28,26 +28,25 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef JPEGImageEncoder_h |
-#define JPEGImageEncoder_h |
- |
-#include "wtf/Vector.h" |
+/** |
+ * Make testing with gtest and gmock nicer by adding pretty print and other |
+ * helper functions. |
+ */ |
-class SkBitmap; |
+#ifndef TimingFunctionTestHelper_h |
+#define TimingFunctionTestHelper_h |
-namespace WebCore { |
+#include "core/platform/animation/TimingFunction.h" |
-class ImageData; |
+#include <ostream> // NOLINT |
-class JPEGImageEncoder { |
-public: |
- // Encode the input data with a compression quality in [0-100]. |
- static bool encode(const SkBitmap&, int quality, Vector<unsigned char>*); |
- static bool encode(const ImageData&, int quality, Vector<unsigned char>*); |
+namespace WebCore { |
- // For callers: provide a reasonable compression quality default. |
- enum Quality { DefaultCompressionQuality = 92 }; |
-}; |
+void PrintTo(const LinearTimingFunction&, ::std::ostream*, bool recursiveGuard = false); |
+void PrintTo(const CubicBezierTimingFunction&, ::std::ostream*, bool recursiveGuard = false); |
+void PrintTo(const StepsTimingFunction&, ::std::ostream*, bool recursiveGuard = false); |
+void PrintTo(const ChainedTimingFunction&, ::std::ostream*, bool recursiveGuard = false); |
+void PrintTo(const TimingFunction&, ::std::ostream*, bool recursiveGuard = false); |
} // namespace WebCore |