diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-15 00:02:40 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-15 00:02:40 +0000 |
commit | b7a20d363af744159a2bb85bfe3db027d2d4819e (patch) | |
tree | 14a363b284d4456d6c0a4888a6b944af3e10b490 /chrome/browser/browser_focus_uitest.cc | |
parent | 3f58d855ccb7c29abd2fd73cb60e11089abe8dd1 (diff) | |
download | chromium_src-b7a20d363af744159a2bb85bfe3db027d2d4819e.zip chromium_src-b7a20d363af744159a2bb85bfe3db027d2d4819e.tar.gz chromium_src-b7a20d363af744159a2bb85bfe3db027d2d4819e.tar.bz2 |
Convert parts of errorpage_uitest.cc to be not flaky.
TEST=Covered by browser_tests.
http://crbug.com/19361, http://crbug.com/19395
Review URL: http://codereview.chromium.org/169002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_focus_uitest.cc')
-rw-r--r-- | chrome/browser/browser_focus_uitest.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc index 33f0bfc..853f424 100644 --- a/chrome/browser/browser_focus_uitest.cc +++ b/chrome/browser/browser_focus_uitest.cc @@ -651,7 +651,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) { // Open the new tab, reload. browser()->NewTab(); - ui_test_utils::ReloadCurrentTab(browser()); + browser()->Reload(); + ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); // Focus should stay on the location bar. EXPECT_EQ(browser_view->GetLocationBarView(), focus_manager->GetFocusedView()); @@ -661,7 +662,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) { browser_view->GetLocationBarView()->FocusLocation(); EXPECT_EQ(browser_view->GetLocationBarView(), focus_manager->GetFocusedView()); - ui_test_utils::ReloadCurrentTab(browser()); + browser()->Reload(); + ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); // Focus should now be on the tab contents. EXPECT_EQ(browser_view->GetTabContentsContainerView(), focus_manager->GetFocusedView()); @@ -681,7 +683,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReloadCrashedTab) { // Open a regular page, crash, reload. ui_test_utils::NavigateToURL(browser(), server->TestServerPageW(kSimplePage)); ui_test_utils::CrashTab(browser()->GetSelectedTabContents()); - ui_test_utils::ReloadCurrentTab(browser()); + browser()->Reload(); + ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); // Focus should now be on the tab contents. EXPECT_EQ(browser_view->GetTabContentsContainerView(), focus_manager->GetFocusedView()); |