diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 21:05:25 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 21:05:25 +0000 |
commit | 2aa336ea9a0edfa52a58a4856655370ddca794f3 (patch) | |
tree | 46223555bc23d93d72234181976499cd42b2708c /chrome/test/ui/ui_test.h | |
parent | a8e91124532061d21f0114605530c605582144e8 (diff) | |
download | chromium_src-2aa336ea9a0edfa52a58a4856655370ddca794f3.zip chromium_src-2aa336ea9a0edfa52a58a4856655370ddca794f3.tar.gz chromium_src-2aa336ea9a0edfa52a58a4856655370ddca794f3.tar.bz2 |
Add some shutdown perf tests. We measure shutdown for the combination of
shutdown method: {Close all windows, clicking exit, terminating process}
and number of tabs open: {just about:blank, twenty tabs}
BUG=23118
TEST=This CL adds a test.
Review URL: http://codereview.chromium.org/1594008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/ui_test.h')
-rw-r--r-- | chrome/test/ui/ui_test.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index 50ab471..3d939f6 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -441,6 +441,18 @@ class UITestBase { homepage_ = homepage; } + // Different ways to quit the browser. + typedef enum { + WINDOW_CLOSE, + USER_QUIT, + SESSION_ENDING, + } ShutdownType; + + // Sets the shutdown type, which defaults to WINDOW_CLOSE. + void set_shutdown_type(ShutdownType value) { + shutdown_type_ = value; + } + // Count the number of active browser processes launched by this test. // The count includes browser sub-processes. int GetBrowserProcessCount(); @@ -547,6 +559,7 @@ class UITestBase { bool wait_for_initial_loads_; // Wait for initial loads to complete // in SetUp() before running test body. base::TimeTicks browser_launch_time_; // Time when the browser was run. + base::TimeDelta browser_quit_time_; // How long the shutdown took. bool dom_automation_enabled_; // This can be set to true to have the // test run the dom automation case. FilePath template_user_data_; // See set_template_user_data(). @@ -567,6 +580,8 @@ class UITestBase { ProfileType profile_type_; // Are we using a profile with a // complex theme? FilePath websocket_pid_file_; // PID file for websocket server. + ShutdownType shutdown_type_; // The method for shutting down + // the browser. Used in ShutdownTest. private: bool LaunchBrowserHelper(const CommandLine& arguments, |