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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc

Issue 11786003: Move Icons out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Created 7 years, 10 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/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
index 656dd0f2c65e7856ced485e6f80a2301700f70dc..1efc029c57d4aff5cde043a6e46b86e3844af740 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
@@ -8,8 +8,10 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/api/extension_action/page_action_handler.h"
#include "chrome/common/extensions/api/i18n/default_locale_handler.h"
+#include "chrome/common/extensions/api/icons/icons_handler.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/manifest_handler.h"
#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
#include "chrome/common/extensions/manifest_url_handler.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,9 +24,14 @@
namespace errors = extension_manifest_errors;
namespace keys = extension_manifest_keys;
+namespace extensions {
+
class InitValueManifestTest : public ExtensionManifestTest {
+ protected:
virtual void SetUp() OVERRIDE {
ExtensionManifestTest::SetUp();
+ ManifestHandler::Register(extension_manifest_keys::kIcons,
+ make_linked_ptr(new IconsHandler));
extensions::ManifestHandler::Register(
keys::kOptionsPage,
make_linked_ptr(new extensions::OptionsPageHandler));
@@ -92,14 +99,14 @@ TEST_F(InitValueManifestTest, InitFromValueInvalid) {
}
TEST_F(InitValueManifestTest, InitFromValueValid) {
- scoped_refptr<extensions::Extension> extension(LoadAndExpectSuccess(
+ scoped_refptr<Extension> extension(LoadAndExpectSuccess(
"init_valid_minimal.json"));
base::FilePath path;
PathService::Get(chrome::DIR_TEST_DATA, &path);
path = path.AppendASCII("extensions");
- EXPECT_TRUE(extensions::Extension::IdIsValid(extension->id()));
+ EXPECT_TRUE(Extension::IdIsValid(extension->id()));
EXPECT_EQ("1.0.0.0", extension->VersionString());
EXPECT_EQ("my extension", extension->name());
EXPECT_EQ(extension->id(), extension->url().host());
@@ -114,9 +121,9 @@ TEST_F(InitValueManifestTest, InitFromValueValid) {
// Test with an options page.
extension = LoadAndExpectSuccess("init_valid_options.json");
EXPECT_EQ("chrome-extension",
- extensions::ManifestURL::GetOptionsPage(extension).scheme());
+ ManifestURL::GetOptionsPage(extension).scheme());
EXPECT_EQ("/options.html",
- extensions::ManifestURL::GetOptionsPage(extension).path());
+ ManifestURL::GetOptionsPage(extension).path());
Testcase testcases[] = {
// Test that an empty list of page actions does not stop a browser action
@@ -154,7 +161,7 @@ TEST_F(InitValueManifestTest, InitFromValueValidNameInRTL) {
#endif
// No strong RTL characters in name.
- scoped_refptr<extensions::Extension> extension(LoadAndExpectSuccess(
+ scoped_refptr<Extension> extension(LoadAndExpectSuccess(
"init_valid_name_no_rtl.json"));
string16 localized_name(ASCIIToUTF16("Dictionary (by Google)"));
@@ -175,3 +182,5 @@ TEST_F(InitValueManifestTest, InitFromValueValidNameInRTL) {
base::i18n::SetICUDefaultLocale(locale);
#endif
}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698