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

Unified Diff: tools/perf/measurements/session_restore.py

Issue 161473002: [Android] Don't wait for background tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/perf/metrics/startup_metric.py » ('j') | tools/perf/metrics/startup_metric.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/session_restore.py
diff --git a/tools/perf/measurements/session_restore.py b/tools/perf/measurements/session_restore.py
index 5ad03a1065fe7d222aabeb4d68b23a4a722c314e..7adfe4a57ecb92b0f73e16c43492cbff368218c4 100644
--- a/tools/perf/measurements/session_restore.py
+++ b/tools/perf/measurements/session_restore.py
@@ -51,9 +51,17 @@ class SessionRestore(startup.Startup):
def MeasurePage(self, page, tab, results):
# Wait for all tabs to finish loading.
- for i in xrange(len(tab.browser.tabs)):
- t = tab.browser.tabs[i]
+ if 'android' in tab.browser.browser_type:
tonyg 2014/02/12 22:25:57 I don't like defining the metric differently by pl
aberent 2014/02/13 11:37:43 Switched to Android behaviour in all cases. Switch
+ # On android the background tabs are loaded on demand, so wont have been
+ # loaded at this stage; so only wait for the foreground tab. Also
+ # document.hidden is broken on Android - crbug.com/322544 so assume this
+ # is tab[0]
+ t = tab.browser.tabs[0]
t.WaitForDocumentReadyStateToBeComplete()
+ else:
+ for i in xrange(len(tab.browser.tabs)):
+ t = tab.browser.tabs[i]
+ t.WaitForDocumentReadyStateToBeComplete()
# Record CPU usage from browser start to when all pages have loaded.
self._cpu_metric.Stop(None, None)
« no previous file with comments | « no previous file | tools/perf/metrics/startup_metric.py » ('j') | tools/perf/metrics/startup_metric.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698