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

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: 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 64f5d65c378f9313d1fec05cceca6cc1af142577..2833008387baadfd6eccbaa741dd0a0915eb39eb 100644
--- a/chrome/browser/extensions/extension_ui_unittest.cc
+++ b/chrome/browser/extensions/extension_ui_unittest.cc
@@ -12,7 +12,9 @@
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/extensions/api/content_scripts/content_scripts_handler.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/manifest_handler.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -28,6 +30,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());
@@ -40,6 +44,8 @@ class ExtensionUITest : public testing::Test {
handler_.reset(new ExtensionSettingsHandler(extension_service_,
management_policy_));
+
+ (new extensions::ContentScriptsHandler)->Register();
}
virtual void TearDown() OVERRIDE {
@@ -47,6 +53,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,

Powered by Google App Engine
This is Rietveld 408576698