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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py

Issue 2708883004: Increase max WPT import path length to 160. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 1 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 6 #
7 # 1. Redistributions of source code must retain the above 7 # 1. Redistributions of source code must retain the above
8 # copyright notice, this list of conditions and the following 8 # copyright notice, this list of conditions and the following
9 # disclaimer. 9 # disclaimer.
10 # 2. Redistributions in binary form must reproduce the above 10 # 2. Redistributions in binary form must reproduce the above
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 copier.find_importable_tests() 138 copier.find_importable_tests()
139 self.assertEqual(copier.import_list, []) 139 self.assertEqual(copier.import_list, [])
140 self.assertLog([ 140 self.assertLog([
141 'WARNING: Skipping: /blink/w3c/dir1/my-ref-test.html\n', 141 'WARNING: Skipping: /blink/w3c/dir1/my-ref-test.html\n',
142 'WARNING: Reason: Ref file "/blink/w3c/dir1/not-here.html" was not found.\n' 142 'WARNING: Reason: Ref file "/blink/w3c/dir1/not-here.html" was not found.\n'
143 ]) 143 ])
144 144
145 def test_files_with_long_path_are_skipped(self): 145 def test_files_with_long_path_are_skipped(self):
146 host = MockHost() 146 host = MockHost()
147 host.filesystem = MockFileSystem(files=FAKE_FILES) 147 host.filesystem = MockFileSystem(files=FAKE_FILES)
148 long_file_path = '%s/%s.html' % (FAKE_SOURCE_REPO_DIR, 'x' * 150) 148 long_file_path = '%s/%s.html' % (FAKE_SOURCE_REPO_DIR, 'x' * 180)
149 short_file_path = '%s/x.html' % FAKE_SOURCE_REPO_DIR 149 short_file_path = '%s/x.html' % FAKE_SOURCE_REPO_DIR
150 host.filesystem.write_text_file(long_file_path, '<html></html>') 150 host.filesystem.write_text_file(long_file_path, '<html></html>')
151 host.filesystem.write_text_file(short_file_path, '<html></html>') 151 host.filesystem.write_text_file(short_file_path, '<html></html>')
152 copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) 152 copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
153 copier.find_importable_tests() 153 copier.find_importable_tests()
154 self.assertLog([ 154 self.assertLog([
155 'WARNING: Skipping: %s\n' % long_file_path, 155 'WARNING: Skipping: %s\n' % long_file_path,
156 'WARNING: Reason: Long path. Max length 140; see http://crbug.com/ 609871.\n', 156 'WARNING: Reason: Long path. Max length 160; see http://crbug.com/ 609871.\n',
157 ]) 157 ])
158 158
159 def test_should_try_to_convert_positive_cases(self): 159 def test_should_try_to_convert_positive_cases(self):
160 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.css', 'LayoutT ests/external/csswg-test/x')) 160 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.css', 'LayoutT ests/external/csswg-test/x'))
161 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.htm', 'LayoutT ests/external/csswg-test/x')) 161 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.htm', 'LayoutT ests/external/csswg-test/x'))
162 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.html', 'Layout Tests/external/csswg-test/x')) 162 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.html', 'Layout Tests/external/csswg-test/x'))
163 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.xht', 'LayoutT ests/external/csswg-test/x')) 163 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.xht', 'LayoutT ests/external/csswg-test/x'))
164 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.xhtml', 'Layou tTests/external/csswg-test/x')) 164 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.xhtml', 'Layou tTests/external/csswg-test/x'))
165 165
166 def test_should_not_try_to_convert_js_test(self): 166 def test_should_not_try_to_convert_js_test(self):
167 self.assertFalse(TestCopier.should_try_to_convert({'is_jstest': True}, ' foo.html', 'LayoutTests/external/csswg-test/x')) 167 self.assertFalse(TestCopier.should_try_to_convert({'is_jstest': True}, ' foo.html', 'LayoutTests/external/csswg-test/x'))
168 168
169 def test_should_not_try_to_convert_test_in_wpt(self): 169 def test_should_not_try_to_convert_test_in_wpt(self):
170 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.html', 'Layou tTests/external/wpt/foo')) 170 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.html', 'Layou tTests/external/wpt/foo'))
171 171
172 def test_should_not_try_to_convert_other_file_types(self): 172 def test_should_not_try_to_convert_other_file_types(self):
173 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.bar', 'Layout Tests/external/csswg-test/x')) 173 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.bar', 'Layout Tests/external/csswg-test/x'))
174 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.js', 'LayoutT ests/external/csswg-test/x')) 174 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.js', 'LayoutT ests/external/csswg-test/x'))
175 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.md', 'LayoutT ests/external/csswg-test/x')) 175 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.md', 'LayoutT ests/external/csswg-test/x'))
176 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.png', 'Layout Tests/external/csswg-test/x')) 176 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.png', 'Layout Tests/external/csswg-test/x'))
177 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.svg', 'Layout Tests/external/csswg-test/x')) 177 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.svg', 'Layout Tests/external/csswg-test/x'))
178 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.svgz', 'Layou tTests/external/csswg-test/x')) 178 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.svgz', 'Layou tTests/external/csswg-test/x'))
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698