summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider_observers.h
diff options
context:
space:
mode:
authorpathorn@chromium.org <pathorn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 00:08:34 +0000
committerpathorn@chromium.org <pathorn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 00:08:34 +0000
commit5c1304300d3cdeecb75aa85f0c207d65e0cbf6cf (patch)
tree9f972c839215c5539913f5db14a8367eba8e776d /chrome/browser/automation/automation_provider_observers.h
parentfcb9b14eb0197b937460acba77ee164a8f0ab5ff (diff)
downloadchromium_src-5c1304300d3cdeecb75aa85f0c207d65e0cbf6cf.zip
chromium_src-5c1304300d3cdeecb75aa85f0c207d65e0cbf6cf.tar.gz
chromium_src-5c1304300d3cdeecb75aa85f0c207d65e0cbf6cf.tar.bz2
Measure loading time of several tabs.
This is a new set of ui tests to load several tabs, and look at how long it takes for a subset to finish loading. BUG=44129 TEST=none Review URL: http://codereview.chromium.org/2559001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider_observers.h')
-rw-r--r--chrome/browser/automation/automation_provider_observers.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 6481005..6bf6a26 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -36,7 +36,18 @@ class InitialLoadObserver : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details);
+ // Caller owns the return value and is responsible for deleting it.
+ // Example return value:
+ // {'tabs': [{'start_time_ms': 1, 'stop_time_ms': 2.5},
+ // {'start_time_ms': 0.5, 'stop_time_ms': 3}]}
+ // stop_time_ms values may be null if WaitForInitialLoads has not finished.
+ // Only includes entries for the |tab_count| tabs we are monitoring.
+ // There is no defined ordering of the return value.
+ DictionaryValue* GetTimingInformation() const;
+
private:
+ class TabTime;
+ typedef std::map<uintptr_t, TabTime> TabTimeMap;
typedef std::set<uintptr_t> TabSet;
void ConditionMet();
@@ -45,7 +56,8 @@ class InitialLoadObserver : public NotificationObserver {
AutomationProvider* automation_;
size_t outstanding_tab_count_;
- TabSet loading_tabs_;
+ base::TimeTicks init_time_;
+ TabTimeMap loading_tabs_;
TabSet finished_tabs_;
DISALLOW_COPY_AND_ASSIGN(InitialLoadObserver);