OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/extensions/extension_l10n_util.h" | |
6 | |
7 #include "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
8 #include "base/file_path.h" | 6 #include "base/file_path.h" |
9 #include "base/file_util.h" | 7 #include "base/file_util.h" |
10 #include "base/path_service.h" | 8 #include "base/path_service.h" |
11 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
12 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
13 #include "base/values.h" | 11 #include "base/values.h" |
14 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
15 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
16 #include "chrome/common/extensions/extension_constants.h" | 14 #include "chrome/common/extensions/extension_constants.h" |
| 15 #include "chrome/common/extensions/extension_l10n_util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 namespace { | 18 namespace { |
20 | 19 |
21 TEST(Extensio8nL10nUtil, GetValidLocalesEmptyLocaleFolder) { | 20 TEST(Extensio8nL10nUtil, GetValidLocalesEmptyLocaleFolder) { |
22 ScopedTempDir temp; | 21 ScopedTempDir temp; |
23 ASSERT_TRUE(temp.CreateUniqueTempDir()); | 22 ASSERT_TRUE(temp.CreateUniqueTempDir()); |
24 | 23 |
25 FilePath src_path = temp.path().AppendASCII(Extension::kLocaleFolder); | 24 FilePath src_path = temp.path().AppendASCII(Extension::kLocaleFolder); |
26 ASSERT_TRUE(file_util::CreateDirectory(src_path)); | 25 ASSERT_TRUE(file_util::CreateDirectory(src_path)); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 222 |
224 for (size_t i = 0; i < locales.size(); ++i) { | 223 for (size_t i = 0; i < locales.size(); ++i) { |
225 FilePath tmp; | 224 FilePath tmp; |
226 tmp = tmp.AppendASCII(Extension::kLocaleFolder) | 225 tmp = tmp.AppendASCII(Extension::kLocaleFolder) |
227 .AppendASCII(locales[i]).AppendASCII("foo/bar.js"); | 226 .AppendASCII(locales[i]).AppendASCII("foo/bar.js"); |
228 EXPECT_TRUE(PathsAreEqual(tmp, l10n_paths[i])); | 227 EXPECT_TRUE(PathsAreEqual(tmp, l10n_paths[i])); |
229 } | 228 } |
230 } | 229 } |
231 | 230 |
232 } // namespace | 231 } // namespace |
OLD | NEW |