Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Side by Side Diff: chrome/browser/views/find_bar_win_browsertest.cc

Issue 159805: Disable flaky parts of FindInPageControllerTest. (Closed)
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/browser.h" 6 #include "chrome/browser/browser.h"
7 #include "chrome/browser/browser_window.h" 7 #include "chrome/browser/browser_window.h"
8 #include "chrome/browser/find_bar_controller.h" 8 #include "chrome/browser/find_bar_controller.h"
9 #include "chrome/browser/find_notification_details.h" 9 #include "chrome/browser/find_notification_details.h"
10 #include "chrome/browser/renderer_host/render_view_host.h" 10 #include "chrome/browser/renderer_host/render_view_host.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 TabContents* tab_contents = browser()->GetSelectedTabContents(); 410 TabContents* tab_contents = browser()->GetSelectedTabContents();
411 ASSERT_TRUE(NULL != tab_contents); 411 ASSERT_TRUE(NULL != tab_contents);
412 412
413 // Search for a text that exists within a link on the page. 413 // Search for a text that exists within a link on the page.
414 int ordinal = 0; 414 int ordinal = 0;
415 EXPECT_EQ(2, FindInPage(L"html ", FWD, IGNORE_CASE, &ordinal)); 415 EXPECT_EQ(2, FindInPage(L"html ", FWD, IGNORE_CASE, &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 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) { 420 // Flaky, see http://crbug.com/16447.
421 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
422 DISABLED_FindDisappearOnNavigate) {
421 HTTPTestServer* server = StartHTTPServer(); 423 HTTPTestServer* server = StartHTTPServer();
422 424
423 // First we navigate to our special focus tracking page. 425 // First we navigate to our special focus tracking page.
424 GURL url = server->TestServerPageW(kSimplePage); 426 GURL url = server->TestServerPageW(kSimplePage);
425 GURL url2 = server->TestServerPageW(kFramePage); 427 GURL url2 = server->TestServerPageW(kFramePage);
426 ui_test_utils::NavigateToURL(browser(), url); 428 ui_test_utils::NavigateToURL(browser(), url);
427 429
428 // Open the Find window with animations disabled. 430 // Open the Find window with animations disabled.
429 FindBarWin::disable_animations_during_testing_ = true; 431 FindBarWin::disable_animations_during_testing_ = true;
430 browser()->ShowFindBar(); 432 browser()->ShowFindBar();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 EXPECT_TRUE(fully_visible); 488 EXPECT_TRUE(fully_visible);
487 489
488 browser()->ShowHistoryTab(); 490 browser()->ShowHistoryTab();
489 491
490 // Make sure Find box is closed. 492 // Make sure Find box is closed.
491 GetFindBarWindowInfo(&position, &fully_visible); 493 GetFindBarWindowInfo(&position, &fully_visible);
492 EXPECT_FALSE(fully_visible); 494 EXPECT_FALSE(fully_visible);
493 } 495 }
494 496
495 // 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.
496 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindMovesWhenObscuring) { 498 // Flaky, see http://crbug.com/16447.
499 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
500 DISABLED_FindMovesWhenObscuring) {
497 HTTPTestServer* server = StartHTTPServer(); 501 HTTPTestServer* server = StartHTTPServer();
498 502
499 GURL url = server->TestServerPageW(kMoveIfOver); 503 GURL url = server->TestServerPageW(kMoveIfOver);
500 ui_test_utils::NavigateToURL(browser(), url); 504 ui_test_utils::NavigateToURL(browser(), url);
501 505
502 // Open the Find window with animations disabled. 506 // Open the Find window with animations disabled.
503 FindBarWin::disable_animations_during_testing_ = true; 507 FindBarWin::disable_animations_during_testing_ = true;
504 browser()->ShowFindBar(); 508 browser()->ShowFindBar();
505 509
506 gfx::Point start_position; 510 gfx::Point start_position;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 // backspace, but that's been proven flaky in the past, so we go straight to 622 // backspace, but that's been proven flaky in the past, so we go straight to
619 // tab_contents. 623 // tab_contents.
620 TabContents* tab_contents = browser()->GetSelectedTabContents(); 624 TabContents* tab_contents = browser()->GetSelectedTabContents();
621 // Stop the (non-existing) find operation, and clear the selection (which 625 // Stop the (non-existing) find operation, and clear the selection (which
622 // signals the UI is still active). 626 // signals the UI is still active).
623 tab_contents->StopFinding(true); 627 tab_contents->StopFinding(true);
624 // Make sure the Find UI flag hasn't been cleared, it must be so that the UI 628 // Make sure the Find UI flag hasn't been cleared, it must be so that the UI
625 // still responds to browser window resizing. 629 // still responds to browser window resizing.
626 ASSERT_TRUE(tab_contents->find_ui_active()); 630 ASSERT_TRUE(tab_contents->find_ui_active());
627 } 631 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698