Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1115)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py

Issue 1346673003: Allow text expectation for reftests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return test_expectations.SKIP 61 return test_expectations.SKIP
62 elif (FailureMissingResult in failure_types or 62 elif (FailureMissingResult in failure_types or
63 FailureMissingImage in failure_types or 63 FailureMissingImage in failure_types or
64 FailureMissingImageHash in failure_types or 64 FailureMissingImageHash in failure_types or
65 FailureMissingAudio in failure_types): 65 FailureMissingAudio in failure_types):
66 return test_expectations.MISSING 66 return test_expectations.MISSING
67 else: 67 else:
68 is_text_failure = (FailureTextMismatch in failure_types or 68 is_text_failure = (FailureTextMismatch in failure_types or
69 FailureTestHarnessAssertion in failure_types) 69 FailureTestHarnessAssertion in failure_types)
70 is_image_failure = (FailureImageHashIncorrect in failure_types or 70 is_image_failure = (FailureImageHashIncorrect in failure_types or
71 FailureImageHashMismatch in failure_types) 71 FailureImageHashMismatch in failure_types or
72 is_reftest_failure(failure_list))
72 is_audio_failure = (FailureAudioMismatch in failure_types) 73 is_audio_failure = (FailureAudioMismatch in failure_types)
73 if is_text_failure and is_image_failure: 74 if is_text_failure and is_image_failure:
74 return test_expectations.IMAGE_PLUS_TEXT 75 return test_expectations.IMAGE_PLUS_TEXT
75 elif is_text_failure: 76 elif is_text_failure:
76 return test_expectations.TEXT 77 return test_expectations.TEXT
77 elif is_image_failure or is_reftest_failure(failure_list): 78 elif is_image_failure:
78 return test_expectations.IMAGE 79 return test_expectations.IMAGE
79 elif is_audio_failure: 80 elif is_audio_failure:
80 return test_expectations.AUDIO 81 return test_expectations.AUDIO
81 else: 82 else:
82 raise ValueError("unclassifiable set of failures: " 83 raise ValueError("unclassifiable set of failures: "
83 + str(failure_types)) 84 + str(failure_types))
84 85
85 86
86 class TestFailure(object): 87 class TestFailure(object):
87 """Abstract base class that defines the failure interface.""" 88 """Abstract base class that defines the failure interface."""
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 # Convenient collection of all failure classes for anything that might 249 # Convenient collection of all failure classes for anything that might
249 # need to enumerate over them all. 250 # need to enumerate over them all.
250 ALL_FAILURE_CLASSES = (FailureTimeout, FailureCrash, FailureMissingResult, 251 ALL_FAILURE_CLASSES = (FailureTimeout, FailureCrash, FailureMissingResult,
251 FailureTestHarnessAssertion, 252 FailureTestHarnessAssertion,
252 FailureTextMismatch, FailureMissingImageHash, 253 FailureTextMismatch, FailureMissingImageHash,
253 FailureMissingImage, FailureImageHashMismatch, 254 FailureMissingImage, FailureImageHashMismatch,
254 FailureImageHashIncorrect, FailureReftestMismatch, 255 FailureImageHashIncorrect, FailureReftestMismatch,
255 FailureReftestMismatchDidNotOccur, FailureReftestNoImages Generated, 256 FailureReftestMismatchDidNotOccur, FailureReftestNoImages Generated,
256 FailureMissingAudio, FailureAudioMismatch, 257 FailureMissingAudio, FailureAudioMismatch,
257 FailureEarlyExit) 258 FailureEarlyExit)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698