OLD | NEW |
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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/environment.h" | 6 #include "base/environment.h" |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/test/base/in_process_browser_test.h" | 8 #include "chrome/test/base/in_process_browser_test.h" |
9 #include "ui/base/ui_base_switches.h" | 9 #include "ui/base/ui_base_switches.h" |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } else { | 48 } else { |
49 env->UnSetVar("LC_ALL"); | 49 env->UnSetVar("LC_ALL"); |
50 } | 50 } |
51 #endif | 51 #endif |
52 } | 52 } |
53 | 53 |
54 const std::string& locale() { return locale_; } | 54 const std::string& locale() { return locale_; } |
55 | 55 |
56 private: | 56 private: |
57 std::string locale_; | 57 std::string locale_; |
| 58 #if defined(OS_LINUX) |
58 const char* old_locale_; | 59 const char* old_locale_; |
| 60 #endif |
59 }; | 61 }; |
60 | 62 |
61 // A base class for tests used in this file. This class over-writes the system | 63 // A base class for tests used in this file. This class over-writes the system |
62 // locale and run Chrome with a '--lang' option. To add a new LocaleTest, add a | 64 // locale and run Chrome with a '--lang' option. To add a new LocaleTest, add a |
63 // class derived from this class and call the constructor with the locale name | 65 // class derived from this class and call the constructor with the locale name |
64 // used by Chrome. | 66 // used by Chrome. |
65 class LocaleTestBase : public InProcessBrowserTest { | 67 class LocaleTestBase : public InProcessBrowserTest { |
66 public: | 68 public: |
67 explicit LocaleTestBase(const char* locale) : locale_(locale) { | 69 explicit LocaleTestBase(const char* locale) : locale_(locale) { |
68 } | 70 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // code here because they just verify we can start Chrome and shut it down | 104 // code here because they just verify we can start Chrome and shut it down |
103 // cleanly on these locales. | 105 // cleanly on these locales. |
104 IN_PROC_BROWSER_TEST_F(LocaleTestDanish, TestStart) { | 106 IN_PROC_BROWSER_TEST_F(LocaleTestDanish, TestStart) { |
105 } | 107 } |
106 | 108 |
107 IN_PROC_BROWSER_TEST_F(LocaleTestHebrew, TestStart) { | 109 IN_PROC_BROWSER_TEST_F(LocaleTestHebrew, TestStart) { |
108 } | 110 } |
109 | 111 |
110 IN_PROC_BROWSER_TEST_F(LocaleTestTraditionalChinese, TestStart) { | 112 IN_PROC_BROWSER_TEST_F(LocaleTestTraditionalChinese, TestStart) { |
111 } | 113 } |
OLD | NEW |