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

Side by Side Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 557643002: Disable flaky BrowserFocusTest.FindFocusTest on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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) 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 EXPECT_TRUE(interstitial_page->HasFocus()); 464 EXPECT_TRUE(interstitial_page->HasFocus());
465 465
466 // Hide the interstitial; the original page should gain focus. 466 // Hide the interstitial; the original page should gain focus.
467 interstitial_page->DontProceed(); 467 interstitial_page->DontProceed();
468 content::RunAllPendingInMessageLoop(); 468 content::RunAllPendingInMessageLoop();
469 EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); 469 EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
470 EXPECT_TRUE(tab->GetRenderViewHost()->GetView()->HasFocus()); 470 EXPECT_TRUE(tab->GetRenderViewHost()->GetView()->HasFocus());
471 } 471 }
472 472
473 // Test that find-in-page UI can request focus, even when it is already open. 473 // Test that find-in-page UI can request focus, even when it is already open.
474 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) { 474 #if defined(OS_MACOSX)
475 #define MAYBE_FindFocusTest DISABLED_FindFocusTest
476 #else
477 #define MAYBE_FindFocusTest FindFocusTest
478 #endif
479 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FindFocusTest) {
475 chrome::DisableFindBarAnimationsDuringTesting(true); 480 chrome::DisableFindBarAnimationsDuringTesting(true);
476 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); 481 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
477 const GURL url = embedded_test_server()->GetURL(kTypicalPage); 482 const GURL url = embedded_test_server()->GetURL(kTypicalPage);
478 ui_test_utils::NavigateToURL(browser(), url); 483 ui_test_utils::NavigateToURL(browser(), url);
479 EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); 484 EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
480 485
481 chrome::ShowFindBar(browser()); 486 chrome::ShowFindBar(browser());
482 EXPECT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 487 EXPECT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
483 488
484 chrome::FocusLocationBar(browser()); 489 chrome::FocusLocationBar(browser());
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 695 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
691 content::NotificationService::AllSources()); 696 content::NotificationService::AllSources());
692 chrome::GoForward(browser(), CURRENT_TAB); 697 chrome::GoForward(browser(), CURRENT_TAB);
693 forward_nav_observer.Wait(); 698 forward_nav_observer.Wait();
694 } 699 }
695 700
696 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); 701 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX));
697 } 702 }
698 703
699 } // namespace 704 } // namespace
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