Index: tools/perf/perf_tools/startup_measurement.py |
diff --git a/tools/perf/perf_tools/startup_measurement.py b/tools/perf/perf_tools/startup_measurement.py |
index 0c4284ffbc2acd54d8a9027209d2561929b6af88..f1150904f459e228c10c2a7951ef5f77afa8236b 100644 |
--- a/tools/perf/perf_tools/startup_measurement.py |
+++ b/tools/perf/perf_tools/startup_measurement.py |
@@ -19,11 +19,23 @@ class PerfWarm(page_measurement.PageMeasurement): |
discard_first_result=True) |
def CustomizeBrowserOptions(self, options): |
+ options.AppendExtraBrowserArg('--enable-stats-collection-bindings') |
+ options.AppendExtraBrowserArg( |
+ '--reduce-security-for-stats-collection-tests') |
+ |
+ # Old commandline flags used for reference builds. |
options.AppendExtraBrowserArg('--dom-automation') |
- options.AppendExtraBrowserArg('--reduce-security-for-dom-automation-tests') |
+ options.AppendExtraBrowserArg( |
+ '--reduce-security-for-dom-automation-tests') |
def MeasurePage(self, page, tab, results): |
- get_histogram_js = "domAutomationController.getBrowserHistogram(\"%s\")" |
+ # TODO(jeremy): Remove references to |
+ # domAutomationController.getBrowserHistogram when we update the reference |
+ # builds. |
+ get_histogram_js = ('(window.statsCollectionController ?' |
+ 'statsCollectionController :' |
+ 'domAutomationController).getBrowserHistogram("%s")') |
+ |
for display_name, histogram_name in self.HISTOGRAMS_TO_RECORD.iteritems(): |
result = tab.EvaluateJavaScript(get_histogram_js % histogram_name) |