| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 NavigationControllerImpl* controller = &web_contents->GetController(); | 270 NavigationControllerImpl* controller = &web_contents->GetController(); |
| 271 | 271 |
| 272 screenshot_manager_ = new ScreenshotTracker(controller); | 272 screenshot_manager_ = new ScreenshotTracker(controller); |
| 273 controller->SetScreenshotManager(base::WrapUnique(screenshot_manager_)); | 273 controller->SetScreenshotManager(base::WrapUnique(screenshot_manager_)); |
| 274 | 274 |
| 275 frame_watcher_ = new FrameWatcher(); | 275 frame_watcher_ = new FrameWatcher(); |
| 276 frame_watcher_->AttachTo(shell()->web_contents()); | 276 frame_watcher_->AttachTo(shell()->web_contents()); |
| 277 } | 277 } |
| 278 | 278 |
| 279 void SetUpCommandLine(base::CommandLine* cmd) override { | 279 void SetUpCommandLine(base::CommandLine* cmd) override { |
| 280 cmd->AppendSwitchASCII(switches::kTouchEvents, | 280 cmd->AppendSwitchASCII(switches::kTouchEventFeatureDetection, |
| 281 switches::kTouchEventsEnabled); | 281 switches::kTouchEventFeatureDetectionEnabled); |
| 282 } | 282 } |
| 283 | 283 |
| 284 void TestOverscrollNavigation(bool touch_handler) { | 284 void TestOverscrollNavigation(bool touch_handler) { |
| 285 ASSERT_NO_FATAL_FAILURE(StartTestWithPage("/overscroll_navigation.html")); | 285 ASSERT_NO_FATAL_FAILURE(StartTestWithPage("/overscroll_navigation.html")); |
| 286 WebContentsImpl* web_contents = | 286 WebContentsImpl* web_contents = |
| 287 static_cast<WebContentsImpl*>(shell()->web_contents()); | 287 static_cast<WebContentsImpl*>(shell()->web_contents()); |
| 288 NavigationController& controller = web_contents->GetController(); | 288 NavigationController& controller = web_contents->GetController(); |
| 289 RenderFrameHost* main_frame = web_contents->GetMainFrame(); | 289 RenderFrameHost* main_frame = web_contents->GetMainFrame(); |
| 290 | 290 |
| 291 EXPECT_FALSE(controller.CanGoBack()); | 291 EXPECT_FALSE(controller.CanGoBack()); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 details = dispatcher->OnEventFromSource(&release); | 1127 details = dispatcher->OnEventFromSource(&release); |
| 1128 ASSERT_FALSE(details.dispatcher_destroyed); | 1128 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1129 WaitAFrame(); | 1129 WaitAFrame(); |
| 1130 | 1130 |
| 1131 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1131 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1132 EXPECT_FALSE(tracker.overscroll_completed()); | 1132 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1133 } | 1133 } |
| 1134 } | 1134 } |
| 1135 | 1135 |
| 1136 } // namespace content | 1136 } // namespace content |
| OLD | NEW |