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

Side by Side Diff: trunk/src/tools/telemetry/telemetry/page/html_page_measurement_results_unittest.py

Issue 60233004: Revert 232959 "[Telemetry] Fix image_decoding_measurement timeout." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/tools/telemetry/telemetry/core/util.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 os 4 import os
5 import StringIO 5 import StringIO
6 import unittest 6 import unittest
7 7
8 from telemetry.page import html_page_measurement_results 8 from telemetry.page import html_page_measurement_results
9 from telemetry.page import page_set 9 from telemetry.page import page_set
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 32
33 # Wrap string IO with a .name property so that it behaves more like a file. 33 # Wrap string IO with a .name property so that it behaves more like a file.
34 class StringIOFile(StringIO.StringIO): 34 class StringIOFile(StringIO.StringIO):
35 name = 'fake_output_file' 35 name = 'fake_output_file'
36 36
37 37
38 class HtmlPageMeasurementResultsTest(unittest.TestCase): 38 class HtmlPageMeasurementResultsTest(unittest.TestCase):
39 39
40 # TODO(tonyg): Remove this backfill when we can assume python 2.7 everywhere. 40 # TODO(tonyg): Remove this backfill when we can assume python 2.7 everywhere.
41 def assertIn(self, first, second, _=None): 41 def assertIn(self, first, second, msg=None):
42 self.assertTrue(first in second, 42 self.assertTrue(first in second,
43 msg="'%s' not found in '%s'" % (first, second)) 43 msg="'%s' not found in '%s'" % (first, second))
44 44
45 def test_basic_summary(self): 45 def test_basic_summary(self):
46 test_page_set = _MakePageSet() 46 test_page_set = _MakePageSet()
47 output_file = StringIOFile() 47 output_file = StringIOFile()
48 48
49 # Run the first time and verify the results are written to the HTML file. 49 # Run the first time and verify the results are written to the HTML file.
50 results = DeterministicHtmlPageMeasurementResults( 50 results = DeterministicHtmlPageMeasurementResults(
51 output_file, 'test_name', False, False, 'browser_type') 51 output_file, 'test_name', False, False, 'browser_type')
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 '"important": false' 238 '"important": false'
239 '}' 239 '}'
240 '}' 240 '}'
241 '}' 241 '}'
242 '}, ' 242 '}, '
243 '"revision": "revision"' 243 '"revision": "revision"'
244 '}]' 244 '}]'
245 '</script>') 245 '</script>')
246 self.assertIn(expected, output_file.getvalue()) 246 self.assertIn(expected, output_file.getvalue())
247 self.assertTrue(len(output_file.getvalue()) < last_output_len) 247 self.assertTrue(len(output_file.getvalue()) < last_output_len)
OLDNEW
« no previous file with comments | « trunk/src/tools/telemetry/telemetry/core/util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698