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
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 33f0bfc..853f424c 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -651,7 +651,8 @@
// 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 @@
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 @@
// 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());