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

Side by Side Diff: tools/gpu/gpu_tools/first_paint_time_benchmark_unittest.py

Issue 10916227: More polish in prep for CrOS support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 8 years, 3 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
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 import first_paint_time_benchmark 4 import first_paint_time_benchmark
5 import multi_page_benchmark 5 import multi_page_benchmark
6 6
7 class FirstPaintTimeBenchmarkUnitTest( 7 class FirstPaintTimeBenchmarkUnitTest(
8 multi_page_benchmark.MultiPageBenchmarkUnitTest): 8 multi_page_benchmark.MultiPageBenchmarkUnitTest):
9 9
10 def testBasicFunctionality(self): 10 def testFirstPaintTimeMeasurement(self):
11 ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html') 11 ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html')
12 12
13 benchmark = first_paint_time_benchmark.FirstPaintTimeBenchmark() 13 benchmark = first_paint_time_benchmark.FirstPaintTimeBenchmark()
14 rows = self.RunBenchmark(benchmark, ps) 14 rows = self.RunBenchmark(benchmark, ps)
15 15
16 self.assertEqual(0, len(benchmark.page_failures)) 16 self.assertEqual(0, len(benchmark.page_failures))
17 17
18 header = rows[0] 18 header = rows[0]
19 results = rows[1:] 19 results = rows[1:]
20 self.assertEqual(['url', 'first_paint_secs'], 20 self.assertEqual(['url', 'first_paint_secs'],
21 header) 21 header)
22 self.assertEqual(1, len(results)) 22 self.assertEqual(1, len(results))
23 self.assertTrue('scrollable_page.html' in results[0][0]) 23 self.assertTrue('scrollable_page.html' in results[0][0])
24 if results[0][1] == "unsupported":
25 # This test can't run on content_shell.
26 return
24 self.assertTrue(results[0][1] > 0) 27 self.assertTrue(results[0][1] > 0)
OLDNEW
« no previous file with comments | « tools/gpu/gpu_tools/first_paint_time_benchmark.py ('k') | tools/gpu/gpu_tools/multi_page_benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698