| OLD | NEW |
| 1 # Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged | 1 # Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged |
| 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 | 4 # modification, are permitted provided that the following conditions |
| 5 # are met: | 5 # are met: |
| 6 # 1. Redistributions of source code must retain the above copyright | 6 # 1. Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # 2. Redistributions in binary form must reproduce the above copyright | 8 # 2. Redistributions in binary form must reproduce the above copyright |
| 9 # notice, this list of conditions and the following disclaimer in the | 9 # notice, this list of conditions and the following disclaimer in the |
| 10 # documentation and/or other materials provided with the distribution. | 10 # documentation and/or other materials provided with the distribution. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 checker = PNGChecker(file_path, mock_handle_style_error, MockSystemHost(
os_name='linux', filesystem=fs)) | 58 checker = PNGChecker(file_path, mock_handle_style_error, MockSystemHost(
os_name='linux', filesystem=fs)) |
| 59 checker.check() | 59 checker.check() |
| 60 self.assertEqual(len(errors), 0) | 60 self.assertEqual(len(errors), 0) |
| 61 | 61 |
| 62 file_path = "foo-expected.png" | 62 file_path = "foo-expected.png" |
| 63 fs.write_binary_file(file_path, "Dummy binary data") | 63 fs.write_binary_file(file_path, "Dummy binary data") |
| 64 errors = [] | 64 errors = [] |
| 65 checker = PNGChecker(file_path, mock_handle_style_error, MockSystemHost(
os_name='linux', filesystem=fs)) | 65 checker = PNGChecker(file_path, mock_handle_style_error, MockSystemHost(
os_name='linux', filesystem=fs)) |
| 66 checker.check() | 66 checker.check() |
| 67 self.assertEqual(len(errors), 1) | 67 self.assertEqual(len(errors), 1) |
| 68 self.assertEqual(errors[0], (0, 'image/png', 5, | 68 self.assertEqual( |
| 69 'Image lacks a checksum. Generate pngs usin
g run-webkit-tests to ensure they have a checksum.')) | 69 errors[0], |
| 70 (0, 'image/png', 5, 'Image lacks a checksum. Generate pngs using run
-webkit-tests to ensure they have a checksum.')) |
| OLD | NEW |