Chromium Code Reviews| Index: chrome/common/extensions/manifest_tests/extension_manifests_default_locale_unittest.cc |
| diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_default_locale_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_default_locale_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5c872cab6549662c76e9829898e46f0f47d13a8d |
| --- /dev/null |
| +++ b/chrome/common/extensions/manifest_tests/extension_manifests_default_locale_unittest.cc |
| @@ -0,0 +1,26 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
|
Devlin
2013/01/18 21:08:46
This file should be with the handler. To keep with
Joe Thomas
2013/01/18 22:16:57
Done.
|
| +// 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" |
| + |
| +class DefaultLocaleManifestTest : public ExtensionManifestTest { |
| + virtual void SetUp() OVERRIDE { |
| + ExtensionManifestTest::SetUp(); |
| + extensions::ManifestHandler::Register(keys::kDefaultLocale, |
|
Devlin
2013/01/18 21:08:46
This whole file should probably be in the extensio
Joe Thomas
2013/01/18 22:16:57
Done.
|
| + new extensions::DefaultLocaleHandler); |
| + } |
| +}; |
| + |
| +TEST_F(DefaultLocaleManifestTest, DefaultLocale) { |
| + LoadAndExpectError("default_locale_invalid.json", |
| + errors::kInvalidDefaultLocale); |
| + |
| + scoped_refptr<extensions::Extension> extension( |
| + LoadAndExpectSuccess("default_locale_valid.json")); |
| + EXPECT_EQ("de-AT", extensions::LocaleInfo::GetDefaultLocale(extension)); |
| +} |