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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py

Issue 2174073002: Adds functionality to update-w3c-test-expectations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor change Created 4 years, 5 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/w3c/update_w3c_test_expectations.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/w3c/update_w3c_test_expectations_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py
index d215849a0cee872d0e6746bd2ef4c449aab96ff2..7ae39f438a82f235468c05db16f988b67c46de45 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py
@@ -90,18 +90,28 @@ class UpdateW3CTestExpectationsTest(unittest.TestCase, W3CExpectationsLineAdder)
host = MockHost()
line_adder = W3CExpectationsLineAdder(host)
line_adder._host.filesystem.files = {'TestExpectations': '# Tests added from W3C auto import bot\n'}
- line_list = ['fake crbug [foo] fake/file/path.html [Pass]']
+ line_list = ['fake crbug [ foo ] fake/file/path.html [Pass]']
path = 'TestExpectations'
line_adder.write_to_test_expectations(line_adder, path, line_list)
value = line_adder._host.filesystem.read_text_file(path)
- self.assertEqual(value, '# Tests added from W3C auto import bot\nfake crbug [foo] fake/file/path.html [Pass]\n')
+ self.assertEqual(value, '# Tests added from W3C auto import bot\nfake crbug [ foo ] fake/file/path.html [Pass]\n')
def test_write_to_test_expectations_to_eof(self):
host = MockHost()
line_adder = W3CExpectationsLineAdder(host)
line_adder._host.filesystem.files['TestExpectations'] = 'not empty\n'
- line_list = ['fake crbug [foo] fake/file/path.html [Pass]']
+ line_list = ['fake crbug [ foo ] fake/file/path.html [Pass]']
path = 'TestExpectations'
line_adder.write_to_test_expectations(line_adder, path, line_list)
value = line_adder.filesystem.read_text_file(path)
- self.assertEqual(value, 'not empty\n\n# Tests added from W3C auto import bot\nfake crbug [foo] fake/file/path.html [Pass]')
+ self.assertEqual(value, 'not empty\n\n# Tests added from W3C auto import bot\nfake crbug [ foo ] fake/file/path.html [Pass]')
+
+ def test_write_to_test_expectations_skip_lines(self):
+ host = MockHost()
+ line_adder = W3CExpectationsLineAdder(host)
+ line_adder._host.filesystem.files['TestExpectations'] = 'dont copy me\n'
+ line_list = ['[ ] dont copy me', '[ ] but copy me']
+ path = 'TestExpectations'
+ line_adder.write_to_test_expectations(line_adder, path, line_list)
+ value = line_adder.filesystem.read_text_file(path)
+ self.assertEqual(value, 'dont copy me\n\n# Tests added from W3C auto import bot\n[ ] but copy me')
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698