| 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 "app/keyboard_codes.h" | 39 #include "app/keyboard_codes.h" |
| 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/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_number_conversions.h" | 46 #include "base/string_number_conversions.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/threading/platform_thread.h" |
| 49 #include "base/time.h" | 50 #include "base/time.h" |
| 50 #include "chrome/browser/net/url_fixer_upper.h" | 51 #include "chrome/browser/net/url_fixer_upper.h" |
| 51 #include "chrome/browser/prefs/pref_service.h" | 52 #include "chrome/browser/prefs/pref_service.h" |
| 52 #include "chrome/browser/prefs/pref_service_mock_builder.h" | 53 #include "chrome/browser/prefs/pref_service_mock_builder.h" |
| 53 #include "chrome/common/automation_messages.h" | 54 #include "chrome/common/automation_messages.h" |
| 54 #include "chrome/common/chrome_constants.h" | 55 #include "chrome/common/chrome_constants.h" |
| 55 #include "chrome/common/chrome_paths.h" | 56 #include "chrome/common/chrome_paths.h" |
| 56 #include "chrome/common/chrome_switches.h" | 57 #include "chrome/common/chrome_switches.h" |
| 57 #include "chrome/common/chrome_version_info.h" | 58 #include "chrome/common/chrome_version_info.h" |
| 58 #include "chrome/common/json_pref_store.h" | 59 #include "chrome/common/json_pref_store.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 scoped_refptr<BrowserProxy> browser( | 208 scoped_refptr<BrowserProxy> browser( |
| 208 automation()->GetBrowserWindow(0)); | 209 automation()->GetBrowserWindow(0)); |
| 209 if (browser.get()) { | 210 if (browser.get()) { |
| 210 scoped_refptr<WindowProxy> window(browser->GetWindow()); | 211 scoped_refptr<WindowProxy> window(browser->GetWindow()); |
| 211 if (window.get()) { | 212 if (window.get()) { |
| 212 if (browser->BringToFront()) { | 213 if (browser->BringToFront()) { |
| 213 // Sleep for 2 seconds between commands. | 214 // Sleep for 2 seconds between commands. |
| 214 // This used to be settable but the flag went away. | 215 // This used to be settable but the flag went away. |
| 215 int sleep_time_ms = 2000; | 216 int sleep_time_ms = 2000; |
| 216 window->SimulateOSKeyPress(app::VKEY_NEXT, 0); | 217 window->SimulateOSKeyPress(app::VKEY_NEXT, 0); |
| 217 PlatformThread::Sleep(sleep_time_ms); | 218 base::PlatformThread::Sleep(sleep_time_ms); |
| 218 window->SimulateOSKeyPress(app::VKEY_NEXT, 0); | 219 window->SimulateOSKeyPress(app::VKEY_NEXT, 0); |
| 219 PlatformThread::Sleep(sleep_time_ms); | 220 base::PlatformThread::Sleep(sleep_time_ms); |
| 220 } | 221 } |
| 221 } | 222 } |
| 222 } | 223 } |
| 223 } | 224 } |
| 224 } | 225 } |
| 225 } | 226 } |
| 226 | 227 |
| 227 // Log navigate complete time. | 228 // Log navigate complete time. |
| 228 time_now = base::Time::Now(); | 229 time_now = base::Time::Now(); |
| 229 test_log << "navigate_complete_seconds="; | 230 test_log << "navigate_complete_seconds="; |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); | 717 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); |
| 717 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 718 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
| 718 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); | 719 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); |
| 719 if (!file_util::AbsolutePath(&g_v8_log_path)) | 720 if (!file_util::AbsolutePath(&g_v8_log_path)) |
| 720 g_v8_log_path = FilePath(); | 721 g_v8_log_path = FilePath(); |
| 721 } | 722 } |
| 722 } | 723 } |
| 723 } | 724 } |
| 724 } | 725 } |
| 725 } | 726 } |
| OLD | NEW |