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

Side by Side Diff: chrome/common/extensions/extension_l10n_util_unittest.cc

Issue 23744004: Move the rest of extension_manifest_constants to top-level extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 7 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/common/chrome_paths.h" 12 #include "chrome/common/chrome_paths.h"
13 #include "chrome/common/extensions/extension_l10n_util.h" 13 #include "chrome/common/extensions/extension_l10n_util.h"
14 #include "chrome/common/extensions/extension_manifest_constants.h"
15 #include "chrome/common/extensions/message_bundle.h" 14 #include "chrome/common/extensions/message_bundle.h"
16 #include "extensions/common/constants.h" 15 #include "extensions/common/constants.h"
16 #include "extensions/common/manifest_constants.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 19
20 using extensions::kLocaleFolder; 20 using extensions::kLocaleFolder;
21 using extensions::kMessagesFilename; 21 using extensions::kMessagesFilename;
22 using extensions::MessageBundle; 22 using extensions::MessageBundle;
23 23
24 namespace errors = extension_manifest_errors; 24 namespace errors = extensions::manifest_errors;
25 namespace keys = extensions::manifest_keys; 25 namespace keys = extensions::manifest_keys;
26 26
27 namespace { 27 namespace {
28 28
29 TEST(ExtensionL10nUtil, GetValidLocalesEmptyLocaleFolder) { 29 TEST(ExtensionL10nUtil, GetValidLocalesEmptyLocaleFolder) {
30 base::ScopedTempDir temp; 30 base::ScopedTempDir temp;
31 ASSERT_TRUE(temp.CreateUniqueTempDir()); 31 ASSERT_TRUE(temp.CreateUniqueTempDir());
32 32
33 base::FilePath src_path = temp.path().Append(kLocaleFolder); 33 base::FilePath src_path = temp.path().Append(kLocaleFolder);
34 ASSERT_TRUE(file_util::CreateDirectory(src_path)); 34 ASSERT_TRUE(file_util::CreateDirectory(src_path));
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 std::vector<std::string> fallback_locales; 542 std::vector<std::string> fallback_locales;
543 extension_l10n_util::GetAllFallbackLocales("en_US", "all", &fallback_locales); 543 extension_l10n_util::GetAllFallbackLocales("en_US", "all", &fallback_locales);
544 ASSERT_EQ(3U, fallback_locales.size()); 544 ASSERT_EQ(3U, fallback_locales.size());
545 545
546 CHECK_EQ("en_US", fallback_locales[0]); 546 CHECK_EQ("en_US", fallback_locales[0]);
547 CHECK_EQ("en", fallback_locales[1]); 547 CHECK_EQ("en", fallback_locales[1]);
548 CHECK_EQ("all", fallback_locales[2]); 548 CHECK_EQ("all", fallback_locales[2]);
549 } 549 }
550 550
551 } // namespace 551 } // namespace
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_l10n_util.cc ('k') | chrome/common/extensions/extension_manifest_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698