| 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 benchmarks import media_router_dialog_metric | 5 from benchmarks import media_router_dialog_metric |
| 6 from benchmarks import media_router_cpu_memory_metric | 6 from benchmarks import media_router_cpu_memory_metric |
| 7 from telemetry.page import page_test | 7 from telemetry.page import legacy_page_test |
| 8 | 8 |
| 9 | 9 |
| 10 class MediaRouterDialogTest(page_test.PageTest): | 10 class MediaRouterDialogTest(legacy_page_test.LegacyPageTest): |
| 11 """Performs a measurement of Media Route dialog latency.""" | 11 """Performs a measurement of Media Route dialog latency.""" |
| 12 | 12 |
| 13 def __init__(self): | 13 def __init__(self): |
| 14 super(MediaRouterDialogTest, self).__init__() | 14 super(MediaRouterDialogTest, self).__init__() |
| 15 self._metric = media_router_dialog_metric.MediaRouterDialogMetric() | 15 self._metric = media_router_dialog_metric.MediaRouterDialogMetric() |
| 16 | 16 |
| 17 def DidNavigateToPage(self, page, tab): | 17 def DidNavigateToPage(self, page, tab): |
| 18 self._metric.Start(page, tab) | 18 self._metric.Start(page, tab) |
| 19 | 19 |
| 20 def ValidateAndMeasurePage(self, page, tab, results): | 20 def ValidateAndMeasurePage(self, page, tab, results): |
| 21 self._metric.Stop(page, tab) | 21 self._metric.Stop(page, tab) |
| 22 self._metric.AddResults(tab, results) | 22 self._metric.AddResults(tab, results) |
| 23 | 23 |
| 24 | 24 |
| 25 class MediaRouterCPUMemoryTest(page_test.PageTest): | 25 class MediaRouterCPUMemoryTest(legacy_page_test.LegacyPageTest): |
| 26 """Performs a measurement of Media Route CPU/memory usage.""" | 26 """Performs a measurement of Media Route CPU/memory usage.""" |
| 27 | 27 |
| 28 def __init__(self): | 28 def __init__(self): |
| 29 super(MediaRouterCPUMemoryTest, self).__init__() | 29 super(MediaRouterCPUMemoryTest, self).__init__() |
| 30 self._metric = media_router_cpu_memory_metric.MediaRouterCPUMemoryMetric() | 30 self._metric = media_router_cpu_memory_metric.MediaRouterCPUMemoryMetric() |
| 31 | 31 |
| 32 def ValidateAndMeasurePage(self, page, tab, results): | 32 def ValidateAndMeasurePage(self, page, tab, results): |
| 33 self._metric.AddResults(tab, results) | 33 self._metric.AddResults(tab, results) |
| OLD | NEW |