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

Unified Diff: chrome/browser/intents/cws_intents_registry_unittest.cc

Issue 10837130: Set locale for extension tests, keep it from affecting global state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/intents/cws_intents_registry_unittest.cc
diff --git a/chrome/browser/intents/cws_intents_registry_unittest.cc b/chrome/browser/intents/cws_intents_registry_unittest.cc
index 65d5d09712317b401fd7dded8f95a9ad04d5323b..729cf2c545f05d2ebd62803878c7dcff03237d9b 100644
--- a/chrome/browser/intents/cws_intents_registry_unittest.cc
+++ b/chrome/browser/intents/cws_intents_registry_unittest.cc
@@ -151,13 +151,6 @@ const char kValidManifest[] =
const char kEditAction[] = "http://webintents.org/edit";
const char kImagePngType[] = "image/png";
-class ScopedLocale {
- public:
- ScopedLocale() : locale_(extension_l10n_util::CurrentLocaleOrDefault()) {}
- ~ScopedLocale() { extension_l10n_util::SetProcessLocale(locale_); }
- std::string locale_;
-};
-
class CWSIntentsRegistryTest : public testing::Test {
public:
virtual void SetUp() {
@@ -241,7 +234,7 @@ TEST_F(CWSIntentsRegistryTest, BuildQueryURL) {
// registry will use locale_data for "en" key, with or without "all"
// locale_data present.
TEST_F(CWSIntentsRegistryTest, LocalizeMatchingLocale) {
- ScopedLocale restoreLocaleOnExit;
+ extension_l10n_util::ScopedLocaleForTest restoreLocaleOnExit;
std::string response = kCWSResponseValidL10n;
response += kLocaleDataEn + std::string(",");
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/common/extensions/extension_l10n_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698