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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 self.get_test('failures/expected/text.html')), | 111 self.get_test('failures/expected/text.html')), |
112 set([FAIL, CRASH])) | 112 set([FAIL, CRASH])) |
113 | 113 |
114 def test_result_was_expected(self): | 114 def test_result_was_expected(self): |
115 # test basics | 115 # test basics |
116 self.assertEqual(TestExpectations.result_was_expected(PASS, set([PASS]),
test_needs_rebaselining=False), True) | 116 self.assertEqual(TestExpectations.result_was_expected(PASS, set([PASS]),
test_needs_rebaselining=False), True) |
117 self.assertEqual(TestExpectations.result_was_expected(FAIL, set([PASS]),
test_needs_rebaselining=False), False) | 117 self.assertEqual(TestExpectations.result_was_expected(FAIL, set([PASS]),
test_needs_rebaselining=False), False) |
118 | 118 |
119 # test handling of SKIPped tests and results | 119 # test handling of SKIPped tests and results |
120 self.assertEqual(TestExpectations.result_was_expected(SKIP, set([CRASH])
, test_needs_rebaselining=False), True) | 120 self.assertEqual(TestExpectations.result_was_expected(SKIP, set([CRASH])
, test_needs_rebaselining=False), True) |
| 121 self.assertEqual(TestExpectations.result_was_expected(SKIP, set([LEAK]),
test_needs_rebaselining=False), True) |
121 | 122 |
122 # test handling of MISSING results and the REBASELINE specifier | 123 # test handling of MISSING results and the REBASELINE specifier |
123 self.assertEqual(TestExpectations.result_was_expected(MISSING, set([PASS
]), test_needs_rebaselining=True), True) | 124 self.assertEqual(TestExpectations.result_was_expected(MISSING, set([PASS
]), test_needs_rebaselining=True), True) |
124 self.assertEqual(TestExpectations.result_was_expected(MISSING, set([PASS
]), test_needs_rebaselining=False), False) | 125 self.assertEqual(TestExpectations.result_was_expected(MISSING, set([PASS
]), test_needs_rebaselining=False), False) |
125 | 126 |
126 self.assertTrue(TestExpectations.result_was_expected(PASS, set([NEEDS_RE
BASELINE]), test_needs_rebaselining=False)) | 127 self.assertTrue(TestExpectations.result_was_expected(PASS, set([NEEDS_RE
BASELINE]), test_needs_rebaselining=False)) |
127 self.assertTrue(TestExpectations.result_was_expected(MISSING, set([NEEDS
_REBASELINE]), test_needs_rebaselining=False)) | 128 self.assertTrue(TestExpectations.result_was_expected(MISSING, set([NEEDS
_REBASELINE]), test_needs_rebaselining=False)) |
128 self.assertTrue(TestExpectations.result_was_expected(TEXT, set([NEEDS_RE
BASELINE]), test_needs_rebaselining=False)) | 129 self.assertTrue(TestExpectations.result_was_expected(TEXT, set([NEEDS_RE
BASELINE]), test_needs_rebaselining=False)) |
129 self.assertTrue(TestExpectations.result_was_expected(IMAGE, set([NEEDS_R
EBASELINE]), test_needs_rebaselining=False)) | 130 self.assertTrue(TestExpectations.result_was_expected(IMAGE, set([NEEDS_R
EBASELINE]), test_needs_rebaselining=False)) |
130 self.assertTrue(TestExpectations.result_was_expected(IMAGE_PLUS_TEXT, se
t([NEEDS_REBASELINE]), test_needs_rebaselining=False)) | 131 self.assertTrue(TestExpectations.result_was_expected(IMAGE_PLUS_TEXT, se
t([NEEDS_REBASELINE]), test_needs_rebaselining=False)) |
131 self.assertTrue(TestExpectations.result_was_expected(AUDIO, set([NEEDS_R
EBASELINE]), test_needs_rebaselining=False)) | 132 self.assertTrue(TestExpectations.result_was_expected(AUDIO, set([NEEDS_R
EBASELINE]), test_needs_rebaselining=False)) |
132 self.assertFalse(TestExpectations.result_was_expected(TIMEOUT, set([NEED
S_REBASELINE]), test_needs_rebaselining=False)) | 133 self.assertFalse(TestExpectations.result_was_expected(TIMEOUT, set([NEED
S_REBASELINE]), test_needs_rebaselining=False)) |
133 self.assertFalse(TestExpectations.result_was_expected(CRASH, set([NEEDS_
REBASELINE]), test_needs_rebaselining=False)) | 134 self.assertFalse(TestExpectations.result_was_expected(CRASH, set([NEEDS_
REBASELINE]), test_needs_rebaselining=False)) |
| 135 self.assertFalse(TestExpectations.result_was_expected(LEAK, set([NEEDS_R
EBASELINE]), test_needs_rebaselining=False)) |
134 | 136 |
135 def test_remove_pixel_failures(self): | 137 def test_remove_pixel_failures(self): |
136 self.assertEqual(TestExpectations.remove_pixel_failures(set([FAIL])), se
t([FAIL])) | 138 self.assertEqual(TestExpectations.remove_pixel_failures(set([FAIL])), se
t([FAIL])) |
137 self.assertEqual(TestExpectations.remove_pixel_failures(set([PASS])), se
t([PASS])) | 139 self.assertEqual(TestExpectations.remove_pixel_failures(set([PASS])), se
t([PASS])) |
138 self.assertEqual(TestExpectations.remove_pixel_failures(set([IMAGE])), s
et([PASS])) | 140 self.assertEqual(TestExpectations.remove_pixel_failures(set([IMAGE])), s
et([PASS])) |
139 self.assertEqual(TestExpectations.remove_pixel_failures(set([FAIL])), se
t([FAIL])) | 141 self.assertEqual(TestExpectations.remove_pixel_failures(set([FAIL])), se
t([FAIL])) |
140 self.assertEqual(TestExpectations.remove_pixel_failures(set([PASS, IMAGE
, CRASH])), set([PASS, CRASH])) | 142 self.assertEqual(TestExpectations.remove_pixel_failures(set([PASS, IMAGE
, CRASH])), set([PASS, CRASH])) |
141 | 143 |
142 def test_suffixes_for_expectations(self): | 144 def test_suffixes_for_expectations(self): |
143 self.assertEqual(TestExpectations.suffixes_for_expectations(set([FAIL]))
, set(['txt', 'png', 'wav'])) | 145 self.assertEqual(TestExpectations.suffixes_for_expectations(set([FAIL]))
, set(['txt', 'png', 'wav'])) |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 | 869 |
868 def disabled_test_string_whitespace_stripping(self): | 870 def disabled_test_string_whitespace_stripping(self): |
869 # FIXME: Re-enable this test once we rework the code to no longer suppor
t the old syntax. | 871 # FIXME: Re-enable this test once we rework the code to no longer suppor
t the old syntax. |
870 self.assert_round_trip('\n', '') | 872 self.assert_round_trip('\n', '') |
871 self.assert_round_trip(' [ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]') | 873 self.assert_round_trip(' [ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]') |
872 self.assert_round_trip('[ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]') | 874 self.assert_round_trip('[ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]') |
873 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar
[ BAZ ] # Qux.') | 875 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar
[ BAZ ] # Qux.') |
874 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] ba
r [ BAZ ] # Qux.') | 876 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] ba
r [ BAZ ] # Qux.') |
875 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ]
bar [ BAZ ] # Qux.') | 877 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ]
bar [ BAZ ] # Qux.') |
876 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FO
O ] bar [ BAZ ] # Qux.') | 878 self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FO
O ] bar [ BAZ ] # Qux.') |
OLD | NEW |