Commit c464f652 authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Fix OOPIF handling on Android

When dispatching mouse events to an OOPIF on android, the coordinates
need to be relative to browser windows, while on desktop they are
relative to the frame.

Change-Id: I2953e42457b4ac3395edcf4db53f2c8780047260
Reviewed-on: https://chromium-review.googlesource.com/941401Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539894}
parent 05553a68
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "base/values.h" #include "base/values.h"
#include "chrome/test/chromedriver/basic_types.h" #include "chrome/test/chromedriver/basic_types.h"
#include "chrome/test/chromedriver/chrome/browser_info.h"
#include "chrome/test/chromedriver/chrome/chrome.h" #include "chrome/test/chromedriver/chrome/chrome.h"
#include "chrome/test/chromedriver/chrome/js.h" #include "chrome/test/chromedriver/chrome/js.h"
#include "chrome/test/chromedriver/chrome/status.h" #include "chrome/test/chromedriver/chrome/status.h"
...@@ -633,7 +634,8 @@ Status ScrollElementRegionIntoView( ...@@ -633,7 +634,8 @@ Status ScrollElementRegionIntoView(
WebPoint saved_region_offset; WebPoint saved_region_offset;
for (std::list<FrameInfo>::reverse_iterator rit = session->frames.rbegin(); for (std::list<FrameInfo>::reverse_iterator rit = session->frames.rbegin();
rit != session->frames.rend(); ++rit) { rit != session->frames.rend(); ++rit) {
if (!has_saved_region_offset && web_view->IsOOPIF(rit->frame_id)) { if (!session->chrome->GetBrowserInfo()->is_android &&
!has_saved_region_offset && web_view->IsOOPIF(rit->frame_id)) {
saved_region_offset = region_offset; saved_region_offset = region_offset;
has_saved_region_offset = true; has_saved_region_offset = true;
} }
......
...@@ -233,6 +233,8 @@ _ANDROID_NEGATIVE_FILTER['chrome_stable'] = ( ...@@ -233,6 +233,8 @@ _ANDROID_NEGATIVE_FILTER['chrome_stable'] = (
_ANDROID_NEGATIVE_FILTER['chrome'] + [ _ANDROID_NEGATIVE_FILTER['chrome'] + [
# https://bugs.chromium.org/p/chromedriver/issues/detail?id=2025 # https://bugs.chromium.org/p/chromedriver/issues/detail?id=2025
'ChromeDriverTest.testDoesntHangOnFragmentNavigation', 'ChromeDriverTest.testDoesntHangOnFragmentNavigation',
# https://bugs.chromium.org/p/chromium/issues/detail?id=746266
'ChromeDriverSiteIsolation.testCanClickOOPIF',
] ]
) )
_ANDROID_NEGATIVE_FILTER['chrome_beta'] = ( _ANDROID_NEGATIVE_FILTER['chrome_beta'] = (
...@@ -313,6 +315,8 @@ _ANDROID_NEGATIVE_FILTER['chromedriver_webview_shell'] = ( ...@@ -313,6 +315,8 @@ _ANDROID_NEGATIVE_FILTER['chromedriver_webview_shell'] = (
'ChromeDriverTest.testTouchDownMoveUpElement', 'ChromeDriverTest.testTouchDownMoveUpElement',
'ChromeDriverTest.testTouchFlickElement', 'ChromeDriverTest.testTouchFlickElement',
'ChromeDriverTest.testTouchSingleTapElement', 'ChromeDriverTest.testTouchSingleTapElement',
# https://bugs.chromium.org/p/chromium/issues/detail?id=746266
'ChromeDriverSiteIsolation.testCanClickOOPIF',
] ]
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment