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

Side by Side Diff: tools/perf/metrics/test_page_test_results.py

Issue 926833002: [Telemetry] Move gpu_timeline metrics to telemetry.web_perf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/metrics/gpu_timeline_unittest.py ('k') | tools/perf/metrics/timeline_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 from telemetry.page import page as page_module
6 from telemetry.results import page_test_results
7 from telemetry.value import scalar
8
9
10 class TestPageTestResults(
11 page_test_results.PageTestResults):
12 def __init__(self, test):
13 super(TestPageTestResults, self).__init__()
14 self.test = test
15 page = page_module.Page("http://www.google.com", {})
16 self.WillRunPage(page)
17
18 def GetPageSpecificValueNamed(self, name):
19 values = [value for value in self.all_page_specific_values
20 if value.name == name]
21 assert len(values) == 1, 'Could not find value named %s' % name
22 return values[0]
23
24 def AssertHasPageSpecificScalarValue(self, name, units, expected_value):
25 value = self.GetPageSpecificValueNamed(name)
26 self.test.assertEquals(units, value.units)
27 self.test.assertTrue(isinstance(value, scalar.ScalarValue))
28 self.test.assertEquals(expected_value, value.value)
29
30 def __str__(self):
31 return '\n'.join([repr(x) for x in self.all_page_specific_values])
OLDNEW
« no previous file with comments | « tools/perf/metrics/gpu_timeline_unittest.py ('k') | tools/perf/metrics/timeline_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698