| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/linked_ptr.h" | 8 #include "base/linked_ptr.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "base/scoped_temp_dir.h" | 11 #include "base/scoped_temp_dir.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
| 14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
| 15 #include "chrome/common/extensions/extension_constants.h" | 15 #include "chrome/common/extensions/extension_constants.h" |
| 16 #include "chrome/common/extensions/extension_l10n_util.h" | 16 #include "chrome/common/extensions/extension_l10n_util.h" |
| 17 #include "chrome/common/extensions/extension_message_bundle.h" | 17 #include "chrome/common/extensions/extension_message_bundle.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "webkit/glue/resource_type.h" | |
| 20 | 19 |
| 21 namespace errors = extension_manifest_errors; | 20 namespace errors = extension_manifest_errors; |
| 22 namespace keys = extension_manifest_keys; | 21 namespace keys = extension_manifest_keys; |
| 23 | 22 |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 TEST(ExtensionL10nUtil, GetValidLocalesEmptyLocaleFolder) { | 25 TEST(ExtensionL10nUtil, GetValidLocalesEmptyLocaleFolder) { |
| 27 ScopedTempDir temp; | 26 ScopedTempDir temp; |
| 28 ASSERT_TRUE(temp.CreateUniqueTempDir()); | 27 ASSERT_TRUE(temp.CreateUniqueTempDir()); |
| 29 | 28 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 DictionaryValue manifest; | 400 DictionaryValue manifest; |
| 402 manifest.SetString(keys::kDefaultLocale, "en_US"); | 401 manifest.SetString(keys::kDefaultLocale, "en_US"); |
| 403 manifest.SetString(keys::kCurrentLocale, "sr"); | 402 manifest.SetString(keys::kCurrentLocale, "sr"); |
| 404 | 403 |
| 405 ExtensionInfo info(&manifest, "", FilePath(), Extension::LOAD); | 404 ExtensionInfo info(&manifest, "", FilePath(), Extension::LOAD); |
| 406 | 405 |
| 407 EXPECT_TRUE(extension_l10n_util::ShouldRelocalizeManifest(info)); | 406 EXPECT_TRUE(extension_l10n_util::ShouldRelocalizeManifest(info)); |
| 408 } | 407 } |
| 409 | 408 |
| 410 } // namespace | 409 } // namespace |
| OLD | NEW |