OLD | NEW |
---|---|
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from telemetry import test | 5 from telemetry import test |
6 from telemetry.page import page_measurement | 6 from telemetry.page import page_measurement |
7 | 7 |
8 class PicaMeasurement(page_measurement.PageMeasurement): | 8 class PicaMeasurement(page_measurement.PageMeasurement): |
9 def CustomizeBrowserOptions(self, options): | |
10 # Needed for native custom elements (document.register) | |
11 options.extra_browser_args.append( | |
tonyg
2013/08/12 18:15:10
Please use options.AppendExtraBrowserArg(). It che
adamk
2013/08/12 18:20:43
Done.
| |
12 '--enable-experimental-web-platform-features') | |
13 | |
9 def MeasurePage(self, _, tab, results): | 14 def MeasurePage(self, _, tab, results): |
10 result = int(tab.EvaluateJavaScript('__pica_load_time')) | 15 result = int(tab.EvaluateJavaScript('__pica_load_time')) |
11 results.Add('Total', 'ms', result) | 16 results.Add('Total', 'ms', result) |
12 | 17 |
13 | 18 |
14 class Pica(test.Test): | 19 class Pica(test.Test): |
15 test = PicaMeasurement | 20 test = PicaMeasurement |
16 page_set = 'page_sets/pica.json' | 21 page_set = 'page_sets/pica.json' |
OLD | NEW |