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

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

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
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 20 matching lines...) Expand all
31 from webkitpy.layout_tests.models import test_failures 31 from webkitpy.layout_tests.models import test_failures
32 32
33 33
34 class TestResult(object): 34 class TestResult(object):
35 """Data object containing the results of a single test.""" 35 """Data object containing the results of a single test."""
36 36
37 @staticmethod 37 @staticmethod
38 def loads(string): 38 def loads(string):
39 return cPickle.loads(string) 39 return cPickle.loads(string)
40 40
41 def __init__(self, test_name, failures=None, test_run_time=None, has_stderr= False, reftest_type=None, pid=None, references=None, device_failed=False, has_re paint_overlay=False): 41 def __init__(self, test_name, failures=None, test_run_time=None, has_stderr= False, reftest_type=None,
42 pid=None, references=None, device_failed=False, has_repaint_ove rlay=False):
42 self.test_name = test_name 43 self.test_name = test_name
43 self.failures = failures or [] 44 self.failures = failures or []
44 self.test_run_time = test_run_time or 0 # The time taken to execute the test itself. 45 self.test_run_time = test_run_time or 0 # The time taken to execute the test itself.
45 self.has_stderr = has_stderr 46 self.has_stderr = has_stderr
46 self.reftest_type = reftest_type or [] 47 self.reftest_type = reftest_type or []
47 self.pid = pid 48 self.pid = pid
48 self.references = references or [] 49 self.references = references or []
49 self.device_failed = device_failed 50 self.device_failed = device_failed
50 self.has_repaint_overlay = has_repaint_overlay 51 self.has_repaint_overlay = has_repaint_overlay
51 52
(...skipping 15 matching lines...) Expand all
67 return not (self == other) 68 return not (self == other)
68 69
69 def has_failure_matching_types(self, *failure_classes): 70 def has_failure_matching_types(self, *failure_classes):
70 for failure in self.failures: 71 for failure in self.failures:
71 if type(failure) in failure_classes: 72 if type(failure) in failure_classes:
72 return True 73 return True
73 return False 74 return False
74 75
75 def dumps(self): 76 def dumps(self):
76 return cPickle.dumps(self) 77 return cPickle.dumps(self)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698