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

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

Issue 2542963002: W3C Importer: Consolidate and simplify logic for deciding what not to convert. (Closed)
Patch Set: Rebase Created 4 years 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/test_importer.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/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 15379292435016905b1aad58e465c97d60c151fa..f8683ee46b2408dd3c0371c8b337418d0ffa66b0 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
@@ -164,3 +164,24 @@ 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.css', '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.html', '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.xhtml', '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.bar', 'LayoutTests/imported/csswg-test/x'))
+ 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.png', 'LayoutTests/imported/csswg-test/x'))
+ self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svg', 'LayoutTests/imported/csswg-test/x'))
+ self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svgz', 'LayoutTests/imported/csswg-test/x'))
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698