OLD | NEW |
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 #ifndef CHROME_TEST_UI_UI_TEST_SUITE_H_ | 5 #ifndef CHROME_TEST_UI_UI_TEST_SUITE_H_ |
6 #define CHROME_TEST_UI_UI_TEST_SUITE_H_ | 6 #define CHROME_TEST_UI_UI_TEST_SUITE_H_ |
7 | 7 |
8 #include "chrome/test/ui/ui_test.h" | 8 #include "chrome/test/ui/ui_test.h" |
9 #include "chrome/test/unit/chrome_test_suite.h" | 9 #include "chrome/test/unit/chrome_test_suite.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 parsed_command_line.HasSwitch(switches::kDumpHistogramsOnExit)); | 35 parsed_command_line.HasSwitch(switches::kDumpHistogramsOnExit)); |
36 UITest::set_enable_dcheck( | 36 UITest::set_enable_dcheck( |
37 parsed_command_line.HasSwitch(switches::kEnableDCHECK)); | 37 parsed_command_line.HasSwitch(switches::kEnableDCHECK)); |
38 UITest::set_silent_dump_on_dcheck( | 38 UITest::set_silent_dump_on_dcheck( |
39 parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK)); | 39 parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK)); |
40 UITest::set_disable_breakpad( | 40 UITest::set_disable_breakpad( |
41 parsed_command_line.HasSwitch(switches::kDisableBreakpad)); | 41 parsed_command_line.HasSwitch(switches::kDisableBreakpad)); |
42 std::wstring test_timeout = | 42 std::wstring test_timeout = |
43 parsed_command_line.GetSwitchValue(UITestSuite::kTestTimeout); | 43 parsed_command_line.GetSwitchValue(UITestSuite::kTestTimeout); |
44 if (!test_timeout.empty()) { | 44 if (!test_timeout.empty()) { |
45 UITest::set_test_timeout_ms(StringToInt(test_timeout)); | 45 UITest::set_test_timeout_ms(StringToInt(WideToUTF16Hack(test_timeout))); |
46 } | 46 } |
47 std::wstring js_flags = | 47 std::wstring js_flags = |
48 parsed_command_line.GetSwitchValue(switches::kJavaScriptFlags); | 48 parsed_command_line.GetSwitchValue(switches::kJavaScriptFlags); |
49 if (!js_flags.empty()) { | 49 if (!js_flags.empty()) { |
50 UITest::set_js_flags(js_flags); | 50 UITest::set_js_flags(js_flags); |
51 } | 51 } |
52 std::wstring log_level = | 52 std::wstring log_level = |
53 parsed_command_line.GetSwitchValue(switches::kLoggingLevel); | 53 parsed_command_line.GetSwitchValue(switches::kLoggingLevel); |
54 if (!log_level.empty()) { | 54 if (!log_level.empty()) { |
55 UITest::set_log_level(log_level); | 55 UITest::set_log_level(log_level); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 virtual void SuppressErrorDialogs() { | 59 virtual void SuppressErrorDialogs() { |
60 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
61 TestSuite::SuppressErrorDialogs(); | 61 TestSuite::SuppressErrorDialogs(); |
62 #endif | 62 #endif |
63 UITest::set_show_error_dialogs(false); | 63 UITest::set_show_error_dialogs(false); |
64 } | 64 } |
65 | 65 |
66 private: | 66 private: |
67 static const wchar_t kUseExistingBrowser[]; | 67 static const wchar_t kUseExistingBrowser[]; |
68 static const wchar_t kTestTimeout[]; | 68 static const wchar_t kTestTimeout[]; |
69 }; | 69 }; |
70 | 70 |
71 #endif // CHROME_TEST_UI_UI_TEST_SUITE_H_ | 71 #endif // CHROME_TEST_UI_UI_TEST_SUITE_H_ |
72 | |
OLD | NEW |