| Index: content/test/content_browser_test_utils.cc
|
| ===================================================================
|
| --- content/test/content_browser_test_utils.cc (revision 148472)
|
| +++ content/test/content_browser_test_utils.cc (working copy)
|
| @@ -12,6 +12,7 @@
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/content_paths.h"
|
| +#include "content/public/test/browser_test_utils.h"
|
| #include "content/public/test/test_navigation_observer.h"
|
| #include "content/public/test/test_utils.h"
|
| #include "content/shell/shell.h"
|
| @@ -31,12 +32,15 @@
|
| return net::FilePathToFileURL(GetTestFilePath(dir, file));
|
| }
|
|
|
| -void NavigateToURL(Shell* window, const GURL& url) {
|
| +void NavigateToURLBlockUntilNavigationsComplete(Shell* window,
|
| + const GURL& url,
|
| + int number_of_navigations) {
|
| + WaitForLoadStop(window->web_contents());
|
| NavigationController* controller = &window->web_contents()->GetController();
|
| TestNavigationObserver same_tab_observer(
|
| Source<NavigationController>(controller),
|
| NULL,
|
| - 1);
|
| + number_of_navigations);
|
|
|
| window->LoadURL(url);
|
|
|
| @@ -46,6 +50,10 @@
|
| GetQuitTaskForRunLoop(&run_loop));
|
| }
|
|
|
| +void NavigateToURL(Shell* window, const GURL& url) {
|
| + NavigateToURLBlockUntilNavigationsComplete(window, url, 1);
|
| +}
|
| +
|
| void WaitForAppModalDialog(Shell* window) {
|
| ShellJavaScriptDialogCreator* dialog_creator =
|
| static_cast<ShellJavaScriptDialogCreator*>(
|
|
|