Chromium Code Reviews| Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py |
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py |
| index 338be36f609f191d6a670a5ccb0bc1d1ea1ab539..d98e2099d6edf694a8a02d691d4759ca1ad75ba2 100644 |
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py |
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py |
| @@ -173,3 +173,22 @@ class TestImporterTest(unittest.TestCase): |
| importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) |
| importer.find_importable_tests() |
| self.assertEqual(importer.import_list, []) |
| + |
| + def test_should_try_to_convert_positive_cases(self): |
| + self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.html', 'LayoutTests/imported/csswg-test/x')) |
| + self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.htm', 'LayoutTests/imported/csswg-test/x')) |
| + self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xhtml', 'LayoutTests/imported/csswg-test/x')) |
| + self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xht', 'LayoutTests/imported/csswg-test/x')) |
| + self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.css', 'LayoutTests/imported/csswg-test/x')) |
| + |
| + def test_should_not_try_to_convert_js_test(self): |
| + self.assertFalse(TestImporter.should_try_to_convert({'is_jstest': True}, 'foo.html', 'LayoutTests/imported/csswg-test/x')) |
| + |
| + def test_should_not_try_to_convert_test_in_wpt(self): |
| + self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.html', 'LayoutTests/imported/wpt/foo')) |
| + |
| + def test_should_not_try_to_convert_other_file_types(self): |
| + self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svgz', 'LayoutTests/imported/csswg-test/x')) |
|
Manuel Rego
2016/12/01 22:00:52
Nit: Maybe add SVG too, which is much more common.
qyearsley
2016/12/01 22:27:53
Done
|
| + self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.js', 'LayoutTests/imported/csswg-test/x')) |
| + self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.md', 'LayoutTests/imported/csswg-test/x')) |
| + self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.bar', 'LayoutTests/imported/csswg-test/x')) |