Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3011)

Unified Diff: content/test/content_browser_test_utils.cc

Issue 10831023: Move over a bunch of tests from browser_tests to content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/content_browser_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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*>(
« no previous file with comments | « content/test/content_browser_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698