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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 | 863 |
864 RenderWidgetHostViewAura* rwhva = | 864 RenderWidgetHostViewAura* rwhva = |
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 Windows, likely for the same reason as other flaky overscroll tests. | 873 // Flaky on some platforms, likely for the same reason as other flaky overscroll |
874 // http://crbug.com/305722 | 874 // tests. http://crbug.com/305722 |
875 #if defined(OS_WIN) | 875 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
876 #define MAYBE_OverscrollNavigationTouchThrottling \ | 876 #define MAYBE_OverscrollNavigationTouchThrottling \ |
877 DISABLED_OverscrollNavigationTouchThrottling | 877 DISABLED_OverscrollNavigationTouchThrottling |
878 #else | 878 #else |
879 #define MAYBE_OverscrollNavigationTouchThrottling \ | 879 #define MAYBE_OverscrollNavigationTouchThrottling \ |
880 OverscrollNavigationTouchThrottling | 880 OverscrollNavigationTouchThrottling |
881 #endif | 881 #endif |
882 | 882 |
883 // Tests that touch moves are not throttled when performing a scroll gesture on | 883 // Tests that touch moves are not throttled when performing a scroll gesture on |
884 // a non-scrollable area, except during gesture-nav. | 884 // a non-scrollable area, except during gesture-nav. |
885 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, | 885 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 WaitAFrame(); | 961 WaitAFrame(); |
962 | 962 |
963 if (!navigated) | 963 if (!navigated) |
964 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 964 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
965 else | 965 else |
966 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 966 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
967 } | 967 } |
968 } | 968 } |
969 | 969 |
970 } // namespace content | 970 } // namespace content |
OLD | NEW |