Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / tools / perf / perf_tools / image_decoding_benchmark_unittest.py
blob1bbe27dabb9b3cf1338e7e0f075d0b8a4e361f09
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
3 # found in the LICENSE file.
5 from telemetry.page import page_benchmark_unittest_base
6 from perf_tools import image_decoding_benchmark
9 class ImageDecodingBenchmarkUnitTest(
10 page_benchmark_unittest_base.PageBenchmarkUnitTestBase):
12 def testImageDecodingMeasurement(self):
13 ps = self.CreatePageSetFromFileInUnittestDataDir('image_decoding.html')
15 benchmark = image_decoding_benchmark.ImageDecoding()
16 all_results = self.RunBenchmark(benchmark, ps)
18 self.assertEqual(0, len(all_results.page_failures))
19 self.assertEqual(1, len(all_results.page_results))
21 results0 = all_results.page_results[0]
22 self.assertTrue('ImageDecoding_avg' in results0)
23 self.assertTrue(results0['ImageDecoding_avg'] > 0)