Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: tools/perf/perf_tools/image_decoding_benchmark_unittest.py

Issue 11881022: Telemetry: adds ImageDecodingBenchmarkUnitTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/telemetry/unittest_data/image_decoding.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 from telemetry import multi_page_benchmark_unittest_base 5 from telemetry import multi_page_benchmark_unittest_base
5 from perf_tools import loading_benchmark 6 from perf_tools import image_decoding_benchmark
6 7
7 class SmoothnessBenchmarkUnitTest( 8
9 class ImageDecodingBenchmarkUnitTest(
8 multi_page_benchmark_unittest_base.MultiPageBenchmarkUnitTestBase): 10 multi_page_benchmark_unittest_base.MultiPageBenchmarkUnitTestBase):
9 11
10 def testBasicFunctionality(self): 12 def testImageDecodingMeasurement(self):
11 ps = self.CreatePageSetFromFileInUnittestDataDir('blank.html') 13 ps = self.CreatePageSetFromFileInUnittestDataDir('image_decoding.html')
12 14
13 benchmark = loading_benchmark.LoadingBenchmark() 15 benchmark = image_decoding_benchmark.ImageDecoding()
14 all_results = self.RunBenchmark(benchmark, ps) 16 all_results = self.RunBenchmark(benchmark, ps)
15 17
16 self.assertEqual(0, len(all_results.page_failures)) 18 self.assertEqual(0, len(all_results.page_failures))
17 self.assertEqual(1, len(all_results.page_results)) 19 self.assertEqual(1, len(all_results.page_results))
18 20
19 results0 = all_results.page_results[0] 21 results0 = all_results.page_results[0]
20 self.assertTrue(results0['Layout'].value > 0) 22 self.assertTrue('ImageDecoding_avg' in results0)
21 self.assertTrue(results0['Paint'].value > 0) 23 self.assertGreater(results0['ImageDecoding_avg'], 0)
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/unittest_data/image_decoding.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698