| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 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 | 4 |
| 5 """A helper class for reading in and dealing with tests expectations | 5 """A helper class for reading in and dealing with tests expectations |
| 6 for layout tests. | 6 for layout tests. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 """ | 376 """ |
| 377 if not test in self._test_list_paths: | 377 if not test in self._test_list_paths: |
| 378 return False | 378 return False |
| 379 | 379 |
| 380 prev_base_path = self._test_list_paths[test] | 380 prev_base_path = self._test_list_paths[test] |
| 381 if (prev_base_path == os.path.normpath(test_list_path)): | 381 if (prev_base_path == os.path.normpath(test_list_path)): |
| 382 self._AddError(lineno, 'Duplicate expectations.', test) | 382 self._AddError(lineno, 'Duplicate expectations.', test) |
| 383 return True | 383 return True |
| 384 | 384 |
| 385 # Check if we've already seen a more precise path. | 385 # Check if we've already seen a more precise path. |
| 386 return prev_base_path.startswith(test_list_path) | 386 return prev_base_path.startswith(os.path.normpath(test_list_path)) |
| 387 | 387 |
| 388 def _AddError(self, lineno, msg, path): | 388 def _AddError(self, lineno, msg, path): |
| 389 self._errors.append('\nLine:%s %s\n%s' % (lineno, msg, path)) | 389 self._errors.append('\nLine:%s %s\n%s' % (lineno, msg, path)) |
| OLD | NEW |