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

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, 11 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 eb537a10cfd8c9861efaadbe663009ea1c5ff389..c27ac0a55a5a6efe8bd86fce748064d153e5347e 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
@@ -6,8 +6,10 @@
#include "base/path_service.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_paths.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"
@@ -19,11 +21,16 @@
namespace errors = extension_manifest_errors;
+namespace extensions {
+
class InitValueManifestTest : public ExtensionManifestTest {
+ protected:
virtual void SetUp() OVERRIDE {
ExtensionManifestTest::SetUp();
- extensions::ManifestHandler::Register(extension_manifest_keys::kOptionsPage,
- new extensions::OptionsPageHandler);
+ ManifestHandler::Register(extension_manifest_keys::kIcons,
+ new IconsHandler);
+ ManifestHandler::Register(extension_manifest_keys::kOptionsPage,
+ new OptionsPageHandler);
}
};
@@ -80,14 +87,14 @@ TEST_F(InitValueManifestTest, InitFromValueInvalid) {
}
TEST_F(InitValueManifestTest, InitFromValueValid) {
- scoped_refptr<extensions::Extension> extension(LoadAndExpectSuccess(
+ scoped_refptr<Extension> extension(LoadAndExpectSuccess(
"init_valid_minimal.json"));
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());
@@ -102,9 +109,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
@@ -142,7 +149,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)"));
@@ -163,3 +170,5 @@ TEST_F(InitValueManifestTest, InitFromValueValidNameInRTL) {
base::i18n::SetICUDefaultLocale(locale);
#endif
}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698