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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 static_cast<RenderWidgetHostViewAura*>( | 865 static_cast<RenderWidgetHostViewAura*>( |
866 shell()->web_contents()->GetRenderWidgetHostView()); | 866 shell()->web_contents()->GetRenderWidgetHostView()); |
867 rwhva->ResetHasSnappedToBoundary(); | 867 rwhva->ResetHasSnappedToBoundary(); |
868 EXPECT_FALSE(rwhva->has_snapped_to_boundary()); | 868 EXPECT_FALSE(rwhva->has_snapped_to_boundary()); |
869 window->AddChild(shell()->web_contents()->GetNativeView()); | 869 window->AddChild(shell()->web_contents()->GetNativeView()); |
870 EXPECT_TRUE(rwhva->has_snapped_to_boundary()); | 870 EXPECT_TRUE(rwhva->has_snapped_to_boundary()); |
871 } | 871 } |
872 | 872 |
873 // Flaky on some platforms, likely for the same reason as other flaky overscroll | 873 // Flaky on some platforms, likely for the same reason as other flaky overscroll |
874 // tests. http://crbug.com/305722 | 874 // tests. http://crbug.com/305722 |
| 875 // TODO(tdresser): Re-enable this once eager GR is back on. See |
| 876 // crbug.com/410280. |
875 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 877 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
876 #define MAYBE_OverscrollNavigationTouchThrottling \ | 878 #define MAYBE_OverscrollNavigationTouchThrottling \ |
877 DISABLED_OverscrollNavigationTouchThrottling | 879 DISABLED_OverscrollNavigationTouchThrottling |
878 #else | 880 #else |
879 #define MAYBE_OverscrollNavigationTouchThrottling \ | 881 #define MAYBE_OverscrollNavigationTouchThrottling \ |
880 OverscrollNavigationTouchThrottling | 882 DISABLED_OverscrollNavigationTouchThrottling |
881 #endif | 883 #endif |
882 | 884 |
883 // Tests that touch moves are not throttled when performing a scroll gesture on | 885 // Tests that touch moves are not throttled when performing a scroll gesture on |
884 // a non-scrollable area, except during gesture-nav. | 886 // a non-scrollable area, except during gesture-nav. |
885 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, | 887 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, |
886 MAYBE_OverscrollNavigationTouchThrottling) { | 888 MAYBE_OverscrollNavigationTouchThrottling) { |
887 ASSERT_NO_FATAL_FAILURE( | 889 ASSERT_NO_FATAL_FAILURE( |
888 StartTestWithPage("files/overscroll_navigation.html")); | 890 StartTestWithPage("files/overscroll_navigation.html")); |
889 | 891 |
890 AddInputEventMessageFilter(); | 892 AddInputEventMessageFilter(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 WaitAFrame(); | 963 WaitAFrame(); |
962 | 964 |
963 if (!navigated) | 965 if (!navigated) |
964 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 966 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
965 else | 967 else |
966 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 968 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
967 } | 969 } |
968 } | 970 } |
969 | 971 |
970 } // namespace content | 972 } // namespace content |
OLD | NEW |