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

Unified Diff: webkit/glue/touch_fling_gesture_curve_unittest.cc

Issue 13386016: Switch TouchFlingGestureCurveUnittest to use WebFloatSize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/touch_fling_gesture_curve_unittest.cc
diff --git a/webkit/glue/touch_fling_gesture_curve_unittest.cc b/webkit/glue/touch_fling_gesture_curve_unittest.cc
index e78ed44763ce5eb932d59a2ce7ab567df8012803..0fbf101e087b05c0618de8aed4bfec8bf8e3547c 100644
--- a/webkit/glue/touch_fling_gesture_curve_unittest.cc
+++ b/webkit/glue/touch_fling_gesture_curve_unittest.cc
@@ -9,31 +9,31 @@
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebFloatSize.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurve.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurveTarget.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
using WebKit::WebFloatPoint;
+using WebKit::WebFloatSize;
using WebKit::WebGestureCurve;
using WebKit::WebGestureCurveTarget;
-using WebKit::WebPoint;
using WebKit::WebSize;
namespace {
class MockGestureCurveTarget : public WebGestureCurveTarget {
public:
- virtual void scrollBy(const WebPoint& delta) {
- cumulative_delta_.x += delta.x;
- cumulative_delta_.y += delta.y;
+ virtual void scrollBy(const WebFloatSize& delta) {
+ cumulative_delta_.width += delta.width;
+ cumulative_delta_.height += delta.height;
}
- WebPoint cumulative_delta() const { return cumulative_delta_; }
- void resetCumulativeDelta() { cumulative_delta_ = WebPoint(); }
+ WebFloatSize cumulative_delta() const { return cumulative_delta_; }
+ void resetCumulativeDelta() { cumulative_delta_ = WebFloatSize(); }
private:
- WebPoint cumulative_delta_;
+ WebFloatSize cumulative_delta_;
};
} // namespace anonymous
@@ -54,7 +54,7 @@ TEST(TouchFlingGestureCurve, flingCurveTouch)
EXPECT_TRUE(curve->apply(0.45f, &target)); // Use non-uniform tick spacing.
EXPECT_TRUE(curve->apply(1, &target));
EXPECT_FALSE(curve->apply(1.5, &target));
- EXPECT_NEAR(target.cumulative_delta().x, 1193, 1);
- EXPECT_EQ(target.cumulative_delta().y, 0);
+ EXPECT_NEAR(target.cumulative_delta().width, 1193, 1);
+ EXPECT_EQ(target.cumulative_delta().height, 0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698