Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/test/reliability/page_load_test.cc

Issue 3354005: Re-lands 58186: (Closed)
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/interactive_ui/npapi_interactive_test.cc ('k') | chrome/test/render_view_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 // --endurl=url: visits the specified url in the end. 29 // --endurl=url: visits the specified url in the end.
30 // --logfile=filepath: saves the visit log to the specified path. 30 // --logfile=filepath: saves the visit log to the specified path.
31 // --timeout=millisecond: time out as specified in millisecond during each 31 // --timeout=millisecond: time out as specified in millisecond during each
32 // page load. 32 // page load.
33 // --nopagedown: won't simulate page down key presses after page load. 33 // --nopagedown: won't simulate page down key presses after page load.
34 // --noclearprofile: do not clear profile dir before firing up each time. 34 // --noclearprofile: do not clear profile dir before firing up each time.
35 // --savedebuglog: save Chrome, V8, and test debug log for each page loaded. 35 // --savedebuglog: save Chrome, V8, and test debug log for each page loaded.
36 36
37 #include <fstream> 37 #include <fstream>
38 38
39 #include "app/keyboard_codes.h"
39 #include "base/command_line.h" 40 #include "base/command_line.h"
40 #include "base/file_path.h" 41 #include "base/file_path.h"
41 #include "base/file_util.h" 42 #include "base/file_util.h"
42 #include "base/file_version_info.h" 43 #include "base/file_version_info.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_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/time.h" 49 #include "base/time.h"
50 #include "chrome/browser/chrome_thread.h" 50 #include "chrome/browser/chrome_thread.h"
51 #include "chrome/browser/net/url_fixer_upper.h" 51 #include "chrome/browser/net/url_fixer_upper.h"
52 #include "chrome/browser/prefs/pref_service.h" 52 #include "chrome/browser/prefs/pref_service.h"
53 #include "chrome/common/chrome_constants.h" 53 #include "chrome/common/chrome_constants.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 if (result == AUTOMATION_MSG_NAVIGATION_SUCCESS) { 203 if (result == AUTOMATION_MSG_NAVIGATION_SUCCESS) {
204 if (g_page_down) { 204 if (g_page_down) {
205 // Page down twice. 205 // Page down twice.
206 scoped_refptr<BrowserProxy> browser( 206 scoped_refptr<BrowserProxy> browser(
207 automation()->GetBrowserWindow(0)); 207 automation()->GetBrowserWindow(0));
208 if (browser.get()) { 208 if (browser.get()) {
209 scoped_refptr<WindowProxy> window(browser->GetWindow()); 209 scoped_refptr<WindowProxy> window(browser->GetWindow());
210 if (window.get()) { 210 if (window.get()) {
211 if (browser->BringToFront()) { 211 if (browser->BringToFront()) {
212 window->SimulateOSKeyPress(base::VKEY_NEXT, 0); 212 window->SimulateOSKeyPress(app::VKEY_NEXT, 0);
213 PlatformThread::Sleep(sleep_timeout_ms()); 213 PlatformThread::Sleep(sleep_timeout_ms());
214 window->SimulateOSKeyPress(base::VKEY_NEXT, 0); 214 window->SimulateOSKeyPress(app::VKEY_NEXT, 0);
215 PlatformThread::Sleep(sleep_timeout_ms()); 215 PlatformThread::Sleep(sleep_timeout_ms());
216 } 216 }
217 } 217 }
218 } 218 }
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 // Log navigate complete time. 223 // Log navigate complete time.
224 time_now = base::Time::Now(); 224 time_now = base::Time::Now();
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); 716 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags));
717 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { 717 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) {
718 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); 718 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch);
719 if (!file_util::AbsolutePath(&g_v8_log_path)) 719 if (!file_util::AbsolutePath(&g_v8_log_path))
720 g_v8_log_path = FilePath(); 720 g_v8_log_path = FilePath();
721 } 721 }
722 } 722 }
723 } 723 }
724 } 724 }
725 } 725 }
OLDNEW
« no previous file with comments | « chrome/test/interactive_ui/npapi_interactive_test.cc ('k') | chrome/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698