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) |