diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 01:47:28 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 01:47:28 +0000 |
commit | 4998d79f6457ca0dd9f1c74f3035a3c03f3a0b5b (patch) | |
tree | 39e3a094176352f3fb6f019fedbe8f395739e6fc /chrome/test/reliability/page_load_test.cc | |
parent | 7de5c8e928e6f81c2283e8efb7a9e6e27db7ecf5 (diff) | |
download | chromium_src-4998d79f6457ca0dd9f1c74f3035a3c03f3a0b5b.zip chromium_src-4998d79f6457ca0dd9f1c74f3035a3c03f3a0b5b.tar.gz chromium_src-4998d79f6457ca0dd9f1c74f3035a3c03f3a0b5b.tar.bz2 |
Reliablity test
Introduce a flag --noclearprofile to instruct reliability test to not clear
profile before firing off the browser. This is so avoid unnecessary disk
writes. (The default value of this flag is OFF, so win reliability bot should
continue to behave as is). Mac Chromebot would fire several instances of
Chrome at a time, and I want to minimize the load it generates. I understand
that I should begin with a clean profile, so I clean-up the user-data-dir
after every few runs, rather than cleaning every single time.
BUG=25271
TEST=reliability_tests should work as is on Win
Review URL: http://codereview.chromium.org/300014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/reliability/page_load_test.cc')
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index 0601cde..a5e6625 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -31,6 +31,7 @@ // --timeout=millisecond: time out as specified in millisecond during each // page load. // --nopagedown: won't simulate page down key presses after page load. +// --noclearprofile: do not clear profile dir before firing up each time. // --savedebuglog: save Chrome, V8, and test debug log for each page loaded. #include <fstream> @@ -79,6 +80,7 @@ const char kEndURLSwitch[] = "endurl"; const char kLogFileSwitch[] = "logfile"; const char kTimeoutSwitch[] = "timeout"; const char kNoPageDownSwitch[] = "nopagedown"; +const char kNoClearProfileSwitch[] = "noclearprofile"; const char kSaveDebugLogSwitch[] = "savedebuglog"; const char kDefaultServerUrl[] = "http://urllist.com"; @@ -105,6 +107,7 @@ bool g_memory_usage = false; bool g_continuous_load = false; bool g_browser_existing = false; bool g_page_down = true; +bool g_clear_profile = true; std::string g_end_url; FilePath g_log_file_path; int g_timeout_ms = -1; @@ -445,6 +448,7 @@ class PageLoadTest : public UITest { virtual void SetUp() { UITest::SetUp(); g_browser_existing = true; + clear_profile_ = g_clear_profile; // Initialize crash_dumps_dir_path_. PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dumps_dir_path_); @@ -709,6 +713,9 @@ void SetPageRange(const CommandLine& parsed_command_line) { if (parsed_command_line.HasSwitch(kNoPageDownSwitch)) g_page_down = false; + if (parsed_command_line.HasSwitch(kNoClearProfileSwitch)) + g_clear_profile = false; + if (parsed_command_line.HasSwitch(kSaveDebugLogSwitch)) { g_save_debug_log = true; g_chrome_log_path = logging::GetLogFileName(); |