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

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

Issue 1885703003: Make testharness.js tests fail on uncaught exceptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Recover script changes Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
index 869522cf77236003adcfb538e3b408d709971e61..5820d60f7a408025a816bad8c81bae15ba3b149e 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py
@@ -47,14 +47,33 @@ 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_and_warnings(self):
+ 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': 'This is a testharness.js-based test.\nCONSOLE WARNING: This is a warning.\nTest ran to completion.', 'result': True},
+ {'content': 'This is a testharness.js-based test.\nCONSOLE WARNING: This is a warning.\nTest ran to completion.', 'result': False},
{'content': 'CONSOLE ERROR: This is an error.\nTest ran to completion.', 'result': True},
- {'content': 'CONSOLE WARNING: This is a warning.\nTest ran to completion.', 'result': True},
+ {'content': 'CONSOLE WARNING: This is a warning.\nTest ran to completion.', 'result': False},
{'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': 'CONSOLE WARNING: This is a warning.', 'result': False},
+ {'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},
+ {'content': 'This is not a CONSOLE WARNING, sorry.', 'result': False},
+ ]
+
+ for data in test_data:
+ self.assertEqual(
+ data['result'], testharness_results.is_testharness_output_with_console_errors(data['content']))
+
+ def test_is_testharness_output_with_console_warnings(self):
+ test_data = [
+ {'content': 'This is a testharness.js-based test.\nCONSOLE ERROR: This is an error.\nTest ran to completion.', 'result': False},
+ {'content': 'This is a testharness.js-based test.\nCONSOLE WARNING: This is a warning.\nTest ran to completion.', 'result': True},
+ {'content': 'CONSOLE ERROR: This is an error.\nTest ran to completion.', 'result': False},
+ {'content': 'CONSOLE WARNING: This is a warning.\nTest ran to completion.', 'result': True},
+ {'content': 'This is a testharness.js-based test.\nCONSOLE ERROR: This is an error.', 'result': False},
+ {'content': 'CONSOLE ERROR: This is an error.', 'result': False},
{'content': 'CONSOLE WARNING: This is a warning.', '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},
@@ -64,4 +83,4 @@ class TestHarnessResultCheckerTest(unittest.TestCase):
for data in test_data:
self.assertEqual(
- data['result'], testharness_results.is_testharness_output_with_console_errors_or_warnings(data['content']))
+ data['result'], testharness_results.is_testharness_output_with_console_warnings(data['content']))
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698