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

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

Issue 19547009: Move ".crx"/".pem" constants and extension_filenames constants into extensions/common/constants.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
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" 14 #include "chrome/common/extensions/extension_manifest_constants.h"
15 #include "chrome/common/extensions/message_bundle.h" 15 #include "chrome/common/extensions/message_bundle.h"
16 #include "extensions/common/constants.h" 16 #include "extensions/common/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::filenames::kLocaleFolder;
21 using extensions::kMessagesFilename; 21 using extensions::filenames::kMessagesFilename;
22 using extensions::MessageBundle; 22 using extensions::MessageBundle;
23 23
24 namespace errors = extension_manifest_errors; 24 namespace errors = extension_manifest_errors;
25 namespace keys = extension_manifest_keys; 25 namespace keys = extension_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());
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 std::vector<std::string> fallback_locales; 490 std::vector<std::string> fallback_locales;
491 extension_l10n_util::GetAllFallbackLocales("en_US", "all", &fallback_locales); 491 extension_l10n_util::GetAllFallbackLocales("en_US", "all", &fallback_locales);
492 ASSERT_EQ(3U, fallback_locales.size()); 492 ASSERT_EQ(3U, fallback_locales.size());
493 493
494 CHECK_EQ("en_US", fallback_locales[0]); 494 CHECK_EQ("en_US", fallback_locales[0]);
495 CHECK_EQ("en", fallback_locales[1]); 495 CHECK_EQ("en", fallback_locales[1]);
496 CHECK_EQ("all", fallback_locales[2]); 496 CHECK_EQ("all", fallback_locales[2]);
497 } 497 }
498 498
499 } // namespace 499 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698