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

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

Issue 10790087: [Web Intents] Localization of intent titles for CWS suggestions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to HEAD, adjust namespace/include Created 8 years, 4 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
« no previous file with comments | « chrome/common/extensions/extension_l10n_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/memory/linked_ptr.h" 7 #include "base/memory/linked_ptr.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 TEST(ExtensionL10nUtil, ShouldRelocalizeManifestDifferentCurrentLocale) { 610 TEST(ExtensionL10nUtil, ShouldRelocalizeManifestDifferentCurrentLocale) {
611 DictionaryValue manifest; 611 DictionaryValue manifest;
612 manifest.SetString(keys::kDefaultLocale, "en_US"); 612 manifest.SetString(keys::kDefaultLocale, "en_US");
613 manifest.SetString(keys::kCurrentLocale, "sr"); 613 manifest.SetString(keys::kCurrentLocale, "sr");
614 614
615 ExtensionInfo info(&manifest, "", FilePath(), Extension::LOAD); 615 ExtensionInfo info(&manifest, "", FilePath(), Extension::LOAD);
616 616
617 EXPECT_TRUE(extension_l10n_util::ShouldRelocalizeManifest(info)); 617 EXPECT_TRUE(extension_l10n_util::ShouldRelocalizeManifest(info));
618 } 618 }
619 619
620 TEST(ExtensionL10nUtil, GetAllFallbackLocales) {
621 std::vector<std::string> fallback_locales;
622 extension_l10n_util::GetAllFallbackLocales("en_US", "all", &fallback_locales);
623 ASSERT_EQ(3U, fallback_locales.size());
624
625 CHECK_EQ("en_US", fallback_locales[0]);
626 CHECK_EQ("en", fallback_locales[1]);
627 CHECK_EQ("all", fallback_locales[2]);
628 }
629
620 } // namespace 630 } // namespace
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_l10n_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698