| 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 28 matching lines...) Expand all Loading... |
| 39 #include "base/command_line.h" | 39 #include "base/command_line.h" |
| 40 #include "base/file_path.h" | 40 #include "base/file_path.h" |
| 41 #include "base/file_util.h" | 41 #include "base/file_util.h" |
| 42 #include "base/file_version_info.h" | 42 #include "base/file_version_info.h" |
| 43 #include "base/keyboard_codes.h" | 43 #include "base/keyboard_codes.h" |
| 44 #include "base/i18n/time_formatting.h" | 44 #include "base/i18n/time_formatting.h" |
| 45 #include "base/path_service.h" | 45 #include "base/path_service.h" |
| 46 #include "base/string_util.h" | 46 #include "base/string_util.h" |
| 47 #include "base/test/test_file_util.h" | 47 #include "base/test/test_file_util.h" |
| 48 #include "base/time.h" | 48 #include "base/time.h" |
| 49 #include "chrome/app/chrome_version_info.h" | |
| 50 #include "chrome/browser/chrome_thread.h" | 49 #include "chrome/browser/chrome_thread.h" |
| 51 #include "chrome/browser/net/url_fixer_upper.h" | 50 #include "chrome/browser/net/url_fixer_upper.h" |
| 52 #include "chrome/browser/pref_service.h" | 51 #include "chrome/browser/pref_service.h" |
| 53 #include "chrome/common/chrome_constants.h" | 52 #include "chrome/common/chrome_constants.h" |
| 54 #include "chrome/common/chrome_paths.h" | 53 #include "chrome/common/chrome_paths.h" |
| 55 #include "chrome/common/chrome_switches.h" | 54 #include "chrome/common/chrome_switches.h" |
| 55 #include "chrome/common/chrome_version_info.h" |
| 56 #include "chrome/common/json_pref_store.h" | 56 #include "chrome/common/json_pref_store.h" |
| 57 #include "chrome/common/logging_chrome.h" | 57 #include "chrome/common/logging_chrome.h" |
| 58 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
| 59 #include "chrome/common/url_constants.h" | 59 #include "chrome/common/url_constants.h" |
| 60 #include "chrome/test/automation/automation_messages.h" | 60 #include "chrome/test/automation/automation_messages.h" |
| 61 #include "chrome/test/automation/automation_proxy.h" | 61 #include "chrome/test/automation/automation_proxy.h" |
| 62 #include "chrome/test/automation/browser_proxy.h" | 62 #include "chrome/test/automation/browser_proxy.h" |
| 63 #include "chrome/test/automation/tab_proxy.h" | 63 #include "chrome/test/automation/tab_proxy.h" |
| 64 #include "chrome/test/automation/window_proxy.h" | 64 #include "chrome/test/automation/window_proxy.h" |
| 65 #include "chrome/test/ui/ui_test.h" | 65 #include "chrome/test/ui/ui_test.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 test_log.open(g_test_log_path.value().c_str()); | 158 test_log.open(g_test_log_path.value().c_str()); |
| 159 | 159 |
| 160 // Check file version info for chrome dll. | 160 // Check file version info for chrome dll. |
| 161 scoped_ptr<FileVersionInfo> file_info; | 161 scoped_ptr<FileVersionInfo> file_info; |
| 162 #if defined(OS_WIN) | 162 #if defined(OS_WIN) |
| 163 file_info.reset(FileVersionInfo::CreateFileVersionInfo(kChromeDll)); | 163 file_info.reset(FileVersionInfo::CreateFileVersionInfo(kChromeDll)); |
| 164 #elif defined(OS_LINUX) || defined(OS_MACOSX) | 164 #elif defined(OS_LINUX) || defined(OS_MACOSX) |
| 165 // TODO(fmeawad): On Mac, the version retrieved here belongs to the test | 165 // TODO(fmeawad): On Mac, the version retrieved here belongs to the test |
| 166 // module and not the chrome binary, need to be changed to chrome binary | 166 // module and not the chrome binary, need to be changed to chrome binary |
| 167 // instead. | 167 // instead. |
| 168 file_info.reset(chrome_app::GetChromeVersionInfo()); | 168 file_info.reset(chrome::GetChromeVersionInfo()); |
| 169 #endif // !defined(OS_WIN) | 169 #endif // !defined(OS_WIN) |
| 170 std::wstring last_change = file_info->last_change(); | 170 std::wstring last_change = file_info->last_change(); |
| 171 test_log << "Last Change: "; | 171 test_log << "Last Change: "; |
| 172 test_log << last_change << std::endl; | 172 test_log << last_change << std::endl; |
| 173 | 173 |
| 174 | 174 |
| 175 // Log timestamp for test start. | 175 // Log timestamp for test start. |
| 176 base::Time time_now = base::Time::Now(); | 176 base::Time time_now = base::Time::Now(); |
| 177 double time_start = time_now.ToDoubleT(); | 177 double time_start = time_now.ToDoubleT(); |
| 178 test_log << "Test Start: "; | 178 test_log << "Test Start: "; |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); | 709 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); |
| 710 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 710 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
| 711 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); | 711 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); |
| 712 if (!file_util::AbsolutePath(&g_v8_log_path)) | 712 if (!file_util::AbsolutePath(&g_v8_log_path)) |
| 713 g_v8_log_path = FilePath(); | 713 g_v8_log_path = FilePath(); |
| 714 } | 714 } |
| 715 } | 715 } |
| 716 } | 716 } |
| 717 } | 717 } |
| 718 } | 718 } |
| OLD | NEW |