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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // 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 |
64 // 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 |
65 // 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 |
66 // used by Chrome. | 66 // used by Chrome. |
67 class LocaleTestBase : public InProcessBrowserTest { | 67 class LocaleTestBase : public InProcessBrowserTest { |
68 public: | 68 public: |
69 explicit LocaleTestBase(const char* locale) : locale_(locale) { | 69 explicit LocaleTestBase(const char* locale) : locale_(locale) { |
70 } | 70 } |
71 | 71 |
72 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 72 virtual void SetUpCommandLine(CommandLine* command_line) override { |
73 command_line->AppendSwitchASCII(switches::kLang, locale_.locale()); | 73 command_line->AppendSwitchASCII(switches::kLang, locale_.locale()); |
74 } | 74 } |
75 | 75 |
76 protected: | 76 protected: |
77 ScopedLocale locale_; | 77 ScopedLocale locale_; |
78 }; | 78 }; |
79 | 79 |
80 // Test classes that run Chrome on the Danish locale, the Hebrew locale, and | 80 // Test classes that run Chrome on the Danish locale, the Hebrew locale, and |
81 // the Traditional-Chinese locale, respectively. | 81 // the Traditional-Chinese locale, respectively. |
82 class LocaleTestDanish : public LocaleTestBase { | 82 class LocaleTestDanish : public LocaleTestBase { |
(...skipping 21 matching lines...) Expand all Loading... |
104 // 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 |
105 // cleanly on these locales. | 105 // cleanly on these locales. |
106 IN_PROC_BROWSER_TEST_F(LocaleTestDanish, TestStart) { | 106 IN_PROC_BROWSER_TEST_F(LocaleTestDanish, TestStart) { |
107 } | 107 } |
108 | 108 |
109 IN_PROC_BROWSER_TEST_F(LocaleTestHebrew, TestStart) { | 109 IN_PROC_BROWSER_TEST_F(LocaleTestHebrew, TestStart) { |
110 } | 110 } |
111 | 111 |
112 IN_PROC_BROWSER_TEST_F(LocaleTestTraditionalChinese, TestStart) { | 112 IN_PROC_BROWSER_TEST_F(LocaleTestTraditionalChinese, TestStart) { |
113 } | 113 } |
OLD | NEW |