diff options
author | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-17 19:36:06 +0000 |
---|---|---|
committer | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-17 19:36:06 +0000 |
commit | 6b4e8e4d926b90d49668c0bf5189e60c60b71762 (patch) | |
tree | 7285f9d2dcea8f07de6a0c3e5f8a113841b12317 /chrome/browser/ui/find_bar | |
parent | ec41a1d0f8d75e3b21ea4db6dbbb432e08a8e923 (diff) | |
download | chromium_src-6b4e8e4d926b90d49668c0bf5189e60c60b71762.zip chromium_src-6b4e8e4d926b90d49668c0bf5189e60c60b71762.tar.gz chromium_src-6b4e8e4d926b90d49668c0bf5189e60c60b71762.tar.bz2 |
Revert 96617
Revert 96593 (Original review URL http://codereview.chromium.org/7489019)
Fix up various browser tests not to use WaitForNavigation.
Now with corrected pdf browsertest
R=phajdan.jr@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7645001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/find_bar')
-rw-r--r-- | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc index 5445484..f569772 100644 --- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc +++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc @@ -581,8 +581,12 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) { EXPECT_TRUE(fully_visible); // Reload the tab and make sure Find window doesn't go away. + ui_test_utils::WindowedNotificationObserver observer( + content::NOTIFICATION_LOAD_STOP, + Source<NavigationController>( + &browser()->GetSelectedTabContentsWrapper()->controller())); browser()->Reload(CURRENT_TAB); - ui_test_utils::WaitForNavigationInCurrentTab(browser()); + observer.Wait(); EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); EXPECT_TRUE(fully_visible); @@ -1048,9 +1052,10 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) { // Open a new incognito window and navigate to the same page. Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile(); Browser* incognito_browser = Browser::Create(incognito_profile); + ui_test_utils::WindowedNotificationObserver observer( + content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources()); incognito_browser->AddSelectedTabWithURL(url, PageTransition::START_PAGE); - ui_test_utils::WaitForNavigation( - &incognito_browser->GetSelectedTabContents()->controller()); + observer.Wait(); incognito_browser->window()->Show(); // Open the find box and make sure that it is prepopulated with "page". @@ -1093,8 +1098,11 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, ActivateLinkNavigatesPage) { EXPECT_EQ(ordinal, 1); // End the find session, click on the link. + ui_test_utils::WindowedNotificationObserver observer( + content::NOTIFICATION_LOAD_STOP, + Source<NavigationController>(&tab->controller())); tab->find_tab_helper()->StopFinding(FindBarController::kActivateSelection); - EXPECT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); + observer.Wait(); } // Tests that FindBar fits within a narrow browser window. @@ -1102,12 +1110,12 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FitWindow) { Browser::CreateParams params(Browser::TYPE_POPUP, browser()->profile()); params.initial_bounds = gfx::Rect(0, 0, 250, 500); Browser* popup = Browser::CreateWithParams(params); + ui_test_utils::WindowedNotificationObserver observer( + content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources()); popup->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL), PageTransition::LINK); - // Wait for the page to finish loading. - ui_test_utils::WaitForNavigation( - &popup->GetSelectedTabContents()->controller()); + observer.Wait(); popup->window()->Show(); // On GTK, bounds change is asynchronous. |