Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // 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.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" | |
| 6 #include "chrome/common/extensions/extension_manifest_constants.h" | |
| 7 #include "chrome/common/extensions/manifest_handler.h" | |
| 8 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | |
| 10 | |
| 11 class DefaultLocaleManifestTest : public ExtensionManifestTest { | |
| 12 virtual void SetUp() OVERRIDE { | |
| 13 ExtensionManifestTest::SetUp(); | |
| 14 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.
| |
| 15 new extensions::DefaultLocaleHandler); | |
| 16 } | |
| 17 }; | |
| 18 | |
| 19 TEST_F(DefaultLocaleManifestTest, DefaultLocale) { | |
| 20 LoadAndExpectError("default_locale_invalid.json", | |
| 21 errors::kInvalidDefaultLocale); | |
| 22 | |
| 23 scoped_refptr<extensions::Extension> extension( | |
| 24 LoadAndExpectSuccess("default_locale_valid.json")); | |
| 25 EXPECT_EQ("de-AT", extensions::LocaleInfo::GetDefaultLocale(extension)); | |
| 26 } | |
| OLD | NEW |