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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } | 370 } |
371 | 371 |
372 // Do not end the overscroll sequence. | 372 // Do not end the overscroll sequence. |
373 } | 373 } |
374 | 374 |
375 // Tests that the page has has a screenshot when navigation happens: | 375 // Tests that the page has has a screenshot when navigation happens: |
376 // - from within the page (from a JS function) | 376 // - from within the page (from a JS function) |
377 // - interactively, when user does an overscroll gesture | 377 // - interactively, when user does an overscroll gesture |
378 // - interactively, when user navigates in history without the overscroll | 378 // - interactively, when user navigates in history without the overscroll |
379 // gesture. | 379 // gesture. |
380 #if defined(OS_WIN) | 380 // Flaky on Windows and ChromeOS (http://crbug.com/357311). Might be related to |
381 // http://crbug.com/357311 | 381 // OverscrollNavigation test. |
382 #define MAYBE_OverscrollScreenshot DISABLED_OverscrollScreenshot | 382 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, DISABLED_OverscrollScreenshot) { |
383 #else | |
384 #define MAYBE_OverscrollScreenshot OverscrollScreenshot | |
385 #endif | |
386 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_OverscrollScreenshot) { | |
387 // Disable the test for WinXP. See http://crbug/294116. | 383 // Disable the test for WinXP. See http://crbug/294116. |
388 #if defined(OS_WIN) | 384 #if defined(OS_WIN) |
389 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 385 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
390 LOG(WARNING) << "Test disabled due to unknown bug on WinXP."; | 386 LOG(WARNING) << "Test disabled due to unknown bug on WinXP."; |
391 return; | 387 return; |
392 } | 388 } |
393 #endif | 389 #endif |
394 | 390 |
395 ASSERT_NO_FATAL_FAILURE( | 391 ASSERT_NO_FATAL_FAILURE( |
396 StartTestWithPage("files/overscroll_navigation.html")); | 392 StartTestWithPage("files/overscroll_navigation.html")); |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 10); | 671 10); |
676 base::string16 actual_title = title_watcher.WaitAndGetTitle(); | 672 base::string16 actual_title = title_watcher.WaitAndGetTitle(); |
677 EXPECT_EQ(expected_title, actual_title); | 673 EXPECT_EQ(expected_title, actual_title); |
678 | 674 |
679 EXPECT_EQ(2, GetCurrentIndex()); | 675 EXPECT_EQ(2, GetCurrentIndex()); |
680 EXPECT_TRUE(controller.CanGoBack()); | 676 EXPECT_TRUE(controller.CanGoBack()); |
681 EXPECT_FALSE(controller.CanGoForward()); | 677 EXPECT_FALSE(controller.CanGoForward()); |
682 } | 678 } |
683 | 679 |
684 } // namespace content | 680 } // namespace content |
OLD | NEW |