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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

Issue 1766583002: Added update_test_expectations script to remove non-flaky test expectations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mock out builders and specifiers, dont remove lines if bot results arent available Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index 4fa86268206434ea6c30b456a8d778e4e7e74470..97c3534ec77196afb5e5a1b1eb5865d23c305b12 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -433,6 +433,12 @@ class TestExpectationLine(object):
def is_whitespace_or_comment(self):
return bool(re.match("^\s*$", self.original_string.split('#')[0]))
+ def is_whitespace(self):
+ return self.is_whitespace_or_comment() and self.original_string.strip() == ""
+
+ def is_comment(self):
+ return self.is_whitespace_or_comment() and not self.is_whitespace()
+
@staticmethod
def create_passing_expectation(test):
expectation_line = TestExpectationLine()
@@ -1009,6 +1015,9 @@ class TestExpectations(object):
def model(self):
return self._model
+ def expectations(self):
+ return self._expectations
+
def get_needs_rebaseline_failures(self):
return self._model.get_test_set(NEEDS_REBASELINE)

Powered by Google App Engine
This is Rietveld 408576698