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 // This file provides reliablity test which runs under UI test framework. The | 5 // This file provides reliablity test which runs under UI test framework. The |
6 // test is intended to run within QEMU environment. | 6 // test is intended to run within QEMU environment. |
7 // | 7 // |
8 // Usage 1: reliability_test | 8 // Usage 1: reliability_test |
9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly | 9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly |
10 // used by buildbot, to verify reliability_test itself runs ok. | 10 // used by buildbot, to verify reliability_test itself runs ok. |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "base/command_line.h" | 40 #include "base/command_line.h" |
41 #include "base/file_path.h" | 41 #include "base/file_path.h" |
42 #include "base/file_util.h" | 42 #include "base/file_util.h" |
43 #include "base/file_version_info.h" | 43 #include "base/file_version_info.h" |
44 #include "base/keyboard_codes.h" | 44 #include "base/keyboard_codes.h" |
45 #include "base/i18n/time_formatting.h" | 45 #include "base/i18n/time_formatting.h" |
46 #include "base/path_service.h" | 46 #include "base/path_service.h" |
47 #include "base/string_util.h" | 47 #include "base/string_util.h" |
48 #include "base/test/test_file_util.h" | 48 #include "base/test/test_file_util.h" |
49 #include "base/time.h" | 49 #include "base/time.h" |
| 50 #include "chrome/app/chrome_version_info.h" |
50 #include "chrome/browser/net/url_fixer_upper.h" | 51 #include "chrome/browser/net/url_fixer_upper.h" |
51 #include "chrome/browser/pref_service.h" | 52 #include "chrome/browser/pref_service.h" |
52 #include "chrome/common/chrome_constants.h" | 53 #include "chrome/common/chrome_constants.h" |
53 #include "chrome/common/chrome_paths.h" | 54 #include "chrome/common/chrome_paths.h" |
54 #include "chrome/common/chrome_switches.h" | 55 #include "chrome/common/chrome_switches.h" |
55 #include "chrome/common/logging_chrome.h" | 56 #include "chrome/common/logging_chrome.h" |
56 #include "chrome/common/pref_names.h" | 57 #include "chrome/common/pref_names.h" |
57 #include "chrome/common/url_constants.h" | 58 #include "chrome/common/url_constants.h" |
58 #include "chrome/test/automation/automation_messages.h" | 59 #include "chrome/test/automation/automation_messages.h" |
59 #include "chrome/test/automation/automation_proxy.h" | 60 #include "chrome/test/automation/automation_proxy.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 154 |
154 // Create a test log. | 155 // Create a test log. |
155 g_test_log_path = FilePath(FILE_PATH_LITERAL("test_log.log")); | 156 g_test_log_path = FilePath(FILE_PATH_LITERAL("test_log.log")); |
156 test_log.open(g_test_log_path.value().c_str()); | 157 test_log.open(g_test_log_path.value().c_str()); |
157 | 158 |
158 // Check file version info for chrome dll. | 159 // Check file version info for chrome dll. |
159 scoped_ptr<FileVersionInfo> file_info; | 160 scoped_ptr<FileVersionInfo> file_info; |
160 #if defined(OS_WIN) | 161 #if defined(OS_WIN) |
161 file_info.reset(FileVersionInfo::CreateFileVersionInfo(kChromeDll)); | 162 file_info.reset(FileVersionInfo::CreateFileVersionInfo(kChromeDll)); |
162 #elif defined(OS_LINUX) || defined(OS_MACOSX) | 163 #elif defined(OS_LINUX) || defined(OS_MACOSX) |
163 // TODO(fmeawad): the version retrieved here belongs to the test module and | 164 // TODO(fmeawad): On Mac, the version retrieved here belongs to the test |
164 // not the chrome binary, need to be changed to chrome binary instead. | 165 // module and not the chrome binary, need to be changed to chrome binary |
165 file_info.reset(FileVersionInfo::CreateFileVersionInfoForCurrentModule()); | 166 // instead. |
| 167 file_info.reset(chrome_app::GetChromeVersionInfo()); |
166 #endif // !defined(OS_WIN) | 168 #endif // !defined(OS_WIN) |
167 std::wstring last_change = file_info->last_change(); | 169 std::wstring last_change = file_info->last_change(); |
168 test_log << "Last Change: "; | 170 test_log << "Last Change: "; |
169 test_log << last_change << std::endl; | 171 test_log << last_change << std::endl; |
170 | 172 |
171 | 173 |
172 // Log timestamp for test start. | 174 // Log timestamp for test start. |
173 base::Time time_now = base::Time::Now(); | 175 base::Time time_now = base::Time::Now(); |
174 double time_start = time_now.ToDoubleT(); | 176 double time_start = time_now.ToDoubleT(); |
175 test_log << "Test Start: "; | 177 test_log << "Test Start: "; |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); | 705 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); |
704 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 706 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
705 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); | 707 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); |
706 if (!file_util::AbsolutePath(&g_v8_log_path)) | 708 if (!file_util::AbsolutePath(&g_v8_log_path)) |
707 g_v8_log_path = FilePath(); | 709 g_v8_log_path = FilePath(); |
708 } | 710 } |
709 } | 711 } |
710 } | 712 } |
711 } | 713 } |
712 } | 714 } |
OLD | NEW |