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

Unified Diff: chrome/common/extensions/api/i18n/default_locale_manifest_unittest.cc

Issue 12025010: Move default_locale out of Extension class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extension_service_unittest fixed 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
« no previous file with comments | « chrome/common/extensions/api/i18n/default_locale_handler.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/i18n/default_locale_manifest_unittest.cc
diff --git a/chrome/common/extensions/api/i18n/default_locale_manifest_unittest.cc b/chrome/common/extensions/api/i18n/default_locale_manifest_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..645a3ff0ed9157228428422926e3288272813b9a
--- /dev/null
+++ b/chrome/common/extensions/api/i18n/default_locale_manifest_unittest.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/extensions/api/i18n/default_locale_handler.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 "testing/gtest/include/gtest/gtest.h"
+
+namespace extensions {
+
+class DefaultLocaleManifestTest : public ExtensionManifestTest {
+ virtual void SetUp() OVERRIDE {
+ ExtensionManifestTest::SetUp();
+ ManifestHandler::Register(keys::kDefaultLocale,
+ new DefaultLocaleHandler);
+ }
+};
+
+TEST_F(DefaultLocaleManifestTest, DefaultLocale) {
+ LoadAndExpectError("default_locale_invalid.json",
+ errors::kInvalidDefaultLocale);
+
+ scoped_refptr<Extension> extension(
+ LoadAndExpectSuccess("default_locale_valid.json"));
+ EXPECT_EQ("de-AT", LocaleInfo::GetDefaultLocale(extension));
+}
+
+} // namespace extensions
« no previous file with comments | « chrome/common/extensions/api/i18n/default_locale_handler.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698