| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 static_cast<WebContentsImpl*>(shell()->web_contents()); | 269 static_cast<WebContentsImpl*>(shell()->web_contents()); |
| 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 { | |
| 280 cmd->AppendSwitchASCII(switches::kTouchEvents, | |
| 281 switches::kTouchEventsEnabled); | |
| 282 } | |
| 283 | |
| 284 void TestOverscrollNavigation(bool touch_handler) { | 279 void TestOverscrollNavigation(bool touch_handler) { |
| 285 ASSERT_NO_FATAL_FAILURE(StartTestWithPage("/overscroll_navigation.html")); | 280 ASSERT_NO_FATAL_FAILURE(StartTestWithPage("/overscroll_navigation.html")); |
| 286 WebContentsImpl* web_contents = | 281 WebContentsImpl* web_contents = |
| 287 static_cast<WebContentsImpl*>(shell()->web_contents()); | 282 static_cast<WebContentsImpl*>(shell()->web_contents()); |
| 288 NavigationController& controller = web_contents->GetController(); | 283 NavigationController& controller = web_contents->GetController(); |
| 289 RenderFrameHost* main_frame = web_contents->GetMainFrame(); | 284 RenderFrameHost* main_frame = web_contents->GetMainFrame(); |
| 290 | 285 |
| 291 EXPECT_FALSE(controller.CanGoBack()); | 286 EXPECT_FALSE(controller.CanGoBack()); |
| 292 EXPECT_FALSE(controller.CanGoForward()); | 287 EXPECT_FALSE(controller.CanGoForward()); |
| 293 int index = -1; | 288 int index = -1; |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 details = dispatcher->OnEventFromSource(&release); | 1121 details = dispatcher->OnEventFromSource(&release); |
| 1127 ASSERT_FALSE(details.dispatcher_destroyed); | 1122 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1128 WaitAFrame(); | 1123 WaitAFrame(); |
| 1129 | 1124 |
| 1130 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1125 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1131 EXPECT_FALSE(tracker.overscroll_completed()); | 1126 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1132 } | 1127 } |
| 1133 } | 1128 } |
| 1134 | 1129 |
| 1135 } // namespace content | 1130 } // namespace content |
| OLD | NEW |