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

Unified Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 147203004: aura: Remove event-dispatch methods from WindowTreeHostDelegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 11 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
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 3823a746e3cbcbef330ba9f31128b940409a1e8f..8079c9ce71b9127b38c76bce4a31c3d5dbf78eef 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -329,14 +329,16 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ 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);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ details = dispatcher->OnEventFromSource(&move1);
+ ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(1, GetCurrentIndex());
// Swipe back from the right edge, back to the left edge, back to the right
@@ -347,7 +349,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
gfx::Point(x, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&inc);
+ details = dispatcher->OnEventFromSource(&inc);
+ ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(1, GetCurrentIndex());
}
@@ -356,7 +359,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
gfx::Point(x, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&inc);
+ details = dispatcher->OnEventFromSource(&inc);
+ ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(1, GetCurrentIndex());
}
@@ -365,7 +369,8 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
ui::TouchEvent inc(ui::ET_TOUCH_MOVED,
gfx::Point(x, bounds.y() + 5),
0, timestamp);
- dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&inc);
+ details = dispatcher->OnEventFromSource(&inc);
+ ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_EQ(1, GetCurrentIndex());
}
« no previous file with comments | « content/browser/web_contents/aura/window_slider_unittest.cc ('k') | content/shell/browser/shell_platform_data_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698