| 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 static_cast<RenderWidgetHostViewAura*>( | 905 static_cast<RenderWidgetHostViewAura*>( |
| 906 shell()->web_contents()->GetRenderWidgetHostView()); | 906 shell()->web_contents()->GetRenderWidgetHostView()); |
| 907 rwhva->ResetHasSnappedToBoundary(); | 907 rwhva->ResetHasSnappedToBoundary(); |
| 908 EXPECT_FALSE(rwhva->has_snapped_to_boundary()); | 908 EXPECT_FALSE(rwhva->has_snapped_to_boundary()); |
| 909 window->AddChild(shell()->web_contents()->GetNativeView()); | 909 window->AddChild(shell()->web_contents()->GetNativeView()); |
| 910 EXPECT_TRUE(rwhva->has_snapped_to_boundary()); | 910 EXPECT_TRUE(rwhva->has_snapped_to_boundary()); |
| 911 } | 911 } |
| 912 | 912 |
| 913 // Flaky on some platforms, likely for the same reason as other flaky overscroll | 913 // Flaky on some platforms, likely for the same reason as other flaky overscroll |
| 914 // tests. http://crbug.com/305722 | 914 // tests. http://crbug.com/305722 |
| 915 // TODO(tdresser): Re-enable this once eager GR is back on. See | |
| 916 // crbug.com/410280. | |
| 917 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 915 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 918 #define MAYBE_OverscrollNavigationTouchThrottling \ | 916 #define MAYBE_OverscrollNavigationTouchThrottling \ |
| 919 DISABLED_OverscrollNavigationTouchThrottling | 917 DISABLED_OverscrollNavigationTouchThrottling |
| 920 #else | 918 #else |
| 921 #define MAYBE_OverscrollNavigationTouchThrottling \ | 919 #define MAYBE_OverscrollNavigationTouchThrottling \ |
| 922 DISABLED_OverscrollNavigationTouchThrottling | 920 OverscrollNavigationTouchThrottling |
| 923 #endif | 921 #endif |
| 924 | 922 |
| 925 // Tests that touch moves are not throttled when performing a scroll gesture on | 923 // Tests that touch moves are not throttled when performing a scroll gesture on |
| 926 // a non-scrollable area, except during gesture-nav. | 924 // a non-scrollable area, except during gesture-nav. |
| 927 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, | 925 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, |
| 928 MAYBE_OverscrollNavigationTouchThrottling) { | 926 MAYBE_OverscrollNavigationTouchThrottling) { |
| 929 ASSERT_NO_FATAL_FAILURE( | 927 ASSERT_NO_FATAL_FAILURE( |
| 930 StartTestWithPage("files/overscroll_navigation.html")); | 928 StartTestWithPage("files/overscroll_navigation.html")); |
| 931 | 929 |
| 932 AddInputEventMessageFilter(); | 930 AddInputEventMessageFilter(); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 details = dispatcher->OnEventFromSource(&release); | 1146 details = dispatcher->OnEventFromSource(&release); |
| 1149 ASSERT_FALSE(details.dispatcher_destroyed); | 1147 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1150 WaitAFrame(); | 1148 WaitAFrame(); |
| 1151 | 1149 |
| 1152 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1150 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1153 EXPECT_FALSE(tracker.overscroll_completed()); | 1151 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1154 } | 1152 } |
| 1155 } | 1153 } |
| 1156 | 1154 |
| 1157 } // namespace content | 1155 } // namespace content |
| OLD | NEW |