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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.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, 7 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/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..a05752ac5dfa10f287c23994bfec1d726ce200c4 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
@@ -15,11 +15,13 @@ class TestHarnessResultCheckerTest(unittest.TestCase):
{'content': '', 'result': False},
{'content': ' ', 'result': False},
{'content': 'This is a testharness.js-based test.\nHarness: the test ran to completion.', 'result': True},
- {'content': '\n \r This is a testharness.js-based test. \n \r \n \rHarness: the test ran to completion. \n\n', 'result': True},
+ {'content': '\n \r This is a testharness.js-based test. \n \r \n \rHarness: the test ran to completion. \n\n',
+ 'result': True},
{'content': ' This \nis a testharness.js-based test.\nHarness: the test ran to completion.', 'result': False},
{'content': 'This is a testharness.js-based test. Harness: the test ran to completion.', 'result': False},
{'content': 'This is a testharness.js-based test.\nFoo bar \n Harness: the test ran to completion.', 'result': True},
- {'content': 'This is a testharness.js-based test.\nFAIL: bah \n Harness: the test ran to completion.\n\n\n', 'result': True},
+ {'content': 'This is a testharness.js-based test.\nFAIL: bah \n Harness: the test ran to completion.\n\n\n',
+ 'result': True},
]
for data in test_data:
@@ -29,19 +31,31 @@ class TestHarnessResultCheckerTest(unittest.TestCase):
test_data = [
{'content': 'This is a testharness.js-based test.\n Harness: the test ran to completion.', 'result': True},
{'content': 'This is a testharness.js-based test.\n \n Harness: the test ran to completion.', 'result': False},
- {'content': 'This is a testharness.js-based test.\n PASS: foo bar \n Harness: the test ran to completion.', 'result': True},
- {'content': 'This is a testharness.js-based test.\n PASS: foo bar FAIL \n Harness: the test ran to completion.', 'result': True},
- {'content': 'This is a testharness.js-based test.\n PASS: foo bar \nFAIL \n Harness: the test ran to completion.', 'result': False},
- {'content': 'This is a testharness.js-based test.\n CONSOLE ERROR: BLAH \n Harness: the test ran to completion.', 'result': True},
- {'content': 'This is a testharness.js-based test.\n CONSOLE WARNING: BLAH \n Harness: the test ran to completion.', 'result': True},
+ {'content': 'This is a testharness.js-based test.\n PASS: foo bar \n Harness: the test ran to completion.',
+ 'result': True},
+ {'content': 'This is a testharness.js-based test.\n PASS: foo bar FAIL \n Harness: the test ran to completion.',
+ 'result': True},
+ {'content': 'This is a testharness.js-based test.\n PASS: foo bar \nFAIL \n Harness: the test ran to completion.',
+ 'result': False},
+ {'content': 'This is a testharness.js-based test.\n CONSOLE ERROR: BLAH \n Harness: the test ran to completion.',
+ 'result': True},
+ {'content': 'This is a testharness.js-based test.\n CONSOLE WARNING: BLAH \n Harness: the test ran to completion.',
+ 'result': True},
{'content': 'This is a testharness.js-based test.\n Foo bar \n Harness: the test ran to completion.', 'result': False},
- {'content': 'This is a testharness.js-based test.\n FAIL: bah \n Harness: the test ran to completion.', 'result': False},
- {'content': 'This is a testharness.js-based test.\n TIMEOUT: bah \n Harness: the test ran to completion.', 'result': False},
- {'content': 'This is a testharness.js-based test.\n NOTRUN: bah \n Harness: the test ran to completion.', 'result': False},
- {'content': 'CONSOLE LOG: error.\nThis is a testharness.js-based test.\nPASS: things are fine.\nHarness: the test ran to completion.\n\n', 'result': True},
- {'content': 'CONSOLE ERROR: error.\nThis is a testharness.js-based test.\nPASS: things are fine.\nHarness: the test ran to completion.\n\n', 'result': True},
- {'content': 'CONSOLE WARNING: error.\nThis is a testharness.js-based test.\nPASS: things are fine.\nHarness: the test ran to completion.\n\n', 'result': True},
- {'content': 'RANDOM TEXT.\nThis is a testharness.js-based test.\nPASS: things are fine.\n.Harness: the test ran to completion.\n\n', 'result': False},
+ {'content': 'This is a testharness.js-based test.\n FAIL: bah \n Harness: the test ran to completion.',
+ 'result': False},
+ {'content': 'This is a testharness.js-based test.\n TIMEOUT: bah \n Harness: the test ran to completion.',
+ 'result': False},
+ {'content': 'This is a testharness.js-based test.\n NOTRUN: bah \n Harness: the test ran to completion.',
+ 'result': False},
+ {'content': 'CONSOLE LOG: error.\nThis is a testharness.js-based test.\nPASS: things are fine.\nHarness: the test ran to completion.\n\n',
+ 'result': True},
+ {'content': 'CONSOLE ERROR: error.\nThis is a testharness.js-based test.\nPASS: things are fine.\nHarness: the test ran to completion.\n\n',
+ 'result': True},
+ {'content': 'CONSOLE WARNING: error.\nThis is a testharness.js-based test.\nPASS: things are fine.\nHarness: the test ran to completion.\n\n',
+ 'result': True},
+ {'content': 'RANDOM TEXT.\nThis is a testharness.js-based test.\nPASS: things are fine.\n.Harness: the test ran to completion.\n\n',
+ 'result': False},
]
for data in test_data:
@@ -49,8 +63,10 @@ class TestHarnessResultCheckerTest(unittest.TestCase):
def test_is_testharness_output_with_console_errors_and_warnings(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 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': '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': 'This is a testharness.js-based test.\nCONSOLE ERROR: This is an error.', 'result': True},

Powered by Google App Engine
This is Rietveld 408576698