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

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

Issue 11724002: Move ContentScripts out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Latest master for CQ 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_ui_unittest.cc
diff --git a/chrome/browser/extensions/extension_ui_unittest.cc b/chrome/browser/extensions/extension_ui_unittest.cc
index 5623429e8d434609faae70362031aec836c85760..a6235061a8e0c6c48d8de174bfbfa9c282fb16e2 100644
--- a/chrome/browser/extensions/extension_ui_unittest.cc
+++ b/chrome/browser/extensions/extension_ui_unittest.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/manifest_handler.h"
+#include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread.h"
#include "extensions/common/constants.h"
@@ -29,6 +31,8 @@ class ExtensionUITest : public testing::Test {
protected:
virtual void SetUp() OVERRIDE {
+ testing::Test::SetUp();
+
// Create an ExtensionService and ManagementPolicy to inject into the
// ExtensionSettingsHandler.
profile_.reset(new TestingProfile());
@@ -41,6 +45,8 @@ class ExtensionUITest : public testing::Test {
handler_.reset(new ExtensionSettingsHandler(extension_service_,
management_policy_));
+
+ (new extensions::ContentScriptsHandler)->Register();
}
virtual void TearDown() OVERRIDE {
@@ -48,6 +54,8 @@ class ExtensionUITest : public testing::Test {
profile_.reset();
// Execute any pending deletion tasks.
message_loop_.RunUntilIdle();
+ extensions::ManifestHandler::ClearRegistryForTesting();
+ testing::Test::TearDown();
}
static DictionaryValue* DeserializeJSONTestData(const base::FilePath& path,
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/user_script_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698