OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/keyboard_codes.h" | 5 #include "base/keyboard_codes.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
8 #include "chrome/browser/browser_window.h" | 8 #include "chrome/browser/browser_window.h" |
9 #include "chrome/browser/find_bar_controller.h" | 9 #include "chrome/browser/find_bar_controller.h" |
10 #include "chrome/browser/find_notification_details.h" | 10 #include "chrome/browser/find_notification_details.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // Search for a text that exists within a link on the page. | 412 // Search for a text that exists within a link on the page. |
413 int ordinal = 0; | 413 int ordinal = 0; |
414 EXPECT_EQ(2, ui_test_utils::FindInPage(tab_contents, L"html ", | 414 EXPECT_EQ(2, ui_test_utils::FindInPage(tab_contents, L"html ", |
415 kFwd, kIgnoreCase, &ordinal)); | 415 kFwd, kIgnoreCase, &ordinal)); |
416 EXPECT_EQ(1, ordinal); | 416 EXPECT_EQ(1, ordinal); |
417 } | 417 } |
418 | 418 |
419 // Make sure Find box disappears on Navigate but not on Refresh. | 419 // Make sure Find box disappears on Navigate but not on Refresh. |
420 // Flaky, see http://crbug.com/16447. | 420 // Flaky, see http://crbug.com/16447. |
421 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, | 421 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, |
422 DISABLED_FindDisappearOnNavigate) { | 422 FLAKY_FindDisappearOnNavigate) { |
423 HTTPTestServer* server = StartHTTPServer(); | 423 HTTPTestServer* server = StartHTTPServer(); |
424 | 424 |
425 // First we navigate to our special focus tracking page. | 425 // First we navigate to our special focus tracking page. |
426 GURL url = server->TestServerPageW(kSimplePage); | 426 GURL url = server->TestServerPageW(kSimplePage); |
427 GURL url2 = server->TestServerPageW(kFramePage); | 427 GURL url2 = server->TestServerPageW(kFramePage); |
428 ui_test_utils::NavigateToURL(browser(), url); | 428 ui_test_utils::NavigateToURL(browser(), url); |
429 | 429 |
430 // Open the Find window with animations disabled. | 430 // Open the Find window with animations disabled. |
431 FindBarHost::disable_animations_during_testing_ = true; | 431 FindBarHost::disable_animations_during_testing_ = true; |
432 browser()->ShowFindBar(); | 432 browser()->ShowFindBar(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 browser()->ShowHistoryTab(); | 490 browser()->ShowHistoryTab(); |
491 | 491 |
492 // Make sure Find box is closed. | 492 // Make sure Find box is closed. |
493 GetFindBarWindowInfo(&position, &fully_visible); | 493 GetFindBarWindowInfo(&position, &fully_visible); |
494 EXPECT_FALSE(fully_visible); | 494 EXPECT_FALSE(fully_visible); |
495 } | 495 } |
496 | 496 |
497 // Make sure Find box moves out of the way if it is obscuring the active match. | 497 // Make sure Find box moves out of the way if it is obscuring the active match. |
498 // Flaky, see http://crbug.com/16447. | 498 // Flaky, see http://crbug.com/16447. |
499 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, | 499 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, |
500 DISABLED_FindMovesWhenObscuring) { | 500 FLAKY_FindMovesWhenObscuring) { |
501 HTTPTestServer* server = StartHTTPServer(); | 501 HTTPTestServer* server = StartHTTPServer(); |
502 | 502 |
503 GURL url = server->TestServerPageW(kMoveIfOver); | 503 GURL url = server->TestServerPageW(kMoveIfOver); |
504 ui_test_utils::NavigateToURL(browser(), url); | 504 ui_test_utils::NavigateToURL(browser(), url); |
505 | 505 |
506 // Open the Find window with animations disabled. | 506 // Open the Find window with animations disabled. |
507 FindBarHost::disable_animations_during_testing_ = true; | 507 FindBarHost::disable_animations_during_testing_ = true; |
508 browser()->ShowFindBar(); | 508 browser()->ShowFindBar(); |
509 | 509 |
510 gfx::Point start_position; | 510 gfx::Point start_position; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 // backspace, but that's been proven flaky in the past, so we go straight to | 629 // backspace, but that's been proven flaky in the past, so we go straight to |
630 // tab_contents. | 630 // tab_contents. |
631 TabContents* tab_contents = browser()->GetSelectedTabContents(); | 631 TabContents* tab_contents = browser()->GetSelectedTabContents(); |
632 // Stop the (non-existing) find operation, and clear the selection (which | 632 // Stop the (non-existing) find operation, and clear the selection (which |
633 // signals the UI is still active). | 633 // signals the UI is still active). |
634 tab_contents->StopFinding(true); | 634 tab_contents->StopFinding(true); |
635 // Make sure the Find UI flag hasn't been cleared, it must be so that the UI | 635 // Make sure the Find UI flag hasn't been cleared, it must be so that the UI |
636 // still responds to browser window resizing. | 636 // still responds to browser window resizing. |
637 ASSERT_TRUE(tab_contents->find_ui_active()); | 637 ASSERT_TRUE(tab_contents->find_ui_active()); |
638 } | 638 } |
OLD | NEW |