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()); |
} |