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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 } | 376 } |
377 | 377 |
378 // Do not end the overscroll sequence. | 378 // Do not end the overscroll sequence. |
379 } | 379 } |
380 | 380 |
381 // Tests that the page has has a screenshot when navigation happens: | 381 // Tests that the page has has a screenshot when navigation happens: |
382 // - from within the page (from a JS function) | 382 // - from within the page (from a JS function) |
383 // - interactively, when user does an overscroll gesture | 383 // - interactively, when user does an overscroll gesture |
384 // - interactively, when user navigates in history without the overscroll | 384 // - interactively, when user navigates in history without the overscroll |
385 // gesture. | 385 // gesture. |
386 // Flaky (http://crbug.com/357311). Might be related to | 386 // Flaky on Windows (http://crbug.com/357311). Might be related to |
387 // OverscrollNavigation test. | 387 // OverscrollNavigation test. |
388 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, DISABLED_OverscrollScreenshot) { | 388 // Flaky on Ozone (http://crbug.com/399676). |
| 389 #if defined(OS_WIN) || defined(USE_OZONE) |
| 390 #define MAYBE_OverscrollScreenshot DISABLED_OverscrollScreenshot |
| 391 #else |
| 392 #define MAYBE_OverscrollScreenshot OverscrollScreenshot |
| 393 #endif |
| 394 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_OverscrollScreenshot) { |
389 // Disable the test for WinXP. See http://crbug/294116. | 395 // Disable the test for WinXP. See http://crbug/294116. |
390 #if defined(OS_WIN) | 396 #if defined(OS_WIN) |
391 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 397 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
392 LOG(WARNING) << "Test disabled due to unknown bug on WinXP."; | 398 LOG(WARNING) << "Test disabled due to unknown bug on WinXP."; |
393 return; | 399 return; |
394 } | 400 } |
395 #endif | 401 #endif |
396 | 402 |
397 ASSERT_NO_FATAL_FAILURE( | 403 ASSERT_NO_FATAL_FAILURE( |
398 StartTestWithPage("files/overscroll_navigation.html")); | 404 StartTestWithPage("files/overscroll_navigation.html")); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 RenderWidgetHostViewAura* rwhva = | 741 RenderWidgetHostViewAura* rwhva = |
736 static_cast<RenderWidgetHostViewAura*>( | 742 static_cast<RenderWidgetHostViewAura*>( |
737 shell()->web_contents()->GetRenderWidgetHostView()); | 743 shell()->web_contents()->GetRenderWidgetHostView()); |
738 rwhva->ResetHasSnappedToBoundary(); | 744 rwhva->ResetHasSnappedToBoundary(); |
739 EXPECT_FALSE(rwhva->has_snapped_to_boundary()); | 745 EXPECT_FALSE(rwhva->has_snapped_to_boundary()); |
740 window->AddChild(shell()->web_contents()->GetNativeView()); | 746 window->AddChild(shell()->web_contents()->GetNativeView()); |
741 EXPECT_TRUE(rwhva->has_snapped_to_boundary()); | 747 EXPECT_TRUE(rwhva->has_snapped_to_boundary()); |
742 } | 748 } |
743 | 749 |
744 } // namespace content | 750 } // namespace content |
OLD | NEW |