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

Unified Diff: chrome/test/base/chrome_test_suite.cc

Issue 10383298: Move RegisterContentSchemes from public url_constants into non-public url_schemes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: allow content/common/savable_url_schemes.h to be included by url_constants.cc Created 8 years, 7 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 | « chrome/test/base/chrome_test_suite.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/chrome_test_suite.cc
diff --git a/chrome/test/base/chrome_test_suite.cc b/chrome/test/base/chrome_test_suite.cc
index 3795306dc763bdb6b4256a96e070cee4dcd8f0bb..cdda117699ff4f1d5f16a978a308be6ceffbdcc1 100644
--- a/chrome/test/base/chrome_test_suite.cc
+++ b/chrome/test/base/chrome_test_suite.cc
@@ -19,14 +19,12 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_browser_process.h"
-#include "content/public/common/content_paths.h"
#include "net/base/mock_host_resolver.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/resource/resource_handle.h"
-#include "ui/base/ui_base_paths.h"
#if defined(OS_MACOSX)
#include "base/mac/bundle_locations.h"
@@ -39,8 +37,6 @@
#include "base/shared_memory.h"
#endif
-#include "ui/compositor/compositor_setup.h"
-
namespace {
void RemoveSharedMemoryFile(const std::string& filename) {
@@ -157,7 +153,7 @@ class ChromeTestSuiteInitializer : public testing::EmptyTestEventListener {
const char ChromeTestSuite::kLaunchAsBrowser[] = "as-browser";
ChromeTestSuite::ChromeTestSuite(int argc, char** argv)
- : base::TestSuite(argc, argv) {
+ : content::ContentTestSuiteBase(argc, argv) {
}
ChromeTestSuite::~ChromeTestSuite() {
@@ -169,16 +165,9 @@ void ChromeTestSuite::Initialize() {
chrome_browser_application_mac::RegisterBrowserCrApp();
#endif
- base::TestSuite::Initialize();
-
- chrome::ChromeContentClient client_for_init;
- content::SetContentClient(&client_for_init);
- content::RegisterContentSchemes(false);
- content::SetContentClient(NULL);
+ content::ContentTestSuiteBase::Initialize();
chrome::RegisterPathProvider();
- content::RegisterPathProvider();
- ui::RegisterPathProvider();
if (!browser_dir_.empty()) {
PathService::Override(base::DIR_EXE, browser_dir_);
@@ -203,9 +192,6 @@ void ChromeTestSuite::Initialize() {
ResourceBundle::GetSharedInstance().AddDataPack(
resources_pack_path, ui::SCALE_FACTOR_100P);
- // Mock out the compositor on platforms that use it.
- ui::SetupTestCompositor();
-
stats_filename_ = base::StringPrintf("unit_tests-%d",
base::GetCurrentProcId());
RemoveSharedMemoryFile(stats_filename_);
@@ -217,6 +203,10 @@ void ChromeTestSuite::Initialize() {
listeners.Append(new ChromeTestSuiteInitializer);
}
+content::ContentClient* ChromeTestSuite::CreateClientForInitialization() {
+ return new chrome::ChromeContentClient();
+}
+
void ChromeTestSuite::Shutdown() {
ResourceBundle::CleanupSharedInstance();
« no previous file with comments | « chrome/test/base/chrome_test_suite.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698