| Index: content/browser/web_contents/web_contents_view_aura_browsertest.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
|
| index fbaa6f4240f6f7ddd309c008ee3775d060e2fe47..65a80387979e07b139664951f94e4d4b5a2d1bfe 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
|
| @@ -490,17 +490,18 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
|
| gfx::Rect bounds = content->GetBoundsInRootWindow();
|
|
|
| base::TimeDelta timestamp = ui::EventTimeForNow();
|
| - ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
|
| - gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
|
| - 0, timestamp);
|
| + ui::TouchEvent press(
|
| + ui::ET_TOUCH_PRESSED,
|
| + gfx::PointF(bounds.x() + bounds.width() / 2.f, bounds.y() + 5.f), 0,
|
| + timestamp);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(1, GetCurrentIndex());
|
|
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
| ui::TouchEvent move1(ui::ET_TOUCH_MOVED,
|
| - gfx::Point(bounds.right() - 10, bounds.y() + 5),
|
| - 0, timestamp);
|
| + gfx::PointF(bounds.right() - 10.f, bounds.y() + 5.f), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(1, GetCurrentIndex());
|
| @@ -510,9 +511,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
|
|
|
| for (int x = bounds.right() - 10; x >= bounds.x() + 10; x-= 10) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
| - ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
|
| - gfx::Point(x, bounds.y() + 5),
|
| - 0, timestamp);
|
| + ui::TouchEvent inc(ui::ET_TOUCH_MOVED, gfx::PointF(x, bounds.y() + 5.f), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&inc);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(1, GetCurrentIndex());
|
| @@ -520,9 +520,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
|
|
|
| for (int x = bounds.x() + 10; x <= bounds.width() - 10; x+= 10) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
| - ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
|
| - gfx::Point(x, bounds.y() + 5),
|
| - 0, timestamp);
|
| + ui::TouchEvent inc(ui::ET_TOUCH_MOVED, gfx::PointF(x, bounds.y() + 5.f), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&inc);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(1, GetCurrentIndex());
|
| @@ -530,9 +529,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
|
|
|
| for (int x = bounds.width() - 10; x >= bounds.x() + 10; x-= 10) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
| - ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
|
| - gfx::Point(x, bounds.y() + 5),
|
| - 0, timestamp);
|
| + ui::TouchEvent inc(ui::ET_TOUCH_MOVED, gfx::PointF(x, bounds.y() + 5.f), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&inc);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(1, GetCurrentIndex());
|
| @@ -1035,11 +1033,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| int kXStep = bounds.width() / 10;
|
| gfx::Point location(bounds.right() - kXStep, bounds.y() + 5);
|
| base::TimeDelta timestamp = ui::EventTimeForNow();
|
| - ui::TouchEvent press(
|
| - ui::ET_TOUCH_PRESSED,
|
| - location,
|
| - 0,
|
| - timestamp);
|
| + ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::PointF(location), 0,
|
| + timestamp);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1047,7 +1042,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
|
|
| while (location.x() > bounds.x() + kXStep) {
|
| - ui::TouchEvent inc(ui::ET_TOUCH_MOVED, location, 0, timestamp);
|
| + ui::TouchEvent inc(ui::ET_TOUCH_MOVED, gfx::PointF(location), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&inc);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1055,7 +1051,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
| }
|
|
|
| - ui::TouchEvent release(ui::ET_TOUCH_RELEASED, location, 0, timestamp);
|
| + ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::PointF(location), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&release);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1071,11 +1068,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| int kYStep = bounds.height() / 10;
|
| gfx::Point location(bounds.x() + 10, bounds.y() + kYStep);
|
| base::TimeDelta timestamp = ui::EventTimeForNow();
|
| - ui::TouchEvent press(
|
| - ui::ET_TOUCH_PRESSED,
|
| - location,
|
| - 0,
|
| - timestamp);
|
| + ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::PointF(location), 0,
|
| + timestamp);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1083,7 +1077,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
|
|
| while (location.y() < bounds.bottom() - kYStep) {
|
| - ui::TouchEvent inc(ui::ET_TOUCH_MOVED, location, 0, timestamp);
|
| + ui::TouchEvent inc(ui::ET_TOUCH_MOVED, gfx::PointF(location), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&inc);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1091,7 +1086,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
| }
|
|
|
| - ui::TouchEvent release(ui::ET_TOUCH_RELEASED, location, 0, timestamp);
|
| + ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::PointF(location), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&release);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1109,11 +1105,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| int kYStep = bounds.height() / 10;
|
| gfx::Point location = bounds.origin() + gfx::Vector2d(0, kYStep);
|
| base::TimeDelta timestamp = ui::EventTimeForNow();
|
| - ui::TouchEvent press(
|
| - ui::ET_TOUCH_PRESSED,
|
| - location,
|
| - 0,
|
| - timestamp);
|
| + ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::PointF(location), 0,
|
| + timestamp);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1121,7 +1114,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
|
|
| for (size_t i = 0; i < 3; ++i) {
|
| - ui::TouchEvent inc(ui::ET_TOUCH_MOVED, location, 0, timestamp);
|
| + ui::TouchEvent inc(ui::ET_TOUCH_MOVED, gfx::PointF(location), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&inc);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1130,7 +1124,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| }
|
|
|
| while (location.x() < bounds.right() - kXStep) {
|
| - ui::TouchEvent inc(ui::ET_TOUCH_MOVED, location, 0, timestamp);
|
| + ui::TouchEvent inc(ui::ET_TOUCH_MOVED, gfx::PointF(location), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&inc);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
| @@ -1138,7 +1133,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_VerticalOverscroll) {
|
| timestamp += base::TimeDelta::FromMilliseconds(10);
|
| }
|
|
|
| - ui::TouchEvent release(ui::ET_TOUCH_RELEASED, location, 0, timestamp);
|
| + ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::PointF(location), 0,
|
| + timestamp);
|
| details = dispatcher->OnEventFromSource(&release);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| WaitAFrame();
|
|
|