OLD | NEW |
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 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <signal.h> | 8 #include <signal.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #endif | 10 #endif |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 profile_type_(UITestBase::DEFAULT_THEME), | 123 profile_type_(UITestBase::DEFAULT_THEME), |
124 shutdown_type_(UITestBase::WINDOW_CLOSE), | 124 shutdown_type_(UITestBase::WINDOW_CLOSE), |
125 test_start_time_(Time::NowFromSystemTime()), | 125 test_start_time_(Time::NowFromSystemTime()), |
126 command_execution_timeout_ms_(kCommandExecutionTimeout), | 126 command_execution_timeout_ms_(kCommandExecutionTimeout), |
127 action_timeout_ms_(kWaitForActionMsec), | 127 action_timeout_ms_(kWaitForActionMsec), |
128 action_max_timeout_ms_(kWaitForActionMaxMsec), | 128 action_max_timeout_ms_(kWaitForActionMaxMsec), |
129 sleep_timeout_ms_(kWaitForActionMsec), | 129 sleep_timeout_ms_(kWaitForActionMsec), |
130 terminate_timeout_ms_(kWaitForTerminateMsec) { | 130 terminate_timeout_ms_(kWaitForTerminateMsec) { |
131 PathService::Get(chrome::DIR_APP, &browser_directory_); | 131 PathService::Get(chrome::DIR_APP, &browser_directory_); |
132 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); | 132 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); |
133 // TODO(jcivelli): http://crbug.com/44089 We disable the app launcher on new | |
134 // tab behavior for now until it is the default behavior on | |
135 // all platforms. | |
136 launch_arguments_.AppendSwitch(switches::kDisableAppsPanel); | |
137 } | 133 } |
138 | 134 |
139 UITestBase::UITestBase(MessageLoop::Type msg_loop_type) | 135 UITestBase::UITestBase(MessageLoop::Type msg_loop_type) |
140 : launch_arguments_(CommandLine::ARGUMENTS_ONLY), | 136 : launch_arguments_(CommandLine::ARGUMENTS_ONLY), |
141 expected_errors_(0), | 137 expected_errors_(0), |
142 expected_crashes_(0), | 138 expected_crashes_(0), |
143 homepage_(L"about:blank"), | 139 homepage_(L"about:blank"), |
144 wait_for_initial_loads_(true), | 140 wait_for_initial_loads_(true), |
145 dom_automation_enabled_(false), | 141 dom_automation_enabled_(false), |
146 process_(0), // NULL on Windows, 0 PID on POSIX. | 142 process_(0), // NULL on Windows, 0 PID on POSIX. |
147 process_id_(-1), | 143 process_id_(-1), |
148 show_window_(false), | 144 show_window_(false), |
149 clear_profile_(true), | 145 clear_profile_(true), |
150 include_testing_id_(true), | 146 include_testing_id_(true), |
151 use_existing_browser_(default_use_existing_browser_), | 147 use_existing_browser_(default_use_existing_browser_), |
152 enable_file_cookies_(true), | 148 enable_file_cookies_(true), |
153 profile_type_(UITestBase::DEFAULT_THEME), | 149 profile_type_(UITestBase::DEFAULT_THEME), |
154 shutdown_type_(UITestBase::WINDOW_CLOSE), | 150 shutdown_type_(UITestBase::WINDOW_CLOSE), |
155 test_start_time_(Time::NowFromSystemTime()), | 151 test_start_time_(Time::NowFromSystemTime()), |
156 command_execution_timeout_ms_(kCommandExecutionTimeout), | 152 command_execution_timeout_ms_(kCommandExecutionTimeout), |
157 action_timeout_ms_(kWaitForActionMsec), | 153 action_timeout_ms_(kWaitForActionMsec), |
158 action_max_timeout_ms_(kWaitForActionMaxMsec), | 154 action_max_timeout_ms_(kWaitForActionMaxMsec), |
159 sleep_timeout_ms_(kWaitForActionMsec), | 155 sleep_timeout_ms_(kWaitForActionMsec), |
160 terminate_timeout_ms_(kWaitForTerminateMsec) { | 156 terminate_timeout_ms_(kWaitForTerminateMsec) { |
161 PathService::Get(chrome::DIR_APP, &browser_directory_); | 157 PathService::Get(chrome::DIR_APP, &browser_directory_); |
162 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); | 158 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); |
163 // TODO(jcivelli): http://crbug.com/44089 We disable the app launcher on new | |
164 // tab behavior for now until it is the default behavior on | |
165 // all platforms. | |
166 launch_arguments_.AppendSwitch(switches::kDisableAppsPanel); | |
167 } | 159 } |
168 | 160 |
169 UITestBase::~UITestBase() { | 161 UITestBase::~UITestBase() { |
170 } | 162 } |
171 | 163 |
172 void UITestBase::SetUp() { | 164 void UITestBase::SetUp() { |
173 if (!use_existing_browser_) { | 165 if (!use_existing_browser_) { |
174 AssertAppNotRunning(L"Please close any other instances " | 166 AssertAppNotRunning(L"Please close any other instances " |
175 L"of the app before testing."); | 167 L"of the app before testing."); |
176 } | 168 } |
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 set_ui_test_name(ASCIIToWide(test_name)); | 1535 set_ui_test_name(ASCIIToWide(test_name)); |
1544 } | 1536 } |
1545 UITestBase::SetUp(); | 1537 UITestBase::SetUp(); |
1546 PlatformTest::SetUp(); | 1538 PlatformTest::SetUp(); |
1547 } | 1539 } |
1548 | 1540 |
1549 void UITest::TearDown() { | 1541 void UITest::TearDown() { |
1550 UITestBase::TearDown(); | 1542 UITestBase::TearDown(); |
1551 PlatformTest::TearDown(); | 1543 PlatformTest::TearDown(); |
1552 } | 1544 } |
OLD | NEW |