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); |
133 } | 137 } |
134 | 138 |
135 UITestBase::UITestBase(MessageLoop::Type msg_loop_type) | 139 UITestBase::UITestBase(MessageLoop::Type msg_loop_type) |
136 : launch_arguments_(CommandLine::ARGUMENTS_ONLY), | 140 : launch_arguments_(CommandLine::ARGUMENTS_ONLY), |
137 expected_errors_(0), | 141 expected_errors_(0), |
138 expected_crashes_(0), | 142 expected_crashes_(0), |
139 homepage_(L"about:blank"), | 143 homepage_(L"about:blank"), |
140 wait_for_initial_loads_(true), | 144 wait_for_initial_loads_(true), |
141 dom_automation_enabled_(false), | 145 dom_automation_enabled_(false), |
142 process_(0), // NULL on Windows, 0 PID on POSIX. | 146 process_(0), // NULL on Windows, 0 PID on POSIX. |
143 process_id_(-1), | 147 process_id_(-1), |
144 show_window_(false), | 148 show_window_(false), |
145 clear_profile_(true), | 149 clear_profile_(true), |
146 include_testing_id_(true), | 150 include_testing_id_(true), |
147 use_existing_browser_(default_use_existing_browser_), | 151 use_existing_browser_(default_use_existing_browser_), |
148 enable_file_cookies_(true), | 152 enable_file_cookies_(true), |
149 profile_type_(UITestBase::DEFAULT_THEME), | 153 profile_type_(UITestBase::DEFAULT_THEME), |
150 shutdown_type_(UITestBase::WINDOW_CLOSE), | 154 shutdown_type_(UITestBase::WINDOW_CLOSE), |
151 test_start_time_(Time::NowFromSystemTime()), | 155 test_start_time_(Time::NowFromSystemTime()), |
152 command_execution_timeout_ms_(kCommandExecutionTimeout), | 156 command_execution_timeout_ms_(kCommandExecutionTimeout), |
153 action_timeout_ms_(kWaitForActionMsec), | 157 action_timeout_ms_(kWaitForActionMsec), |
154 action_max_timeout_ms_(kWaitForActionMaxMsec), | 158 action_max_timeout_ms_(kWaitForActionMaxMsec), |
155 sleep_timeout_ms_(kWaitForActionMsec), | 159 sleep_timeout_ms_(kWaitForActionMsec), |
156 terminate_timeout_ms_(kWaitForTerminateMsec) { | 160 terminate_timeout_ms_(kWaitForTerminateMsec) { |
157 PathService::Get(chrome::DIR_APP, &browser_directory_); | 161 PathService::Get(chrome::DIR_APP, &browser_directory_); |
158 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); | 162 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); |
159 } | 167 } |
160 | 168 |
161 UITestBase::~UITestBase() { | 169 UITestBase::~UITestBase() { |
162 } | 170 } |
163 | 171 |
164 void UITestBase::SetUp() { | 172 void UITestBase::SetUp() { |
165 if (!use_existing_browser_) { | 173 if (!use_existing_browser_) { |
166 AssertAppNotRunning(L"Please close any other instances " | 174 AssertAppNotRunning(L"Please close any other instances " |
167 L"of the app before testing."); | 175 L"of the app before testing."); |
168 } | 176 } |
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 set_ui_test_name(ASCIIToWide(test_name)); | 1544 set_ui_test_name(ASCIIToWide(test_name)); |
1537 } | 1545 } |
1538 UITestBase::SetUp(); | 1546 UITestBase::SetUp(); |
1539 PlatformTest::SetUp(); | 1547 PlatformTest::SetUp(); |
1540 } | 1548 } |
1541 | 1549 |
1542 void UITest::TearDown() { | 1550 void UITest::TearDown() { |
1543 UITestBase::TearDown(); | 1551 UITestBase::TearDown(); |
1544 PlatformTest::TearDown(); | 1552 PlatformTest::TearDown(); |
1545 } | 1553 } |
OLD | NEW |