| 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 478b3d19b50459f3bacb07d59f10bca0343779d0..e07f46a9b51d7c9f7eacebfcc91a1ec2c444e304 100644
|
| --- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
|
| +++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
|
| @@ -2517,7 +2517,17 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, LoadWebviewAccessibleResource) {
|
| "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER);
|
| }
|
|
|
| -class WebViewTouchTest : public WebViewTest {
|
| +class WebViewGuestScrollTest : public WebViewTest,
|
| + public ::testing::WithParamInterface<bool> {
|
| + protected:
|
| + WebViewGuestScrollTest() {}
|
| + ~WebViewGuestScrollTest() {}
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(WebViewGuestScrollTest);
|
| +};
|
| +
|
| +class WebViewGuestScrollTouchTest : public WebViewGuestScrollTest {
|
| protected:
|
| void SetUpCommandLine(base::CommandLine* command_line) override {
|
| command_line->AppendSwitchASCII(switches::kTouchEvents,
|
| @@ -2547,9 +2557,19 @@ class ScrollWaiter {
|
| } // namespace
|
|
|
| // Tests that scrolls bubble from guest to embedder.
|
| -IN_PROC_BROWSER_TEST_F(WebViewTest, TestGuestWheelScrollsBubble) {
|
| +// Create two test instances, one where the guest body is scrollable and the
|
| +// other where the body is not scrollable: fast-path scrolling will generate
|
| +// different ack results in between these two cases.
|
| +INSTANTIATE_TEST_CASE_P(WebViewScrollBubbling,
|
| + WebViewGuestScrollTest,
|
| + ::testing::Bool());
|
| +
|
| +IN_PROC_BROWSER_TEST_P(WebViewGuestScrollTest, TestGuestWheelScrollsBubble) {
|
| LoadAppWithGuest("web_view/scrollable_embedder_and_guest");
|
|
|
| + if (GetParam())
|
| + SendMessageToGuestAndWait("set_overflow_hidden", "overflow_is_hidden");
|
| +
|
| content::WebContents* embedder_contents = GetEmbedderWebContents();
|
|
|
| std::vector<content::WebContents*> guest_web_contents_list;
|
| @@ -2621,7 +2641,12 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, TestGuestWheelScrollsBubble) {
|
| }
|
| }
|
|
|
| -IN_PROC_BROWSER_TEST_F(WebViewTouchTest, TestGuestGestureScrollsBubble) {
|
| +INSTANTIATE_TEST_CASE_P(WebViewScrollBubbling,
|
| + WebViewGuestScrollTouchTest,
|
| + ::testing::Bool());
|
| +
|
| +IN_PROC_BROWSER_TEST_P(WebViewGuestScrollTouchTest,
|
| + TestGuestGestureScrollsBubble) {
|
| // Just in case we're running ChromeOS tests, we need to make sure the
|
| // debounce interval is set to zero so our back-to-back gesture-scrolls don't
|
| // get munged together. Since the first scroll will be put on the fast
|
| @@ -2633,6 +2658,9 @@ IN_PROC_BROWSER_TEST_F(WebViewTouchTest, TestGuestGestureScrollsBubble) {
|
|
|
| LoadAppWithGuest("web_view/scrollable_embedder_and_guest");
|
|
|
| + if (GetParam())
|
| + SendMessageToGuestAndWait("set_overflow_hidden", "overflow_is_hidden");
|
| +
|
| content::WebContents* embedder_contents = GetEmbedderWebContents();
|
|
|
| std::vector<content::WebContents*> guest_web_contents_list;
|
|
|