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

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

Issue 270062: Use ASCII strings for switch names. (Closed)
Patch Set: victory Created 11 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 class LocaleTestsBase : public UITest { 9 class LocaleTestsBase : public UITest {
10 public: 10 public:
(...skipping 11 matching lines...) Expand all
22 #endif 22 #endif
23 }; 23 };
24 24
25 const char* old_lc_all_; 25 const char* old_lc_all_;
26 }; 26 };
27 27
28 28
29 class LocaleTestsDa : public LocaleTestsBase { 29 class LocaleTestsDa : public LocaleTestsBase {
30 public: 30 public:
31 LocaleTestsDa() : LocaleTestsBase() { 31 LocaleTestsDa() : LocaleTestsBase() {
32 launch_arguments_.AppendSwitchWithValue(L"lang", L"da"); 32 launch_arguments_.AppendSwitchWithValue("lang", "da");
33 33
34 // Linux doesn't use --lang, it only uses environment variables to set the 34 // Linux doesn't use --lang, it only uses environment variables to set the
35 // language. 35 // language.
36 #if defined(OS_LINUX) 36 #if defined(OS_LINUX)
37 old_lc_all_ = getenv("LC_ALL"); 37 old_lc_all_ = getenv("LC_ALL");
38 setenv("LC_ALL", "da_DK.UTF-8", 1); 38 setenv("LC_ALL", "da_DK.UTF-8", 1);
39 #endif 39 #endif
40 } 40 }
41 }; 41 };
42 42
43 class LocaleTestsHe : public LocaleTestsBase { 43 class LocaleTestsHe : public LocaleTestsBase {
44 public: 44 public:
45 LocaleTestsHe() : LocaleTestsBase() { 45 LocaleTestsHe() : LocaleTestsBase() {
46 launch_arguments_.AppendSwitchWithValue(L"lang", L"he"); 46 launch_arguments_.AppendSwitchWithValue("lang", "he");
47 #if defined(OS_LINUX) 47 #if defined(OS_LINUX)
48 old_lc_all_ = getenv("LC_ALL"); 48 old_lc_all_ = getenv("LC_ALL");
49 setenv("LC_ALL", "he_IL.UTF-8", 1); 49 setenv("LC_ALL", "he_IL.UTF-8", 1);
50 #endif 50 #endif
51 } 51 }
52 }; 52 };
53 53
54 class LocaleTestsZhTw : public LocaleTestsBase { 54 class LocaleTestsZhTw : public LocaleTestsBase {
55 public: 55 public:
56 LocaleTestsZhTw() : LocaleTestsBase() { 56 LocaleTestsZhTw() : LocaleTestsBase() {
57 launch_arguments_.AppendSwitchWithValue(L"lang", L"zh-TW"); 57 launch_arguments_.AppendSwitchWithValue("lang", "zh-TW");
58 #if defined(OS_LINUX) 58 #if defined(OS_LINUX)
59 old_lc_all_ = getenv("LC_ALL"); 59 old_lc_all_ = getenv("LC_ALL");
60 setenv("LC_ALL", "zh_TW.UTF-8", 1); 60 setenv("LC_ALL", "zh_TW.UTF-8", 1);
61 #endif 61 #endif
62 } 62 }
63 }; 63 };
64 64
65 #if defined(OS_WIN) || defined(OS_LINUX) 65 #if defined(OS_WIN) || defined(OS_LINUX)
66 // These 3 tests started failing between revisions 13115 and 13120. 66 // These 3 tests started failing between revisions 13115 and 13120.
67 // See bug 9758. 67 // See bug 9758.
68 TEST_F(LocaleTestsDa, TestStart) { 68 TEST_F(LocaleTestsDa, TestStart) {
69 // Just making sure we can start/shutdown cleanly. 69 // Just making sure we can start/shutdown cleanly.
70 RestoreLcAllEnvironment(); 70 RestoreLcAllEnvironment();
71 } 71 }
72 72
73 TEST_F(LocaleTestsHe, TestStart) { 73 TEST_F(LocaleTestsHe, TestStart) {
74 // Just making sure we can start/shutdown cleanly. 74 // Just making sure we can start/shutdown cleanly.
75 RestoreLcAllEnvironment(); 75 RestoreLcAllEnvironment();
76 } 76 }
77 77
78 TEST_F(LocaleTestsZhTw, TestStart) { 78 TEST_F(LocaleTestsZhTw, TestStart) {
79 // Just making sure we can start/shutdown cleanly. 79 // Just making sure we can start/shutdown cleanly.
80 RestoreLcAllEnvironment(); 80 RestoreLcAllEnvironment();
81 } 81 }
82 #endif 82 #endif
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox_importer_unittest_utils_mac.cc ('k') | chrome/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698