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

Side by Side Diff: tools/perf/measurements/blink_style_unittest.py

Issue 1115383002: Disable failing telemetry unit tests on chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perf2 Created 5 years, 7 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 measurements import blink_style 5 from measurements import blink_style
6 6
7 from telemetry import decorators
7 from telemetry.unittest_util import options_for_unittests 8 from telemetry.unittest_util import options_for_unittests
8 from telemetry.unittest_util import page_test_test_case 9 from telemetry.unittest_util import page_test_test_case
9 10
10 11
11 class BlinkStyleTest(page_test_test_case.PageTestTestCase): 12 class BlinkStyleTest(page_test_test_case.PageTestTestCase):
12 """Smoke test for Bink Style measurements. 13 """Smoke test for Bink Style measurements.
13 14
14 Runs BlinkStyle measurement on some simple pages and verifies 15 Runs BlinkStyle measurement on some simple pages and verifies
15 that expected metrics were added to the results. The test is purely 16 that expected metrics were added to the results. The test is purely
16 functional, i.e. it only checks if the metrics are present and non-zero. 17 functional, i.e. it only checks if the metrics are present and non-zero.
17 """ 18 """
18 19
19 def setUp(self): 20 def setUp(self):
20 self._options = options_for_unittests.GetCopy() 21 self._options = options_for_unittests.GetCopy()
21 22
23 @decorators.Disabled('chromeos') # crbug.com/483212
22 def testForParsing(self): 24 def testForParsing(self):
23 ps = self.CreatePageSetFromFileInUnittestDataDir('blink_style.html') 25 ps = self.CreatePageSetFromFileInUnittestDataDir('blink_style.html')
24 measurement = blink_style.BlinkStyle() 26 measurement = blink_style.BlinkStyle()
25 results = self.RunMeasurement(measurement, ps, options=self._options) 27 results = self.RunMeasurement(measurement, ps, options=self._options)
26 self.assertEquals(0, len(results.failures)) 28 self.assertEquals(0, len(results.failures))
27 29
28 def getMetric(results, name): 30 def getMetric(results, name):
29 metrics = results.FindAllPageSpecificValuesNamed(name) 31 metrics = results.FindAllPageSpecificValuesNamed(name)
30 self.assertEquals(1, len(metrics)) 32 self.assertEquals(1, len(metrics))
31 return metrics[0].value 33 return metrics[0].value
32 34
33 self.assertGreater(getMetric(results, 'parse_css_regular'), 0) 35 self.assertGreater(getMetric(results, 'parse_css_regular'), 0)
34 self.assertGreater(getMetric(results, 'tokenize_css_regular'), 0) 36 self.assertGreater(getMetric(results, 'tokenize_css_regular'), 0)
35 self.assertGreater(getMetric(results, 'update_style'), 0) 37 self.assertGreater(getMetric(results, 'update_style'), 0)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698