OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 oilpan_gc_times | 5 from measurements import oilpan_gc_times |
| 6 from telemetry import decorators |
6 from telemetry.core import wpr_modes | 7 from telemetry.core import wpr_modes |
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 class OilpanGCTimesTest(page_test_test_case.PageTestTestCase): | 11 class OilpanGCTimesTest(page_test_test_case.PageTestTestCase): |
11 """Smoke test for Oilpan GC pause time measurements. | 12 """Smoke test for Oilpan GC pause time measurements. |
12 | 13 |
13 Runs OilpanGCTimes measurement on some simple pages and verifies | 14 Runs OilpanGCTimes measurement on some simple pages and verifies |
14 that all metrics were added to the results. The test is purely functional, | 15 that all metrics were added to the results. The test is purely functional, |
15 i.e. it only checks if the metrics are present and non-zero. | 16 i.e. it only checks if the metrics are present and non-zero. |
16 """ | 17 """ |
17 def setUp(self): | 18 def setUp(self): |
18 self._options = options_for_unittests.GetCopy() | 19 self._options = options_for_unittests.GetCopy() |
19 | 20 |
| 21 @decorators.Disabled |
20 def testForSmoothness(self): | 22 def testForSmoothness(self): |
21 ps = self.CreatePageSetFromFileInUnittestDataDir('create_many_objects.html') | 23 ps = self.CreatePageSetFromFileInUnittestDataDir('create_many_objects.html') |
22 measurement = oilpan_gc_times.OilpanGCTimesForSmoothness() | 24 measurement = oilpan_gc_times.OilpanGCTimesForSmoothness() |
23 results = self.RunMeasurement(measurement, ps, options=self._options) | 25 results = self.RunMeasurement(measurement, ps, options=self._options) |
24 self.assertEquals(0, len(results.failures)) | 26 self.assertEquals(0, len(results.failures)) |
25 | 27 |
26 precise_mark = results.FindAllPageSpecificValuesNamed('oilpan_precise_mark') | 28 precise_mark = results.FindAllPageSpecificValuesNamed('oilpan_precise_mark') |
27 self.assertLess(0, len(precise_mark)) | 29 self.assertLess(0, len(precise_mark)) |
28 | 30 |
| 31 @decorators.Disabled |
29 def testForBlinkPerf(self): | 32 def testForBlinkPerf(self): |
30 ps = self.CreatePageSetFromFileInUnittestDataDir('create_many_objects.html') | 33 ps = self.CreatePageSetFromFileInUnittestDataDir('create_many_objects.html') |
31 measurement = oilpan_gc_times.OilpanGCTimesForBlinkPerf() | 34 measurement = oilpan_gc_times.OilpanGCTimesForBlinkPerf() |
32 results = self.RunMeasurement(measurement, ps, options=self._options) | 35 results = self.RunMeasurement(measurement, ps, options=self._options) |
33 self.assertEquals(0, len(results.failures)) | 36 self.assertEquals(0, len(results.failures)) |
34 | 37 |
35 precise_mark = results.FindAllPageSpecificValuesNamed('oilpan_precise_mark') | 38 precise_mark = results.FindAllPageSpecificValuesNamed('oilpan_precise_mark') |
36 self.assertLess(0, len(precise_mark)) | 39 self.assertLess(0, len(precise_mark)) |
OLD | NEW |