OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 telemetry import multi_page_benchmark_unittest_base | 5 from telemetry.page import multi_page_benchmark_unittest_base |
6 # from perf_tools import image_decoding_benchmark | 6 # from perf_tools import image_decoding_benchmark |
7 | 7 |
8 | 8 |
9 class ImageDecodingBenchmarkUnitTest( | 9 class ImageDecodingBenchmarkUnitTest( |
10 multi_page_benchmark_unittest_base.MultiPageBenchmarkUnitTestBase): | 10 multi_page_benchmark_unittest_base.MultiPageBenchmarkUnitTestBase): |
11 | 11 |
12 def testImageDecodingMeasurement(self): | 12 def testImageDecodingMeasurement(self): |
13 # TODO(qinmin): uncomment this after we fix the image decoding benchmark | 13 # TODO(qinmin): uncomment this after we fix the image decoding benchmark |
14 # for lazily decoded images | 14 # for lazily decoded images |
15 return | 15 return |
16 # ps = self.CreatePageSetFromFileInUnittestDataDir('image_decoding.html') | 16 # ps = self.CreatePageSetFromFileInUnittestDataDir('image_decoding.html') |
17 | 17 |
18 # benchmark = image_decoding_benchmark.ImageDecoding() | 18 # benchmark = image_decoding_benchmark.ImageDecoding() |
19 # all_results = self.RunBenchmark(benchmark, ps) | 19 # all_results = self.RunBenchmark(benchmark, ps) |
20 | 20 |
21 # self.assertEqual(0, len(all_results.page_failures)) | 21 # self.assertEqual(0, len(all_results.page_failures)) |
22 # self.assertEqual(1, len(all_results.page_results)) | 22 # self.assertEqual(1, len(all_results.page_results)) |
23 | 23 |
24 # results0 = all_results.page_results[0] | 24 # results0 = all_results.page_results[0] |
25 # self.assertTrue('ImageDecoding_avg' in results0) | 25 # self.assertTrue('ImageDecoding_avg' in results0) |
26 # self.assertTrue(results0['ImageDecoding_avg'] > 0) | 26 # self.assertTrue(results0['ImageDecoding_avg'] > 0) |
OLD | NEW |