summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r--chrome/test/ui_test_utils.cc26
1 files changed, 17 insertions, 9 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index 928ff87..543828b 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -282,6 +282,23 @@ bool GetCurrentTabTitle(const Browser* browser, string16* title) {
return true;
}
+bool WaitForNavigationInCurrentTab(Browser* browser) {
+ TabContents* tab_contents = browser->GetSelectedTabContents();
+ if (!tab_contents)
+ return false;
+ WaitForNavigation(&tab_contents->controller());
+ return true;
+}
+
+bool WaitForNavigationsInCurrentTab(Browser* browser,
+ int number_of_navigations) {
+ TabContents* tab_contents = browser->GetSelectedTabContents();
+ if (!tab_contents)
+ return false;
+ WaitForNavigations(&tab_contents->controller(), number_of_navigations);
+ return true;
+}
+
void WaitForNavigation(NavigationController* controller) {
WaitForNavigations(controller, 1);
}
@@ -304,15 +321,6 @@ void NavigateToURLBlockUntilNavigationsComplete(Browser* browser,
WaitForNavigations(controller, number_of_navigations);
}
-bool ReloadCurrentTab(Browser* browser) {
- browser->Reload();
- TabContents* tab_contents = browser->GetSelectedTabContents();
- if (!tab_contents)
- return false;
- WaitForNavigation(&tab_contents->controller());
- return true;
-}
-
Value* ExecuteJavaScript(RenderViewHost* render_view_host,
const std::wstring& frame_xpath,
const std::wstring& original_script) {