summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui/ui_test.cc
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-12 19:31:45 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-12 19:31:45 +0000
commitc08483abfc9dbabff801b9aa5675dabb5d63dac8 (patch)
tree91e15291b6f8dc7f98afc80968782ea4fec23cb8 /chrome/test/ui/ui_test.cc
parent1f6f7a7ef5caf289329bfb1b576877f6be55dce7 (diff)
downloadchromium_src-c08483abfc9dbabff801b9aa5675dabb5d63dac8.zip
chromium_src-c08483abfc9dbabff801b9aa5675dabb5d63dac8.tar.gz
chromium_src-c08483abfc9dbabff801b9aa5675dabb5d63dac8.tar.bz2
Record startup time closer to where the browser really started
startup time is used as a timestamp to discover new crashes (determined by entries in crash dir since the recorded startup time) in the ui_test framework. Initialing it in the constructor is problematic for PyAuto since python unittest initialzes testcase objects for all tests together, so all instances will have about the same startup time, and this leads to crashes from one test being mismatched to the error reporting in another. This CL fixes it by moving startup time initialization to SetUp, which is closer to the time the browser actually gets launched. Consciously, Not moving to LaunchBrowserAndServer. BUG=51463 TEST= Review URL: http://codereview.chromium.org/3670004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/ui_test.cc')
-rw-r--r--chrome/test/ui/ui_test.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index cd7059d..e026e5a 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -104,7 +104,6 @@ UITestBase::UITestBase()
enable_file_cookies_(true),
profile_type_(UITestBase::DEFAULT_THEME),
shutdown_type_(UITestBase::WINDOW_CLOSE),
- test_start_time_(Time::NowFromSystemTime()),
temp_profile_dir_(new ScopedTempDir()) {
PathService::Get(chrome::DIR_APP, &browser_directory_);
PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
@@ -124,8 +123,7 @@ UITestBase::UITestBase(MessageLoop::Type msg_loop_type)
include_testing_id_(true),
enable_file_cookies_(true),
profile_type_(UITestBase::DEFAULT_THEME),
- shutdown_type_(UITestBase::WINDOW_CLOSE),
- test_start_time_(Time::NowFromSystemTime()) {
+ shutdown_type_(UITestBase::WINDOW_CLOSE) {
PathService::Get(chrome::DIR_APP, &browser_directory_);
PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
}
@@ -139,6 +137,7 @@ void UITestBase::SetUp() {
JavaScriptExecutionController::set_timeout(
TestTimeouts::action_max_timeout_ms());
+ test_start_time_ = Time::NowFromSystemTime();
LaunchBrowserAndServer();
}