OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 exception_raised = False | 221 exception_raised = False |
222 try: | 222 try: |
223 port.diff_image("EXPECTED", "ACTUAL") | 223 port.diff_image("EXPECTED", "ACTUAL") |
224 except ValueError, e: | 224 except ValueError, e: |
225 exception_raised = True | 225 exception_raised = True |
226 self.assertFalse(exception_raised) | 226 self.assertFalse(exception_raised) |
227 | 227 |
228 def test_diff_image_crashed(self): | 228 def test_diff_image_crashed(self): |
229 port = self.make_port() | 229 port = self.make_port() |
230 port._executive = MockExecutive2(exit_code=2) | 230 port._executive = MockExecutive2(exit_code=2) |
231 self.assertEqual(port.diff_image("EXPECTED", "ACTUAL"), (None, 'image di
ff returned an exit code of 2')) | 231 self.assertEqual(port.diff_image("EXPECTED", "ACTUAL"), (None, 'Image di
ff returned an exit code of 2. See http://crbug.com/278596')) |
232 | 232 |
233 def test_check_wdiff(self): | 233 def test_check_wdiff(self): |
234 port = self.make_port() | 234 port = self.make_port() |
235 port.check_wdiff() | 235 port.check_wdiff() |
236 | 236 |
237 def test_wdiff_text_fails(self): | 237 def test_wdiff_text_fails(self): |
238 host = MockSystemHost(os_name=self.os_name, os_version=self.os_version) | 238 host = MockSystemHost(os_name=self.os_name, os_version=self.os_version) |
239 host.executive = MockExecutive(should_throw=True) | 239 host.executive = MockExecutive(should_throw=True) |
240 port = self.make_port(host=host) | 240 port = self.make_port(host=host) |
241 port._executive = host.executive # AndroidPortTest.make_port sets its o
wn executive, so reset that as well. | 241 port._executive = host.executive # AndroidPortTest.make_port sets its o
wn executive, so reset that as well. |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 saved_environ = os.environ.copy() | 463 saved_environ = os.environ.copy() |
464 try: | 464 try: |
465 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' | 465 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' |
466 self.assertEqual(port.path_to_apache_config_file(), '/existing/httpd
.conf') | 466 self.assertEqual(port.path_to_apache_config_file(), '/existing/httpd
.conf') |
467 finally: | 467 finally: |
468 os.environ = saved_environ.copy() | 468 os.environ = saved_environ.copy() |
469 | 469 |
470 def test_additional_platform_directory(self): | 470 def test_additional_platform_directory(self): |
471 port = self.make_port(options=MockOptions(additional_platform_directory=
['/tmp/foo'])) | 471 port = self.make_port(options=MockOptions(additional_platform_directory=
['/tmp/foo'])) |
472 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo') | 472 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo') |
OLD | NEW |