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

Unified Diff: content/test/content_browser_test.cc

Issue 10820007: Move all the layout tests that ran under browser_tests to run under content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac 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
Index: content/test/content_browser_test.cc
===================================================================
--- content/test/content_browser_test.cc (revision 148205)
+++ content/test/content_browser_test.cc (working copy)
@@ -12,7 +12,10 @@
#include "base/path_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/url_constants.h"
#include "content/shell/shell.h"
+#include "content/shell/shell_browser_context.h"
+#include "content/shell/shell_content_browser_client.h"
#include "content/shell/shell_main_delegate.h"
#include "content/shell/shell_switches.h"
#include "content/test/test_content_client.h"
@@ -33,6 +36,7 @@
FILE_PATH_LITERAL("Content Shell.app/Contents/MacOS/Content Shell"));
CHECK(PathService::Override(base::FILE_EXE, content_shell_path));
#endif
+ CreateTestServer("content/test/data");
}
ContentBrowserTest::~ContentBrowserTest() {
@@ -117,4 +121,26 @@
}
}
+Shell* ContentBrowserTest::CreateBrowser() {
+ ShellContentBrowserClient* browser_client =
+ static_cast<ShellContentBrowserClient*>(GetContentClient()->browser());
+ return Shell::CreateNewWindow(
+ browser_client->browser_context(),
+ GURL(chrome::kAboutBlankURL),
+ NULL,
+ MSG_ROUTING_NONE,
+ NULL);
+}
+
+Shell* ContentBrowserTest::CreateOffTheRecordBrowser() {
+ ShellContentBrowserClient* browser_client =
+ static_cast<ShellContentBrowserClient*>(GetContentClient()->browser());
+ return Shell::CreateNewWindow(
+ browser_client->off_the_record_browser_context(),
+ GURL(chrome::kAboutBlankURL),
+ NULL,
+ MSG_ROUTING_NONE,
+ NULL);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698