OLD | NEW |
1 # Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2010, 2012 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 # the object is safe. | 119 # the object is safe. |
120 printer, err = self.get_printer() | 120 printer, err = self.get_printer() |
121 printer.cleanup() | 121 printer.cleanup() |
122 printer.cleanup() | 122 printer.cleanup() |
123 printer = None | 123 printer = None |
124 | 124 |
125 def test_print_config(self): | 125 def test_print_config(self): |
126 printer, err = self.get_printer() | 126 printer, err = self.get_printer() |
127 # FIXME: it's lame that i have to set these options directly. | 127 # FIXME: it's lame that i have to set these options directly. |
128 printer._options.pixel_tests = True | 128 printer._options.pixel_tests = True |
129 printer._options.enable_versioned_results = True | |
130 printer._options.new_baseline = True | 129 printer._options.new_baseline = True |
131 printer._options.time_out_ms = 6000 | 130 printer._options.time_out_ms = 6000 |
132 printer._options.slow_time_out_ms = 12000 | 131 printer._options.slow_time_out_ms = 12000 |
133 printer.print_config('/tmp') | 132 printer.print_config('/tmp') |
134 self.assertIn("Using port 'test-mac-leopard'", err.getvalue()) | 133 self.assertIn("Using port 'test-mac-leopard'", err.getvalue()) |
135 self.assertIn('Test configuration: <leopard, x86, release>', err.getvalu
e()) | 134 self.assertIn('Test configuration: <leopard, x86, release>', err.getvalu
e()) |
136 self.assertIn('View the test results at file:///tmp', err.getvalue()) | 135 self.assertIn('View the test results at file:///tmp', err.getvalue()) |
137 self.assertIn('View the archived results dashboard at file:///tmp', err.
getvalue()) | 136 self.assertIn('View the archived results dashboard at file:///tmp', err.
getvalue()) |
138 self.assertIn('Baseline search path: test-mac-leopard -> test-mac-snowle
opard -> generic', err.getvalue()) | 137 self.assertIn('Baseline search path: test-mac-leopard -> test-mac-snowle
opard -> generic', err.getvalue()) |
139 self.assertIn('Using Release build', err.getvalue()) | 138 self.assertIn('Using Release build', err.getvalue()) |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') | 242 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') |
244 | 243 |
245 printer.print_started_test('passes/text.html') | 244 printer.print_started_test('passes/text.html') |
246 result = self.get_result('passes/text.html') | 245 result = self.get_result('passes/text.html') |
247 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') | 246 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') |
248 | 247 |
249 # Only the first test's start should be printed. | 248 # Only the first test's start should be printed. |
250 lines = err.buflist | 249 lines = err.buflist |
251 self.assertEqual(len(lines), 1) | 250 self.assertEqual(len(lines), 1) |
252 self.assertTrue(lines[0].endswith('passes/image.html\n')) | 251 self.assertTrue(lines[0].endswith('passes/image.html\n')) |
OLD | NEW |