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 | 4 |
5 import logging | 5 import logging |
6 | 6 |
7 from measurements import rasterize_and_record_micro | 7 from measurements import rasterize_and_record_micro |
8 from telemetry.core import wpr_modes | 8 from telemetry.core import wpr_modes |
9 from telemetry.page import page_test | 9 from telemetry.page import page_test |
10 from telemetry.testing import page_test_test_case | 10 from telemetry.unittest import options_for_unittests |
| 11 from telemetry.unittest import page_test_test_case |
11 from telemetry.unittest import test | 12 from telemetry.unittest import test |
12 from telemetry.unittest import options_for_unittests | |
13 | 13 |
14 | 14 |
15 class RasterizeAndRecordMicroUnitTest(page_test_test_case.PageTestTestCase): | 15 class RasterizeAndRecordMicroUnitTest(page_test_test_case.PageTestTestCase): |
16 """Smoke test for rasterize_and_record_micro measurement | 16 """Smoke test for rasterize_and_record_micro measurement |
17 | 17 |
18 Runs rasterize_and_record_micro measurement on a simple page and verifies | 18 Runs rasterize_and_record_micro measurement on a simple page and verifies |
19 that all metrics were added to the results. The test is purely functional, | 19 that all metrics were added to the results. The test is purely functional, |
20 i.e. it only checks if the metrics are present and non-zero. | 20 i.e. it only checks if the metrics are present and non-zero. |
21 """ | 21 """ |
22 | 22 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 total_picture_layers_with_no_content[0].GetRepresentativeNumber(), 0) | 86 total_picture_layers_with_no_content[0].GetRepresentativeNumber(), 0) |
87 | 87 |
88 total_picture_layers_off_screen = \ | 88 total_picture_layers_off_screen = \ |
89 results.FindAllPageSpecificValuesNamed( | 89 results.FindAllPageSpecificValuesNamed( |
90 'total_picture_layers_off_screen') | 90 'total_picture_layers_off_screen') |
91 self.assertEquals(len(total_picture_layers_off_screen), 1) | 91 self.assertEquals(len(total_picture_layers_off_screen), 1) |
92 self.assertEqual( | 92 self.assertEqual( |
93 total_picture_layers_off_screen[0].GetRepresentativeNumber(), 0) | 93 total_picture_layers_off_screen[0].GetRepresentativeNumber(), 0) |
94 | 94 |
95 | 95 |
OLD | NEW |