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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 2547373002: Rename TouchEventAPI to TouchEventFeatureDetection (Closed)
Patch Set: Added a todo Created 4 years 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 unified diff | Download patch
OLDNEW
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 3388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3399 3399
3400 private: 3400 private:
3401 DISALLOW_COPY_AND_ASSIGN(WebViewGuestScrollTest); 3401 DISALLOW_COPY_AND_ASSIGN(WebViewGuestScrollTest);
3402 }; 3402 };
3403 3403
3404 class WebViewGuestScrollTouchTest : public WebViewGuestScrollTest { 3404 class WebViewGuestScrollTouchTest : public WebViewGuestScrollTest {
3405 protected: 3405 protected:
3406 void SetUpCommandLine(base::CommandLine* command_line) override { 3406 void SetUpCommandLine(base::CommandLine* command_line) override {
3407 WebViewGuestScrollTest::SetUpCommandLine(command_line); 3407 WebViewGuestScrollTest::SetUpCommandLine(command_line);
3408 3408
3409 command_line->AppendSwitchASCII(switches::kTouchEvents, 3409 command_line->AppendSwitchASCII(
3410 switches::kTouchEventsEnabled); 3410 switches::kTouchEventFeatureDetection,
3411 switches::kTouchEventFeatureDetectionEnabled);
3411 } 3412 }
3412 }; 3413 };
3413 3414
3414 namespace { 3415 namespace {
3415 3416
3416 class ScrollWaiter { 3417 class ScrollWaiter {
3417 public: 3418 public:
3418 explicit ScrollWaiter(content::RenderWidgetHostView* host_view) 3419 explicit ScrollWaiter(content::RenderWidgetHostView* host_view)
3419 : host_view_(host_view) {} 3420 : host_view_(host_view) {}
3420 ~ScrollWaiter() {} 3421 ~ScrollWaiter() {}
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
3521 WebViewGuestScrollTouchTest, 3522 WebViewGuestScrollTouchTest,
3522 testing::Combine(testing::Bool(), testing::Bool())); 3523 testing::Combine(testing::Bool(), testing::Bool()));
3523 3524
3524 #if defined(USE_AURA) 3525 #if defined(USE_AURA)
3525 class WebViewGuestTouchFocusTest : public WebViewTestBase { 3526 class WebViewGuestTouchFocusTest : public WebViewTestBase {
3526 public: 3527 public:
3527 WebViewGuestTouchFocusTest() {} 3528 WebViewGuestTouchFocusTest() {}
3528 void SetUpCommandLine(base::CommandLine* command_line) override { 3529 void SetUpCommandLine(base::CommandLine* command_line) override {
3529 WebViewTestBase::SetUpCommandLine(command_line); 3530 WebViewTestBase::SetUpCommandLine(command_line);
3530 3531
3531 command_line->AppendSwitchASCII(switches::kTouchEvents, 3532 command_line->AppendSwitchASCII(
3532 switches::kTouchEventsEnabled); 3533 switches::kTouchEventFeatureDetection,
3534 switches::kTouchEventFeatureDetectionEnabled);
3533 } 3535 }
3534 3536
3535 private: 3537 private:
3536 DISALLOW_COPY_AND_ASSIGN(WebViewGuestTouchFocusTest); 3538 DISALLOW_COPY_AND_ASSIGN(WebViewGuestTouchFocusTest);
3537 }; 3539 };
3538 3540
3539 class FocusChangeWaiter { 3541 class FocusChangeWaiter {
3540 public: 3542 public:
3541 explicit FocusChangeWaiter(content::WebContents* web_contents, 3543 explicit FocusChangeWaiter(content::WebContents* web_contents,
3542 bool expected_focus) 3544 bool expected_focus)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
3689 } 3691 }
3690 } 3692 }
3691 3693
3692 class WebViewScrollGuestContentTest : public WebViewTest { 3694 class WebViewScrollGuestContentTest : public WebViewTest {
3693 public: 3695 public:
3694 ~WebViewScrollGuestContentTest() override {} 3696 ~WebViewScrollGuestContentTest() override {}
3695 3697
3696 void SetUpCommandLine(base::CommandLine* command_line) override { 3698 void SetUpCommandLine(base::CommandLine* command_line) override {
3697 WebViewTest::SetUpCommandLine(command_line); 3699 WebViewTest::SetUpCommandLine(command_line);
3698 3700
3699 command_line->AppendSwitchASCII(switches::kTouchEvents, 3701 command_line->AppendSwitchASCII(
3700 switches::kTouchEventsEnabled); 3702 switches::kTouchEventFeatureDetection,
3703 switches::kTouchEventFeatureDetectionEnabled);
3701 } 3704 }
3702 }; 3705 };
3703 3706
3704 INSTANTIATE_TEST_CASE_P(WebViewScrollGuestContent, 3707 INSTANTIATE_TEST_CASE_P(WebViewScrollGuestContent,
3705 WebViewScrollGuestContentTest, 3708 WebViewScrollGuestContentTest,
3706 testing::Values(false)); 3709 testing::Values(false));
3707 3710
3708 IN_PROC_BROWSER_TEST_P(WebViewScrollGuestContentTest, ScrollGuestContent) { 3711 IN_PROC_BROWSER_TEST_P(WebViewScrollGuestContentTest, ScrollGuestContent) {
3709 LoadAppWithGuest("web_view/scrollable_embedder_and_guest"); 3712 LoadAppWithGuest("web_view/scrollable_embedder_and_guest");
3710 3713
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
3765 // TODO(wjmaclean): when WebViewTest is re-enabled on the site-isolation 3768 // TODO(wjmaclean): when WebViewTest is re-enabled on the site-isolation
3766 // bots, then re-enable this test class as well. 3769 // bots, then re-enable this test class as well.
3767 // https://crbug.com/503751 3770 // https://crbug.com/503751
3768 class WebViewFocusTest : public WebViewTest { 3771 class WebViewFocusTest : public WebViewTest {
3769 public: 3772 public:
3770 ~WebViewFocusTest() override {} 3773 ~WebViewFocusTest() override {}
3771 3774
3772 void SetUpCommandLine(base::CommandLine* command_line) override { 3775 void SetUpCommandLine(base::CommandLine* command_line) override {
3773 WebViewTest::SetUpCommandLine(command_line); 3776 WebViewTest::SetUpCommandLine(command_line);
3774 3777
3775 command_line->AppendSwitchASCII(switches::kTouchEvents, 3778 command_line->AppendSwitchASCII(
3776 switches::kTouchEventsEnabled); 3779 switches::kTouchEventFeatureDetection,
3780 switches::kTouchEventFeatureDetectionEnabled);
3777 } 3781 }
3778 3782
3779 void ForceCompositorFrame() { 3783 void ForceCompositorFrame() {
3780 if (!frame_watcher_) { 3784 if (!frame_watcher_) {
3781 frame_watcher_ = new content::FrameWatcher(); 3785 frame_watcher_ = new content::FrameWatcher();
3782 frame_watcher_->AttachTo(GetEmbedderWebContents()); 3786 frame_watcher_->AttachTo(GetEmbedderWebContents());
3783 } 3787 }
3784 3788
3785 while (!RequestFrame(GetEmbedderWebContents())) { 3789 while (!RequestFrame(GetEmbedderWebContents())) {
3786 // RequestFrame failed because we were waiting on an ack ... wait a short 3790 // RequestFrame failed because we were waiting on an ack ... wait a short
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
3906 ClosingChromeSignInShouldNotCrash) { 3910 ClosingChromeSignInShouldNotCrash) {
3907 GURL signin_url{"chrome://chrome-signin"}; 3911 GURL signin_url{"chrome://chrome-signin"};
3908 3912
3909 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED); 3913 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED);
3910 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED); 3914 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED);
3911 WaitForWebViewInDom(); 3915 WaitForWebViewInDom();
3912 3916
3913 chrome::CloseTab(browser()); 3917 chrome::CloseTab(browser());
3914 } 3918 }
3915 #endif 3919 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698