| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" |
| 11 #include "chrome/browser/renderer_host/render_view_host.h" | 11 #include "chrome/browser/renderer_host/render_view_host.h" |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 EXPECT_TRUE(fully_visible); | 547 EXPECT_TRUE(fully_visible); |
| 548 | 548 |
| 549 browser()->ShowHistoryTab(); | 549 browser()->ShowHistoryTab(); |
| 550 | 550 |
| 551 // Make sure Find box is closed. | 551 // Make sure Find box is closed. |
| 552 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); | 552 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); |
| 553 EXPECT_FALSE(fully_visible); | 553 EXPECT_FALSE(fully_visible); |
| 554 } | 554 } |
| 555 | 555 |
| 556 // Make sure Find box moves out of the way if it is obscuring the active match. | 556 // Make sure Find box moves out of the way if it is obscuring the active match. |
| 557 // Flaky, see http://crbug.com/16447. | 557 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindMovesWhenObscuring) { |
| 558 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, | |
| 559 FLAKY_FindMovesWhenObscuring) { | |
| 560 HTTPTestServer* server = StartHTTPServer(); | 558 HTTPTestServer* server = StartHTTPServer(); |
| 561 | 559 |
| 562 GURL url = server->TestServerPageW(kMoveIfOver); | 560 GURL url = server->TestServerPageW(kMoveIfOver); |
| 563 ui_test_utils::NavigateToURL(browser(), url); | 561 ui_test_utils::NavigateToURL(browser(), url); |
| 564 | 562 |
| 565 // Open the Find window with animations disabled. | 563 // Open the Find window with animations disabled. |
| 566 DropdownBarHost::disable_animations_during_testing_ = true; | 564 DropdownBarHost::disable_animations_during_testing_ = true; |
| 567 browser()->ShowFindBar(); | 565 browser()->ShowFindBar(); |
| 568 | 566 |
| 569 gfx::Point start_position; | 567 gfx::Point start_position; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 // Find "given". | 785 // Find "given". |
| 788 FindInPageWchar(tab2, L"given", kFwd, kIgnoreCase, &ordinal); | 786 FindInPageWchar(tab2, L"given", kFwd, kIgnoreCase, &ordinal); |
| 789 | 787 |
| 790 // Switch back to first tab. | 788 // Switch back to first tab. |
| 791 browser()->SelectTabContentsAt(0, false); | 789 browser()->SelectTabContentsAt(0, false); |
| 792 browser()->GetFindBarController()->EndFindSession(); | 790 browser()->GetFindBarController()->EndFindSession(); |
| 793 // Simulate F3. | 791 // Simulate F3. |
| 794 ui_test_utils::FindInPage(tab1, string16(), kFwd, kIgnoreCase, &ordinal); | 792 ui_test_utils::FindInPage(tab1, string16(), kFwd, kIgnoreCase, &ordinal); |
| 795 EXPECT_EQ(tab1->find_text(), WideToUTF16(L"Default")); | 793 EXPECT_EQ(tab1->find_text(), WideToUTF16(L"Default")); |
| 796 } | 794 } |
| OLD | NEW |