Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 def test_ref_test_without_ref_is_skipped(self): | 166 def test_ref_test_without_ref_is_skipped(self): |
| 167 host = MockHost() | 167 host = MockHost() |
| 168 host.filesystem = MockFileSystem(files={ | 168 host.filesystem = MockFileSystem(files={ |
| 169 '/blink/w3c/dir1/my-ref-test.html': '<html><head><link rel="match" h ref="not-here.html" /></head></html>', | 169 '/blink/w3c/dir1/my-ref-test.html': '<html><head><link rel="match" h ref="not-here.html" /></head></html>', |
| 170 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations ': '', | 170 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations ': '', |
| 171 '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in' : '', | 171 '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in' : '', |
| 172 }) | 172 }) |
| 173 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) | 173 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) |
| 174 importer.find_importable_tests() | 174 importer.find_importable_tests() |
| 175 self.assertEqual(importer.import_list, []) | 175 self.assertEqual(importer.import_list, []) |
| 176 | |
| 177 def test_should_try_to_convert_positive_cases(self): | |
| 178 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.html', 'Layo utTests/imported/csswg-test/x')) | |
| 179 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.htm', 'Layou tTests/imported/csswg-test/x')) | |
| 180 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xhtml', 'Lay outTests/imported/csswg-test/x')) | |
| 181 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xht', 'Layou tTests/imported/csswg-test/x')) | |
| 182 self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.css', 'Layou tTests/imported/csswg-test/x')) | |
| 183 | |
| 184 def test_should_not_try_to_convert_js_test(self): | |
| 185 self.assertFalse(TestImporter.should_try_to_convert({'is_jstest': True}, 'foo.html', 'LayoutTests/imported/csswg-test/x')) | |
| 186 | |
| 187 def test_should_not_try_to_convert_test_in_wpt(self): | |
| 188 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.html', 'Lay outTests/imported/wpt/foo')) | |
| 189 | |
| 190 def test_should_not_try_to_convert_other_file_types(self): | |
| 191 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svgz', 'Lay outTests/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
| |
| 192 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.js', 'Layou tTests/imported/csswg-test/x')) | |
| 193 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.md', 'Layou tTests/imported/csswg-test/x')) | |
| 194 self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.bar', 'Layo utTests/imported/csswg-test/x')) | |
| OLD | NEW |