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

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

Issue 11819050: Revert 175890: actually, looks like we want this to also help move chromeos webui pages out of src/… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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: chrome/test/base/chrome_test_suite.cc
===================================================================
--- chrome/test/base/chrome_test_suite.cc (revision 175970)
+++ chrome/test/base/chrome_test_suite.cc (working copy)
@@ -19,11 +19,13 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_content_browser_client.h"
+#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_browser_process.h"
+#include "content/public/test/test_launcher.h"
#include "net/base/mock_host_resolver.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
@@ -211,6 +213,16 @@
PathService::Override(base::DIR_MODULE, browser_dir_);
}
+#if !defined(OS_IOS)
+ if (!content::GetCurrentTestLauncherDelegate()) {
+ // Only want to do this for unit tests. For browser tests, this won't create
+ // the right object since TestChromeWebUIControllerFactory is used. That's
+ // created and registered in ChromeBrowserMainParts as in normal startup.
+ content::WebUIControllerFactory::RegisterFactory(
+ ChromeWebUIControllerFactory::GetInstance());
+ }
+#endif
+
// Disable external libraries load if we are under python process in
// ChromeOS. That means we are autotest and, if ASAN is used,
// external libraries load crashes.
« no previous file with comments | « chrome/common/chrome_content_client_ios.mm ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698