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

Side by Side Diff: chrome/browser/locale_tests_uitest.cc

Issue 2836088: base: rename Environment::SetEnv to Environment::SetVar. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 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
« no previous file with comments | « base/xdg_util_unittest.cc ('k') | chrome/browser/shell_integration_unittest.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 class LocaleTestsBase : public UITest { 10 class LocaleTestsBase : public UITest {
11 public: 11 public:
12 LocaleTestsBase() : UITest(), old_lc_all_(NULL) { 12 LocaleTestsBase() : UITest(), old_lc_all_(NULL) {
13 } 13 }
14 14
15 protected: 15 protected:
16 void RestoreLcAllEnvironment() { 16 void RestoreLcAllEnvironment() {
17 #if defined(OS_LINUX) 17 #if defined(OS_LINUX)
18 scoped_ptr<base::Environment> env(base::Environment::Create()); 18 scoped_ptr<base::Environment> env(base::Environment::Create());
19 if (old_lc_all_) { 19 if (old_lc_all_) {
20 env->SetEnv("LC_ALL", old_lc_all_); 20 env->SetVar("LC_ALL", old_lc_all_);
21 } else { 21 } else {
22 env->UnSetVar("LC_ALL"); 22 env->UnSetVar("LC_ALL");
23 } 23 }
24 #endif 24 #endif
25 }; 25 };
26 26
27 const char* old_lc_all_; 27 const char* old_lc_all_;
28 }; 28 };
29 29
30 30
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 TEST_F(LocaleTestsHe, TestStart) { 72 TEST_F(LocaleTestsHe, TestStart) {
73 // Just making sure we can start/shutdown cleanly. 73 // Just making sure we can start/shutdown cleanly.
74 RestoreLcAllEnvironment(); 74 RestoreLcAllEnvironment();
75 } 75 }
76 76
77 TEST_F(LocaleTestsZhTw, TestStart) { 77 TEST_F(LocaleTestsZhTw, TestStart) {
78 // Just making sure we can start/shutdown cleanly. 78 // Just making sure we can start/shutdown cleanly.
79 RestoreLcAllEnvironment(); 79 RestoreLcAllEnvironment();
80 } 80 }
OLDNEW
« no previous file with comments | « base/xdg_util_unittest.cc ('k') | chrome/browser/shell_integration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698