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

Side by Side Diff: tools/perf/measurements/multipage_skpicture_printer.py

Issue 2719853003: [Telemetry refactor] Drop "2" from method calls to JS API (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/image_decoding.py ('k') | tools/perf/measurements/oilpan_gc_times.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 import os 4 import os
5 5
6 from telemetry.page import legacy_page_test 6 from telemetry.page import legacy_page_test
7 7
8 8
9 class MultipageSkpicturePrinter(legacy_page_test.LegacyPageTest): 9 class MultipageSkpicturePrinter(legacy_page_test.LegacyPageTest):
10 10
11 def __init__(self, mskp_outdir): 11 def __init__(self, mskp_outdir):
12 super(MultipageSkpicturePrinter, self).__init__() 12 super(MultipageSkpicturePrinter, self).__init__()
13 self._mskp_outdir = mskp_outdir 13 self._mskp_outdir = mskp_outdir
14 14
15 def CustomizeBrowserOptions(self, options): 15 def CustomizeBrowserOptions(self, options):
16 options.AppendExtraBrowserArgs(['--enable-gpu-benchmarking', 16 options.AppendExtraBrowserArgs(['--enable-gpu-benchmarking',
17 '--no-sandbox', 17 '--no-sandbox',
18 '--enable-deferred-image-decoding']) 18 '--enable-deferred-image-decoding'])
19 19
20 def ValidateAndMeasurePage(self, page, tab, results): 20 def ValidateAndMeasurePage(self, page, tab, results):
21 if tab.browser.platform.GetOSName() in ['android', 'chromeos']: 21 if tab.browser.platform.GetOSName() in ['android', 'chromeos']:
22 raise legacy_page_test.MeasurementFailure( 22 raise legacy_page_test.MeasurementFailure(
23 'Multipage SkPicture printing not supported on this platform') 23 'Multipage SkPicture printing not supported on this platform')
24 24
25 outpath = os.path.abspath( 25 outpath = os.path.abspath(
26 os.path.join(self._mskp_outdir, page.file_safe_name + '.mskp')) 26 os.path.join(self._mskp_outdir, page.file_safe_name + '.mskp'))
27 # Replace win32 path separator char '\' with '\\'. 27 # Replace win32 path separator char '\' with '\\'.
28 outpath = outpath.replace('\\', '\\\\') 28 outpath = outpath.replace('\\', '\\\\')
29 tab.EvaluateJavaScript2( 29 tab.EvaluateJavaScript(
30 'chrome.gpuBenchmarking.printPagesToSkPictures({{ outpath }});', 30 'chrome.gpuBenchmarking.printPagesToSkPictures({{ outpath }});',
31 outpath=outpath) 31 outpath=outpath)
OLDNEW
« no previous file with comments | « tools/perf/measurements/image_decoding.py ('k') | tools/perf/measurements/oilpan_gc_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698