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

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

Issue 14694010: Consolidate manifest handler registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/renderer/chrome_content_renderer_client.cc ('k') | chrome/utility/chrome_content_utility_client.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 24313a52eab54ab345b5abc9bb010b81410da7ea..9a8581030988dd7da55202d8b346355909a01b60 100644
--- a/chrome/test/base/chrome_test_suite.cc
+++ b/chrome/test/base/chrome_test_suite.cc
@@ -23,6 +23,8 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/extensions/chrome_manifest_handlers.h"
+#include "chrome/common/extensions/permissions/chrome_api_permissions.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_browser_process.h"
#include "content/public/test/test_launcher.h"
@@ -226,10 +228,15 @@ void ChromeTestSuite::Initialize() {
#if !defined(OS_IOS)
extensions::RegisterPathProvider();
+ // Only want to do this for unit tests.
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.
+ extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate(
+ extensions::ChromeAPIPermissions());
+ extensions::RegisterChromeManifestHandlers();
+
+ // 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());
}
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698