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

Unified Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 2101663002: Send synthetic GestureTapDown to focus BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address suggestions. Created 4 years, 6 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 | content/browser/frame_host/render_widget_host_view_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/guest_view/web_view_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index 5a1389b42b1a58ed5265d0f106c0a01ed78c5872..5cd24d4cde654f215d2607f88e736b488591f8a7 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -3405,16 +3405,13 @@ IN_PROC_BROWSER_TEST_P(WebViewGuestScrollTouchTest,
// Perform a scroll gesture of the same magnitude, but in the opposite
// direction and centered over the GuestView this time.
guest_rect = guest_contents->GetContainerBounds();
- embedder_rect = embedder_contents->GetContainerBounds();
- guest_rect.set_x(guest_rect.x() - embedder_rect.x());
- guest_rect.set_y(guest_rect.y() - embedder_rect.y());
{
- gfx::Point guest_scroll_location(guest_rect.x() + guest_rect.width() / 2,
- guest_rect.y());
+ gfx::Point guest_scroll_location(guest_rect.width() / 2,
+ guest_rect.height() / 2);
ScrollWaiter waiter(embedder_host_view);
- content::SimulateGestureScrollSequence(embedder_contents,
+ content::SimulateGestureScrollSequence(guest_contents,
guest_scroll_location,
gfx::Vector2dF(0, gesture_distance));
@@ -3462,8 +3459,7 @@ IN_PROC_BROWSER_TEST_P(WebViewScrollGuestContentTest, ScrollGuestContent) {
EXPECT_EQ(gfx::Vector2dF(), guest_host_view->GetLastScrollOffset());
EXPECT_EQ(gfx::Vector2dF(), embedder_host_view->GetLastScrollOffset());
- gfx::Point guest_scroll_location(guest_rect.x() + guest_rect.width() / 2,
- guest_rect.y());
+ gfx::Point guest_scroll_location(guest_rect.width() / 2, 0);
float gesture_distance = 15.f;
{
@@ -3472,7 +3468,7 @@ IN_PROC_BROWSER_TEST_P(WebViewScrollGuestContentTest, ScrollGuestContent) {
ScrollWaiter waiter(guest_host_view);
content::SimulateGestureScrollSequence(
- embedder_contents, guest_scroll_location,
+ guest_contents, guest_scroll_location,
gfx::Vector2dF(0, -gesture_distance));
waiter.WaitForScrollChange(expected_offset);
@@ -3486,7 +3482,7 @@ IN_PROC_BROWSER_TEST_P(WebViewScrollGuestContentTest, ScrollGuestContent) {
ScrollWaiter waiter(guest_host_view);
content::SimulateGestureFlingSequence(
- embedder_contents, guest_scroll_location,
+ guest_contents, guest_scroll_location,
gfx::Vector2dF(0, fling_velocity));
waiter.WaitForScrollChange(gfx::Vector2dF());
« no previous file with comments | « no previous file | content/browser/frame_host/render_widget_host_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698