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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 NavigateToURL(shell(), test_url); | 252 NavigateToURL(shell(), test_url); |
253 | 253 |
254 WebContentsImpl* web_contents = | 254 WebContentsImpl* web_contents = |
255 static_cast<WebContentsImpl*>(shell()->web_contents()); | 255 static_cast<WebContentsImpl*>(shell()->web_contents()); |
256 NavigationControllerImpl* controller = &web_contents->GetController(); | 256 NavigationControllerImpl* controller = &web_contents->GetController(); |
257 | 257 |
258 screenshot_manager_ = new ScreenshotTracker(controller); | 258 screenshot_manager_ = new ScreenshotTracker(controller); |
259 controller->SetScreenshotManager(screenshot_manager_); | 259 controller->SetScreenshotManager(screenshot_manager_); |
260 } | 260 } |
261 | 261 |
262 void SetUpCommandLine(CommandLine* cmd) override { | 262 void SetUpCommandLine(base::CommandLine* cmd) override { |
263 cmd->AppendSwitchASCII(switches::kTouchEvents, | 263 cmd->AppendSwitchASCII(switches::kTouchEvents, |
264 switches::kTouchEventsEnabled); | 264 switches::kTouchEventsEnabled); |
265 } | 265 } |
266 | 266 |
267 void TestOverscrollNavigation(bool touch_handler) { | 267 void TestOverscrollNavigation(bool touch_handler) { |
268 ASSERT_NO_FATAL_FAILURE( | 268 ASSERT_NO_FATAL_FAILURE( |
269 StartTestWithPage("files/overscroll_navigation.html")); | 269 StartTestWithPage("files/overscroll_navigation.html")); |
270 WebContentsImpl* web_contents = | 270 WebContentsImpl* web_contents = |
271 static_cast<WebContentsImpl*>(shell()->web_contents()); | 271 static_cast<WebContentsImpl*>(shell()->web_contents()); |
272 NavigationController& controller = web_contents->GetController(); | 272 NavigationController& controller = web_contents->GetController(); |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 details = dispatcher->OnEventFromSource(&release); | 1145 details = dispatcher->OnEventFromSource(&release); |
1146 ASSERT_FALSE(details.dispatcher_destroyed); | 1146 ASSERT_FALSE(details.dispatcher_destroyed); |
1147 WaitAFrame(); | 1147 WaitAFrame(); |
1148 | 1148 |
1149 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1149 EXPECT_LT(0, tracker.num_overscroll_updates()); |
1150 EXPECT_FALSE(tracker.overscroll_completed()); | 1150 EXPECT_FALSE(tracker.overscroll_completed()); |
1151 } | 1151 } |
1152 } | 1152 } |
1153 | 1153 |
1154 } // namespace content | 1154 } // namespace content |
OLD | NEW |