OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from measurements import smoothness | 4 from measurements import smoothness |
5 from telemetry.core import wpr_modes | 5 from telemetry.core import wpr_modes |
6 from telemetry.page import page_measurement_unittest_base | 6 from telemetry.page import page_measurement_unittest_base |
7 from telemetry.unittest import options_for_unittests | 7 from telemetry.unittest import options_for_unittests |
8 | 8 |
9 class SmoothnessUnitTest( | 9 class SmoothnessUnitTest( |
10 page_measurement_unittest_base.PageMeasurementUnitTestBase): | 10 page_measurement_unittest_base.PageMeasurementUnitTestBase): |
(...skipping 22 matching lines...) Expand all Loading... |
33 self.assertEquals(len(mean_frame_time), 1) | 33 self.assertEquals(len(mean_frame_time), 1) |
34 self.assertGreater(mean_frame_time[0].GetRepresentativeNumber(), 0) | 34 self.assertGreater(mean_frame_time[0].GetRepresentativeNumber(), 0) |
35 | 35 |
36 jank = results.FindAllPageSpecificValuesNamed('jank') | 36 jank = results.FindAllPageSpecificValuesNamed('jank') |
37 self.assertEquals(len(jank), 1) | 37 self.assertEquals(len(jank), 1) |
38 self.assertGreater(jank[0].GetRepresentativeNumber(), 0) | 38 self.assertGreater(jank[0].GetRepresentativeNumber(), 0) |
39 | 39 |
40 mostly_smooth = results.FindAllPageSpecificValuesNamed('mostly_smooth') | 40 mostly_smooth = results.FindAllPageSpecificValuesNamed('mostly_smooth') |
41 self.assertEquals(len(mostly_smooth), 1) | 41 self.assertEquals(len(mostly_smooth), 1) |
42 self.assertGreaterEqual(mostly_smooth[0].GetRepresentativeNumber(), 0) | 42 self.assertGreaterEqual(mostly_smooth[0].GetRepresentativeNumber(), 0) |
| 43 |
| 44 mean_mouse_wheel_latency = results.FindAllPageSpecificValuesNamed( |
| 45 'mean_mouse_wheel_latency') |
| 46 if mean_mouse_wheel_latency: |
| 47 self.assertEquals(len(mean_mouse_wheel_latency), 1) |
| 48 self.assertGreater( |
| 49 mean_mouse_wheel_latency[0].GetRepresentativeNumber(), 0) |
| 50 |
| 51 mean_touch_scroll_latency = results.FindAllPageSpecificValuesNamed( |
| 52 'mean_touch_scroll_latency') |
| 53 if mean_touch_scroll_latency: |
| 54 self.assertEquals(len(mean_touch_scroll_latency), 1) |
| 55 self.assertGreater( |
| 56 mean_touch_scroll_latency[0].GetRepresentativeNumber(), 0) |
OLD | NEW |