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

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

Issue 11783056: [telemetry] More fixes for my page_test_result rewrite (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/perf/perf_tools/smoothness_benchmark_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 import os 5 import os
6 import tempfile 6 import tempfile
7 import shutil 7 import shutil
8 8
9 from telemetry import multi_page_benchmark_unittest_base 9 from telemetry import multi_page_benchmark_unittest_base
10 from telemetry import options_for_unittests 10 from telemetry import options_for_unittests
(...skipping 14 matching lines...) Expand all
25 25
26 def testPrintToSkPicture(self): 26 def testPrintToSkPicture(self):
27 ps = self.CreatePageSetFromFileInUnittestDataDir('non_scrollable_page.html') 27 ps = self.CreatePageSetFromFileInUnittestDataDir('non_scrollable_page.html')
28 printer = skpicture_printer.SkPicturePrinter() 28 printer = skpicture_printer.SkPicturePrinter()
29 all_results = self.RunBenchmark(printer, ps, options=self._options) 29 all_results = self.RunBenchmark(printer, ps, options=self._options)
30 30
31 self.assertEqual(0, len(all_results.page_failures)) 31 self.assertEqual(0, len(all_results.page_failures))
32 self.assertEqual(1, len(all_results.page_results)) 32 self.assertEqual(1, len(all_results.page_results))
33 results0 = all_results.page_results[0] 33 results0 = all_results.page_results[0]
34 34
35 outdir = results0['output_path'] 35 outdir = results0['output_path'].value
36 self.assertTrue('non_scrollable_page_html' in outdir) 36 self.assertTrue('non_scrollable_page_html' in outdir)
37 self.assertTrue(os.path.isdir(outdir)) 37 self.assertTrue(os.path.isdir(outdir))
38 self.assertEqual(['layer_0.skp'], os.listdir(outdir)) 38 self.assertEqual(['layer_0.skp'], os.listdir(outdir))
39 39
40 skp_file = os.path.join(outdir, 'layer_0.skp') 40 skp_file = os.path.join(outdir, 'layer_0.skp')
41 self.assertTrue(os.path.isfile(skp_file)) 41 self.assertTrue(os.path.isfile(skp_file))
42 self.assertTrue(os.path.getsize(skp_file) > 0) 42 self.assertTrue(os.path.getsize(skp_file) > 0)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/perf_tools/smoothness_benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698