| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 def test_executablebit(self): | 130 def test_executablebit(self): |
| 131 # executable source files are executable after importing | 131 # executable source files are executable after importing |
| 132 host = MockHost() | 132 host = MockHost() |
| 133 host.filesystem = MockFileSystem(files=FAKE_FILES) | 133 host.filesystem = MockFileSystem(files=FAKE_FILES) |
| 134 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) | 134 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) |
| 135 importer.do_import() | 135 importer.do_import() |
| 136 self.assertEqual( | 136 self.assertEqual( |
| 137 host.filesystem.executable_files, | 137 host.filesystem.executable_files, |
| 138 set(['/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/di
r/has_shebang.txt'])) | 138 set(['/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/di
r/has_shebang.txt'])) |
| 139 |
| 140 def test_ref_test_with_ref_is_copied(self): |
| 141 host = MockHost() |
| 142 host.filesystem = MockFileSystem(files={ |
| 143 '/blink/w3c/dir1/my-ref-test.html': '<html><head><link rel="match" h
ref="ref-file.html" />test</head></html>', |
| 144 '/blink/w3c/dir1/ref-file.html': '<html><head>test</head></html>', |
| 145 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations
': '', |
| 146 '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in'
: '', |
| 147 }) |
| 148 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) |
| 149 importer.find_importable_tests() |
| 150 self.assertEqual( |
| 151 importer.import_list, |
| 152 [ |
| 153 { |
| 154 'copy_list': [ |
| 155 {'src': '/blink/w3c/dir1/ref-file.html', 'dest': 'ref-fi
le.html'}, |
| 156 {'src': '/blink/w3c/dir1/ref-file.html', 'dest': 'my-ref
-test-expected.html', 'reference_support_info': {}}, |
| 157 {'src': '/blink/w3c/dir1/my-ref-test.html', 'dest': 'my-
ref-test.html'} |
| 158 ], |
| 159 'dirname': '/blink/w3c/dir1', |
| 160 'jstests': 0, |
| 161 'reftests': 1, |
| 162 'total_tests': 1 |
| 163 } |
| 164 ]) |
| 165 |
| 166 def test_ref_test_without_ref_is_skipped(self): |
| 167 host = MockHost() |
| 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>', |
| 170 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations
': '', |
| 171 '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in'
: '', |
| 172 }) |
| 173 importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options()) |
| 174 importer.find_importable_tests() |
| 175 self.assertEqual(importer.import_list, []) |
| OLD | NEW |