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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py

Issue 986393003: Allow expected.txt files in testharness LayoutTests with console errors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test failures Created 5 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: Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
index 6ec58cf1171d6229875fd3e70de949b629248211..c21ff9883625a5221fb9fcb37769767d29f3b912 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
@@ -44,3 +44,17 @@ class TestHarnessResultCheckerTest(unittest.TestCase):
for data in test_data:
self.assertEqual(data['result'], testharness_results.is_testharness_output_passing(data['content']))
+
+ def test_is_testharness_output_with_console_errors(self):
+ test_data = [
+ {'content': 'This is a testharness.js-based test.\nCONSOLE ERROR: This is an error.\nTest ran to completion.', 'result': True},
+ {'content': 'CONSOLE ERROR: This is an error.\nTest ran to completion.', 'result': True},
+ {'content': 'This is a testharness.js-based test.\nCONSOLE ERROR: This is an error.', 'result': True},
+ {'content': 'CONSOLE ERROR: This is an error.', 'result': True},
+ {'content': 'This is a testharness.js-based test.\nCONSOLE MESSAGE: This is not error.', 'result': False},
+ {'content': 'This is a testharness.js-based test.\nNo errors here.', 'result': False},
+ {'content': 'This is not a CONSOLE ERROR, sorry.', 'result': False},
+ ]
+
+ for data in test_data:
+ self.assertEqual(data['result'], testharness_results.is_testharness_output_with_console_errors(data['content']))

Powered by Google App Engine
This is Rietveld 408576698