[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / tools / perf / benchmarks / skpicture_printer.py
blob0247320f3135fc28a4620b21e1e8fcdacbb0f5a3
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 from core import perf_benchmark
7 from telemetry import benchmark
8 from telemetry.core import discover
9 from telemetry import story
11 from measurements import skpicture_printer
14 def _MatchPageSetName(story_set_name, story_set_base_dir):
15 story_sets = discover.DiscoverClasses(story_set_base_dir, story_set_base_dir,
16 story.StorySet).values()
17 for s in story_sets:
18 if story_set_name == s.Name():
19 return s
20 return None
23 @benchmark.Disabled
24 class SkpicturePrinter(perf_benchmark.PerfBenchmark):
25 @classmethod
26 def AddBenchmarkCommandLineArgs(cls, parser):
27 parser.add_option('--page-set-name', action='store', type='string')
28 parser.add_option('--page-set-base-dir', action='store', type='string')
29 parser.add_option('-s', '--skp-outdir',
30 help='Output directory for the SKP files')
31 @classmethod
32 def ProcessCommandLineArgs(cls, parser, args):
33 if not args.page_set_name:
34 parser.error('Please specify --page-set-name')
35 if not args.page_set_base_dir:
36 parser.error('Please specify --page-set-base-dir')
37 if not args.skp_outdir:
38 parser.error('Please specify --skp-outdir')
40 @classmethod
41 def Name(cls):
42 return 'skpicture_printer'
44 def CreatePageTest(self, options):
45 return skpicture_printer.SkpicturePrinter(options.skp_outdir)
47 def CreateStorySet(self, options):
48 story_set_class = _MatchPageSetName(options.page_set_name,
49 options.page_set_base_dir)
50 return story_set_class()