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

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

Issue 2627213003: Rename LayoutTests/imported/ -> LayoutTests/external/. (Closed)
Patch Set: Created 3 years, 11 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
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) 184 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options())
185 importer.do_import() 185 importer.do_import()
186 self.assertIn('ERROR: /blink/w3c/dir1/my-large-test.html is too large (1 000000 bytes)\n', self.logMessages()) 186 self.assertIn('ERROR: /blink/w3c/dir1/my-large-test.html is too large (1 000000 bytes)\n', self.logMessages())
187 self.assertTrue(host.filesystem.exists( 187 self.assertTrue(host.filesystem.exists(
188 '/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/dir1/my -small-test.html')) 188 '/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/dir1/my -small-test.html'))
189 self.assertFalse(host.filesystem.exists( 189 self.assertFalse(host.filesystem.exists(
190 '/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/dir1/my -large-test.html')) 190 '/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/dir1/my -large-test.html'))
191 191
192 def test_should_try_to_convert_positive_cases(self): 192 def test_should_try_to_convert_positive_cases(self):
193 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.css', 'Layou tTests/imported/csswg-test/x')) 193 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.css', 'Layou tTests/external/csswg-test/x'))
194 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.htm', 'Layou tTests/imported/csswg-test/x')) 194 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.htm', 'Layou tTests/external/csswg-test/x'))
195 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.html', 'Layo utTests/imported/csswg-test/x')) 195 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.html', 'Layo utTests/external/csswg-test/x'))
196 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xht', 'Layou tTests/imported/csswg-test/x')) 196 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xht', 'Layou tTests/external/csswg-test/x'))
197 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xhtml', 'Lay outTests/imported/csswg-test/x')) 197 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xhtml', 'Lay outTests/external/csswg-test/x'))
198 198
199 def test_should_not_try_to_convert_js_test(self): 199 def test_should_not_try_to_convert_js_test(self):
200 self.assertFalse(TestImporter.should_try_to_convert({'is_jstest': True}, 'foo.html', 'LayoutTests/imported/csswg-test/x')) 200 self.assertFalse(TestImporter.should_try_to_convert({'is_jstest': True}, 'foo.html', 'LayoutTests/external/csswg-test/x'))
201 201
202 def test_should_not_try_to_convert_test_in_wpt(self): 202 def test_should_not_try_to_convert_test_in_wpt(self):
203 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.html', 'Lay outTests/imported/wpt/foo')) 203 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.html', 'Lay outTests/external/wpt/foo'))
204 204
205 def test_should_not_try_to_convert_other_file_types(self): 205 def test_should_not_try_to_convert_other_file_types(self):
206 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.bar', 'Layo utTests/imported/csswg-test/x')) 206 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.bar', 'Layo utTests/external/csswg-test/x'))
207 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.js', 'Layou tTests/imported/csswg-test/x')) 207 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.js', 'Layou tTests/external/csswg-test/x'))
208 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.md', 'Layou tTests/imported/csswg-test/x')) 208 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.md', 'Layou tTests/external/csswg-test/x'))
209 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.png', 'Layo utTests/imported/csswg-test/x')) 209 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.png', 'Layo utTests/external/csswg-test/x'))
210 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svg', 'Layo utTests/imported/csswg-test/x')) 210 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svg', 'Layo utTests/external/csswg-test/x'))
211 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svgz', 'Lay outTests/imported/csswg-test/x')) 211 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svgz', 'Lay outTests/external/csswg-test/x'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698