Index: Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py |
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py |
index 00c7288e597fb7c013cab1e13c18371754ecfa9e..f6eae90abd4de5a89d78006572924bffb97823e5 100644 |
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py |
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py |
@@ -177,6 +177,21 @@ class MiscTests(Base): |
set([self.get_test('failures/expected/crash.html'), |
self.get_test('failures/expected/image_checksum.html')])) |
+ def test_needs_rebaseline_reftest(self): |
+ try: |
+ filesystem = self._port.host.filesystem |
+ filesystem.write_text_file(filesystem.join(self._port.layout_tests_dir(), 'failures/expected/needsrebaseline.html'), 'content') |
+ filesystem.write_text_file(filesystem.join(self._port.layout_tests_dir(), 'failures/expected/needsrebaseline-expected.html'), 'content') |
+ filesystem.write_text_file(filesystem.join(self._port.layout_tests_dir(), 'failures/expected/needsmanualrebaseline.html'), 'content') |
+ filesystem.write_text_file(filesystem.join(self._port.layout_tests_dir(), 'failures/expected/needsmanualrebaseline-expected.html'), 'content') |
+ self.parse_exp("""Bug(user) failures/expected/needsrebaseline.html [ NeedsRebaseline ] |
+Bug(user) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ]""", is_lint_mode=True) |
+ self.assertFalse(True, "ParseError wasn't raised") |
+ except ParseError, e: |
+ warnings = """expectations:1 A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseline failures/expected/needsrebaseline.html |
+expectations:2 A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseline failures/expected/needsmanualrebaseline.html""" |
+ self.assertEqual(str(e), warnings) |
Dirk Pranke
2014/01/13 21:53:45
looks like there's a bunch of boilerplate in this
|
+ |
def test_parse_warning(self): |
try: |
filesystem = self._port.host.filesystem |