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

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

Issue 17564007: Clean up remaining DumpRenderTree references and flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix handling of the default None option for --driver-name Created 7 years, 6 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return self.__class__.__name__ != other.__class__.__name__ 97 return self.__class__.__name__ != other.__class__.__name__
98 98
99 def __hash__(self): 99 def __hash__(self):
100 return hash(self.__class__.__name__) 100 return hash(self.__class__.__name__)
101 101
102 def dumps(self): 102 def dumps(self):
103 """Returns the string/JSON representation of a TestFailure.""" 103 """Returns the string/JSON representation of a TestFailure."""
104 return cPickle.dumps(self) 104 return cPickle.dumps(self)
105 105
106 def driver_needs_restart(self): 106 def driver_needs_restart(self):
107 """Returns True if we should kill DumpRenderTree/WebKitTestRunner before the next test.""" 107 """Returns True if we should kill the driver before the next test."""
108 return False 108 return False
109 109
110 110
111 class FailureTimeout(TestFailure): 111 class FailureTimeout(TestFailure):
112 def __init__(self, is_reftest=False): 112 def __init__(self, is_reftest=False):
113 super(FailureTimeout, self).__init__() 113 super(FailureTimeout, self).__init__()
114 self.is_reftest = is_reftest 114 self.is_reftest = is_reftest
115 115
116 def message(self): 116 def message(self):
117 return "test timed out" 117 return "test timed out"
118 118
119 def driver_needs_restart(self): 119 def driver_needs_restart(self):
120 return True 120 return True
121 121
122 122
123 class FailureCrash(TestFailure): 123 class FailureCrash(TestFailure):
124 def __init__(self, is_reftest=False, process_name='DumpRenderTree', pid=None ): 124 def __init__(self, is_reftest=False, process_name='content_shell', pid=None) :
125 super(FailureCrash, self).__init__() 125 super(FailureCrash, self).__init__()
126 self.process_name = process_name 126 self.process_name = process_name
127 self.pid = pid 127 self.pid = pid
128 self.is_reftest = is_reftest 128 self.is_reftest = is_reftest
129 129
130 def message(self): 130 def message(self):
131 if self.pid: 131 if self.pid:
132 return "%s crashed [pid=%d]" % (self.process_name, self.pid) 132 return "%s crashed [pid=%d]" % (self.process_name, self.pid)
133 return self.process_name + " crashed" 133 return self.process_name + " crashed"
134 134
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 # Convenient collection of all failure classes for anything that might 215 # Convenient collection of all failure classes for anything that might
216 # need to enumerate over them all. 216 # need to enumerate over them all.
217 ALL_FAILURE_CLASSES = (FailureTimeout, FailureCrash, FailureMissingResult, 217 ALL_FAILURE_CLASSES = (FailureTimeout, FailureCrash, FailureMissingResult,
218 FailureTextMismatch, FailureMissingImageHash, 218 FailureTextMismatch, FailureMissingImageHash,
219 FailureMissingImage, FailureImageHashMismatch, 219 FailureMissingImage, FailureImageHashMismatch,
220 FailureImageHashIncorrect, FailureReftestMismatch, 220 FailureImageHashIncorrect, FailureReftestMismatch,
221 FailureReftestMismatchDidNotOccur, FailureReftestNoImages Generated, 221 FailureReftestMismatchDidNotOccur, FailureReftestNoImages Generated,
222 FailureMissingAudio, FailureAudioMismatch, 222 FailureMissingAudio, FailureAudioMismatch,
223 FailureEarlyExit) 223 FailureEarlyExit)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698