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

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

Issue 2779053002: Ignore OWNERS files during external/wpt import and export (Closed)
Patch Set: Addressed comments Created 3 years, 8 months 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 6
7 from webkitpy.common.checkout.git_mock import MockGit 7 from webkitpy.common.checkout.git_mock import MockGit
8 from webkitpy.common.host_mock import MockHost 8 from webkitpy.common.host_mock import MockHost
9 from webkitpy.common.system.executive_mock import MockExecutive 9 from webkitpy.common.system.executive_mock import MockExecutive
10 from webkitpy.common.system.log_testing import LoggingTestCase 10 from webkitpy.common.system.log_testing import LoggingTestCase
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 host = MockHost() 199 host = MockHost()
200 dest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt' 200 dest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt'
201 host.filesystem.write_text_file(dest_path + '/b-expected.txt', '') 201 host.filesystem.write_text_file(dest_path + '/b-expected.txt', '')
202 host.filesystem.write_text_file(dest_path + '/b.x-expected.txt', '') 202 host.filesystem.write_text_file(dest_path + '/b.x-expected.txt', '')
203 host.filesystem.write_text_file(dest_path + '/b.x.html', '') 203 host.filesystem.write_text_file(dest_path + '/b.x.html', '')
204 importer = TestImporter(host) 204 importer = TestImporter(host)
205 importer._delete_orphaned_baselines(dest_path) 205 importer._delete_orphaned_baselines(dest_path)
206 self.assertFalse(host.filesystem.exists(dest_path + '/b-expected.txt')) 206 self.assertFalse(host.filesystem.exists(dest_path + '/b-expected.txt'))
207 self.assertTrue(host.filesystem.exists(dest_path + '/b.x-expected.txt')) 207 self.assertTrue(host.filesystem.exists(dest_path + '/b.x-expected.txt'))
208 self.assertTrue(host.filesystem.exists(dest_path + '/b.x.html')) 208 self.assertTrue(host.filesystem.exists(dest_path + '/b.x.html'))
209
210 def test_keeps_owners_files_and_baselines(self):
211 host = MockHost()
212 dest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt'
213 host.filesystem.write_text_file(dest_path + '/foo-test.html', '')
214 host.filesystem.write_text_file(dest_path + '/foo-test-expected.txt', '' )
215 host.filesystem.write_text_file(dest_path + '/OWNERS', '')
216 host.filesystem.write_text_file(dest_path + '/bar/baz/OWNERS', '')
217 importer = TestImporter(host)
218 importer._clear_out_dest_path(dest_path)
219 self.assertFalse(host.filesystem.exists(dest_path + '/foo-test.html'))
220 self.assertTrue(host.filesystem.exists(dest_path + '/foo-test-expected.t xt'))
221 self.assertTrue(host.filesystem.exists(dest_path + '/OWNERS'))
222 self.assertTrue(host.filesystem.exists(dest_path + '/bar/baz/OWNERS'))
OLDNEW
« 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