Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 | 152 |
| 153 std::wstring error_msg = | 153 std::wstring error_msg = |
| 154 L"Encountered an unexpected crash in the program during this test."; | 154 L"Encountered an unexpected crash in the program during this test."; |
| 155 if (expected_crashes_ > 0 && actual_crashes == 0) { | 155 if (expected_crashes_ > 0 && actual_crashes == 0) { |
| 156 error_msg += L" "; | 156 error_msg += L" "; |
| 157 error_msg += kFailedNoCrashService; | 157 error_msg += kFailedNoCrashService; |
| 158 } | 158 } |
| 159 EXPECT_EQ(expected_crashes_, actual_crashes) << error_msg; | 159 EXPECT_EQ(expected_crashes_, actual_crashes) << error_msg; |
| 160 } | 160 } |
| 161 | 161 |
| 162 // TODO(phajdan.jr): get rid of set_command_execution_timeout_ms. | |
|
Nirnimesh
2011/03/29 20:27:28
We'll need this
Paweł Hajdan Jr.
2011/03/30 07:15:27
Well, the entire point of this change is to get ri
Nirnimesh
2011/03/30 10:26:30
I thought this CL was about getting rid of command
Paweł Hajdan Jr.
2011/03/30 16:36:39
In this situation, a timeout_ms parameter should b
Nirnimesh
2011/03/30 18:43:06
What you're suggesting would have been fine if the
Huyen
2011/03/31 02:42:55
Done.
Paweł Hajdan Jr.
2011/03/31 20:11:09
Well, set_command_execution_timeout was a hack sin
Nirnimesh
2011/03/31 20:20:26
> A possible solution, if you'd like to keep the T
| |
| 163 void UITestBase::set_command_execution_timeout_ms(int timeout) { | |
| 164 automation()->set_command_execution_timeout_ms(timeout); | |
| 165 VLOG(1) << "Automation command execution timeout set to " << timeout << " ms"; | |
| 166 } | |
| 167 | |
| 168 ProxyLauncher* UITestBase::CreateProxyLauncher() { | 162 ProxyLauncher* UITestBase::CreateProxyLauncher() { |
| 169 return new AnonymousProxyLauncher(false); | 163 return new AnonymousProxyLauncher(false); |
| 170 } | 164 } |
| 171 | 165 |
| 172 bool UITestBase::ShouldFilterInet() { | 166 bool UITestBase::ShouldFilterInet() { |
| 173 return true; | 167 return true; |
| 174 } | 168 } |
| 175 | 169 |
| 176 void UITestBase::SetLaunchSwitches() { | 170 void UITestBase::SetLaunchSwitches() { |
| 177 // We need cookies on file:// for things like the page cycler. | 171 // We need cookies on file:// for things like the page cycler. |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 859 incorrect_state_count++; | 853 incorrect_state_count++; |
| 860 } | 854 } |
| 861 | 855 |
| 862 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() | 856 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() |
| 863 << " seconds" | 857 << " seconds" |
| 864 << " call failed " << fail_count << " times" | 858 << " call failed " << fail_count << " times" |
| 865 << " state was incorrect " << incorrect_state_count << " times"; | 859 << " state was incorrect " << incorrect_state_count << " times"; |
| 866 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; | 860 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; |
| 867 return false; | 861 return false; |
| 868 } | 862 } |
| OLD | NEW |