Port Android relocation packer to chromium build
[chromium-blink-merge.git] / tools / perf / measurements / power.py
blob2552539cf85c6c80cbb715f87d5de55a3f90638d
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 telemetry.page import page_test
7 from metrics import power
10 class Power(page_test.PageTest):
11 def __init__(self):
12 super(Power, self).__init__()
13 self._power_metric = None
15 def WillStartBrowser(self, platform):
16 self._power_metric = power.PowerMetric(platform)
18 def DidNavigateToPage(self, page, tab):
19 self._power_metric.Start(page, tab)
21 def ValidateAndMeasurePage(self, page, tab, results):
22 self._power_metric.Stop(page, tab)
23 self._power_metric.AddResults(tab, results)