OLD | NEW |
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 | 4 |
5 from core import perf_benchmark | 5 from core import perf_benchmark |
6 from telemetry.timeline import chrome_trace_category_filter | 6 from telemetry.timeline import chrome_trace_category_filter |
7 from telemetry.web_perf import timeline_based_measurement | 7 from telemetry.web_perf import timeline_based_measurement |
8 import page_sets | 8 import page_sets |
9 from telemetry import benchmark | 9 from telemetry import benchmark |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 @classmethod | 30 @classmethod |
31 def ShouldDisable(cls, possible_browser): | 31 def ShouldDisable(cls, possible_browser): |
32 return not possible_browser.platform.HasBattOrConnected() | 32 return not possible_browser.platform.HasBattOrConnected() |
33 | 33 |
34 @classmethod | 34 @classmethod |
35 def ShouldTearDownStateAfterEachStoryRun(cls): | 35 def ShouldTearDownStateAfterEachStoryRun(cls): |
36 return True | 36 return True |
37 | 37 |
38 | 38 |
39 # android: See battor.android.tough_video_cases below | |
40 # win8: crbug.com/531618 | |
41 # crbug.com/565180: Only include cases that report time_to_play | |
42 # Taken directly from media benchmark. | |
43 @benchmark.Disabled('android', 'win8') | |
44 @benchmark.Owner(emails=['charliea@chromium.org']) | |
45 class BattOrToughVideoCases(_BattOrBenchmark): | |
46 """Obtains media metrics for key user scenarios.""" | |
47 page_set = page_sets.ToughVideoCasesPageSet | |
48 | |
49 @classmethod | |
50 def Name(cls): | |
51 return 'battor.tough_video_cases' | |
52 | |
53 | |
54 @benchmark.Enabled('mac') | 39 @benchmark.Enabled('mac') |
55 @benchmark.Owner(emails=['charliea@chromium.org']) | 40 @benchmark.Owner(emails=['charliea@chromium.org']) |
56 class BattOrTrivialPages(_BattOrBenchmark): | 41 class BattOrTrivialPages(_BattOrBenchmark): |
57 | 42 |
58 def CreateStorySet(self, options): | 43 def CreateStorySet(self, options): |
59 # We want it to wait for 30 seconds to be comparable to legacy power tests. | 44 # We want it to wait for 30 seconds to be comparable to legacy power tests. |
60 return page_sets.TrivialSitesStorySet(wait_in_seconds=30) | 45 return page_sets.TrivialSitesStorySet(wait_in_seconds=30) |
61 | 46 |
62 @classmethod | 47 @classmethod |
63 def Name(cls): | 48 def Name(cls): |
64 return 'battor.trivial_pages' | 49 return 'battor.trivial_pages' |
65 | 50 |
66 @benchmark.Enabled('mac') | 51 @benchmark.Enabled('mac') |
67 @benchmark.Owner(emails=['charliea@chromium.org']) | 52 @benchmark.Owner(emails=['charliea@chromium.org']) |
68 class BattOrSteadyStatePages(_BattOrBenchmark): | 53 class BattOrSteadyStatePages(_BattOrBenchmark): |
69 | 54 |
70 def CreateStorySet(self, options): | 55 def CreateStorySet(self, options): |
71 # We want it to wait for 30 seconds to be comparable to legacy power tests. | 56 # We want it to wait for 30 seconds to be comparable to legacy power tests. |
72 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) | 57 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) |
73 | 58 |
74 @classmethod | 59 @classmethod |
75 def Name(cls): | 60 def Name(cls): |
76 return 'battor.steady_state' | 61 return 'battor.steady_state' |
OLD | NEW |