| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <queue> | 5 #include <queue> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 #include "media/base/media_switches.h" | 77 #include "media/base/media_switches.h" |
| 78 #include "net/test/embedded_test_server/embedded_test_server.h" | 78 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 79 #include "net/test/embedded_test_server/http_request.h" | 79 #include "net/test/embedded_test_server/http_request.h" |
| 80 #include "net/test/embedded_test_server/http_response.h" | 80 #include "net/test/embedded_test_server/http_response.h" |
| 81 #include "ppapi/features/features.h" | 81 #include "ppapi/features/features.h" |
| 82 #include "ui/aura/env.h" | 82 #include "ui/aura/env.h" |
| 83 #include "ui/aura/window.h" | 83 #include "ui/aura/window.h" |
| 84 #include "ui/compositor/compositor.h" | 84 #include "ui/compositor/compositor.h" |
| 85 #include "ui/compositor/compositor_observer.h" | 85 #include "ui/compositor/compositor_observer.h" |
| 86 #include "ui/display/display_switches.h" | 86 #include "ui/display/display_switches.h" |
| 87 #include "ui/events/event_switches.h" | |
| 88 #include "ui/events/gesture_detection/gesture_configuration.h" | 87 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 89 #include "ui/gl/gl_switches.h" | 88 #include "ui/gl/gl_switches.h" |
| 90 #include "ui/views/view.h" | 89 #include "ui/views/view.h" |
| 91 #include "ui/views/widget/widget.h" | 90 #include "ui/views/widget/widget.h" |
| 92 | 91 |
| 93 #if BUILDFLAG(ENABLE_PLUGINS) | 92 #if BUILDFLAG(ENABLE_PLUGINS) |
| 94 #include "content/public/browser/plugin_service.h" | 93 #include "content/public/browser/plugin_service.h" |
| 95 #include "content/public/common/webplugininfo.h" | 94 #include "content/public/common/webplugininfo.h" |
| 96 #include "content/public/test/ppapi_test_utils.h" | 95 #include "content/public/test/ppapi_test_utils.h" |
| 97 #endif | 96 #endif |
| (...skipping 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3399 | 3398 |
| 3400 private: | 3399 private: |
| 3401 DISALLOW_COPY_AND_ASSIGN(WebViewGuestScrollTest); | 3400 DISALLOW_COPY_AND_ASSIGN(WebViewGuestScrollTest); |
| 3402 }; | 3401 }; |
| 3403 | 3402 |
| 3404 class WebViewGuestScrollTouchTest : public WebViewGuestScrollTest { | 3403 class WebViewGuestScrollTouchTest : public WebViewGuestScrollTest { |
| 3405 protected: | 3404 protected: |
| 3406 void SetUpCommandLine(base::CommandLine* command_line) override { | 3405 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 3407 WebViewGuestScrollTest::SetUpCommandLine(command_line); | 3406 WebViewGuestScrollTest::SetUpCommandLine(command_line); |
| 3408 | 3407 |
| 3409 command_line->AppendSwitchASCII(switches::kTouchEvents, | 3408 command_line->AppendSwitchASCII( |
| 3410 switches::kTouchEventsEnabled); | 3409 switches::kTouchEventFeatureDetection, |
| 3410 switches::kTouchEventFeatureDetectionEnabled); |
| 3411 } | 3411 } |
| 3412 }; | 3412 }; |
| 3413 | 3413 |
| 3414 namespace { | 3414 namespace { |
| 3415 | 3415 |
| 3416 class ScrollWaiter { | 3416 class ScrollWaiter { |
| 3417 public: | 3417 public: |
| 3418 explicit ScrollWaiter(content::RenderWidgetHostView* host_view) | 3418 explicit ScrollWaiter(content::RenderWidgetHostView* host_view) |
| 3419 : host_view_(host_view) {} | 3419 : host_view_(host_view) {} |
| 3420 ~ScrollWaiter() {} | 3420 ~ScrollWaiter() {} |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3521 WebViewGuestScrollTouchTest, | 3521 WebViewGuestScrollTouchTest, |
| 3522 testing::Combine(testing::Bool(), testing::Bool())); | 3522 testing::Combine(testing::Bool(), testing::Bool())); |
| 3523 | 3523 |
| 3524 #if defined(USE_AURA) | 3524 #if defined(USE_AURA) |
| 3525 class WebViewGuestTouchFocusTest : public WebViewTestBase { | 3525 class WebViewGuestTouchFocusTest : public WebViewTestBase { |
| 3526 public: | 3526 public: |
| 3527 WebViewGuestTouchFocusTest() {} | 3527 WebViewGuestTouchFocusTest() {} |
| 3528 void SetUpCommandLine(base::CommandLine* command_line) override { | 3528 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 3529 WebViewTestBase::SetUpCommandLine(command_line); | 3529 WebViewTestBase::SetUpCommandLine(command_line); |
| 3530 | 3530 |
| 3531 command_line->AppendSwitchASCII(switches::kTouchEvents, | 3531 command_line->AppendSwitchASCII( |
| 3532 switches::kTouchEventsEnabled); | 3532 switches::kTouchEventFeatureDetection, |
| 3533 switches::kTouchEventFeatureDetectionEnabled); |
| 3533 } | 3534 } |
| 3534 | 3535 |
| 3535 private: | 3536 private: |
| 3536 DISALLOW_COPY_AND_ASSIGN(WebViewGuestTouchFocusTest); | 3537 DISALLOW_COPY_AND_ASSIGN(WebViewGuestTouchFocusTest); |
| 3537 }; | 3538 }; |
| 3538 | 3539 |
| 3539 class FocusChangeWaiter { | 3540 class FocusChangeWaiter { |
| 3540 public: | 3541 public: |
| 3541 explicit FocusChangeWaiter(content::WebContents* web_contents, | 3542 explicit FocusChangeWaiter(content::WebContents* web_contents, |
| 3542 bool expected_focus) | 3543 bool expected_focus) |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3689 } | 3690 } |
| 3690 } | 3691 } |
| 3691 | 3692 |
| 3692 class WebViewScrollGuestContentTest : public WebViewTest { | 3693 class WebViewScrollGuestContentTest : public WebViewTest { |
| 3693 public: | 3694 public: |
| 3694 ~WebViewScrollGuestContentTest() override {} | 3695 ~WebViewScrollGuestContentTest() override {} |
| 3695 | 3696 |
| 3696 void SetUpCommandLine(base::CommandLine* command_line) override { | 3697 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 3697 WebViewTest::SetUpCommandLine(command_line); | 3698 WebViewTest::SetUpCommandLine(command_line); |
| 3698 | 3699 |
| 3699 command_line->AppendSwitchASCII(switches::kTouchEvents, | 3700 command_line->AppendSwitchASCII( |
| 3700 switches::kTouchEventsEnabled); | 3701 switches::kTouchEventFeatureDetection, |
| 3702 switches::kTouchEventFeatureDetectionEnabled); |
| 3701 } | 3703 } |
| 3702 }; | 3704 }; |
| 3703 | 3705 |
| 3704 INSTANTIATE_TEST_CASE_P(WebViewScrollGuestContent, | 3706 INSTANTIATE_TEST_CASE_P(WebViewScrollGuestContent, |
| 3705 WebViewScrollGuestContentTest, | 3707 WebViewScrollGuestContentTest, |
| 3706 testing::Values(false)); | 3708 testing::Values(false)); |
| 3707 | 3709 |
| 3708 IN_PROC_BROWSER_TEST_P(WebViewScrollGuestContentTest, ScrollGuestContent) { | 3710 IN_PROC_BROWSER_TEST_P(WebViewScrollGuestContentTest, ScrollGuestContent) { |
| 3709 LoadAppWithGuest("web_view/scrollable_embedder_and_guest"); | 3711 LoadAppWithGuest("web_view/scrollable_embedder_and_guest"); |
| 3710 | 3712 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3765 // TODO(wjmaclean): when WebViewTest is re-enabled on the site-isolation | 3767 // TODO(wjmaclean): when WebViewTest is re-enabled on the site-isolation |
| 3766 // bots, then re-enable this test class as well. | 3768 // bots, then re-enable this test class as well. |
| 3767 // https://crbug.com/503751 | 3769 // https://crbug.com/503751 |
| 3768 class WebViewFocusTest : public WebViewTest { | 3770 class WebViewFocusTest : public WebViewTest { |
| 3769 public: | 3771 public: |
| 3770 ~WebViewFocusTest() override {} | 3772 ~WebViewFocusTest() override {} |
| 3771 | 3773 |
| 3772 void SetUpCommandLine(base::CommandLine* command_line) override { | 3774 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 3773 WebViewTest::SetUpCommandLine(command_line); | 3775 WebViewTest::SetUpCommandLine(command_line); |
| 3774 | 3776 |
| 3775 command_line->AppendSwitchASCII(switches::kTouchEvents, | 3777 command_line->AppendSwitchASCII( |
| 3776 switches::kTouchEventsEnabled); | 3778 switches::kTouchEventFeatureDetection, |
| 3779 switches::kTouchEventFeatureDetectionEnabled); |
| 3777 } | 3780 } |
| 3778 | 3781 |
| 3779 void ForceCompositorFrame() { | 3782 void ForceCompositorFrame() { |
| 3780 if (!frame_watcher_) { | 3783 if (!frame_watcher_) { |
| 3781 frame_watcher_ = new content::FrameWatcher(); | 3784 frame_watcher_ = new content::FrameWatcher(); |
| 3782 frame_watcher_->AttachTo(GetEmbedderWebContents()); | 3785 frame_watcher_->AttachTo(GetEmbedderWebContents()); |
| 3783 } | 3786 } |
| 3784 | 3787 |
| 3785 while (!RequestFrame(GetEmbedderWebContents())) { | 3788 while (!RequestFrame(GetEmbedderWebContents())) { |
| 3786 // RequestFrame failed because we were waiting on an ack ... wait a short | 3789 // RequestFrame failed because we were waiting on an ack ... wait a short |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3906 ClosingChromeSignInShouldNotCrash) { | 3909 ClosingChromeSignInShouldNotCrash) { |
| 3907 GURL signin_url{"chrome://chrome-signin"}; | 3910 GURL signin_url{"chrome://chrome-signin"}; |
| 3908 | 3911 |
| 3909 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED); | 3912 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED); |
| 3910 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED); | 3913 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED); |
| 3911 WaitForWebViewInDom(); | 3914 WaitForWebViewInDom(); |
| 3912 | 3915 |
| 3913 chrome::CloseTab(browser()); | 3916 chrome::CloseTab(browser()); |
| 3914 } | 3917 } |
| 3915 #endif | 3918 #endif |
| OLD | NEW |