| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations
': '', | 135 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations
': '', |
| 136 }) | 136 }) |
| 137 copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) | 137 copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) |
| 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): | |
| 146 host = MockHost() | |
| 147 host.filesystem = MockFileSystem(files=FAKE_FILES) | |
| 148 long_file_path = '%s/%s.html' % (FAKE_SOURCE_REPO_DIR, 'x' * 180) | |
| 149 short_file_path = '%s/x.html' % FAKE_SOURCE_REPO_DIR | |
| 150 host.filesystem.write_text_file(long_file_path, '<html></html>') | |
| 151 host.filesystem.write_text_file(short_file_path, '<html></html>') | |
| 152 copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) | |
| 153 copier.find_importable_tests() | |
| 154 self.assertLog([ | |
| 155 'WARNING: Skipping: %s\n' % long_file_path, | |
| 156 'WARNING: Reason: Long path. Max length 160; see http://crbug.com/
609871.\n', | |
| 157 ]) | |
| 158 | |
| 159 def test_should_try_to_convert_positive_cases(self): | 145 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')) | 146 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')) | 147 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')) | 148 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')) | 149 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')) | 150 self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.xhtml', 'Layou
tTests/external/csswg-test/x')) |
| 165 | 151 |
| 166 def test_should_not_try_to_convert_js_test(self): | 152 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')) | 153 self.assertFalse(TestCopier.should_try_to_convert({'is_jstest': True}, '
foo.html', 'LayoutTests/external/csswg-test/x')) |
| 168 | 154 |
| 169 def test_should_not_try_to_convert_test_in_wpt(self): | 155 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')) | 156 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.html', 'Layou
tTests/external/wpt/foo')) |
| 171 | 157 |
| 172 def test_should_not_try_to_convert_other_file_types(self): | 158 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')) | 159 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')) | 160 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')) | 161 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')) | 162 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')) | 163 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')) | 164 self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.svgz', 'Layou
tTests/external/csswg-test/x')) |
| OLD | NEW |