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

Unified Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 12494028: Move Requirements out of Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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/browser/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 9a08f1a7121679bb429f8d93b12b38df6afca513..20adce35c338024d22248e10621e60bebfcdc287 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -33,6 +33,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/extensions/api/requirements/requirements_handler.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/manifest_handler.h"
@@ -108,6 +109,15 @@ void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) {
void ExtensionBrowserTest::SetUpOnMainThread() {
InProcessBrowserTest::SetUpOnMainThread();
+ // We need to register tbe Requirements handler here because many tests like
+ // this install extensions with CrxInstallers, which need access to
+ // requirements for verification.
+ (new extensions::RequirementsHandler)->Register();
+}
+
+void ExtensionBrowserTest::CleanUpOnMainThread() {
+ extensions::ManifestHandler::ClearRegistryForTesting();
+ InProcessBrowserTest::SetUpOnMainThread();
Yoyo Zhou 2013/03/20 22:41:36 Should be CleanUp (but I don't think you need this
}
const Extension* ExtensionBrowserTest::LoadExtensionWithFlags(

Powered by Google App Engine
This is Rietveld 408576698