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

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

Issue 2729133006: Fix orphaned wpt -expected.txt file deletion logic. (Closed)
Patch Set: Remove orphan baselines; remove print line Created 3 years, 10 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 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 17dd7400303579eab092f835f15ef0b6715afa40..85a71060e2f75583756f67bfb413bba00262b983 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
@@ -194,3 +194,15 @@ class TestImporterTest(LoggingTestCase):
self.assertEqual(
TestImporter._cc_part(directory_owners),
['--cc=someone@chromium.org', '--cc=x@chromium.org', '--cc=y@chromium.org'])
+
+ def test_delete_orphaned_baselines(self):
+ host = MockHost()
+ dest_path = '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt'
+ host.filesystem.write_text_file(dest_path + '/b-expected.txt', '')
+ host.filesystem.write_text_file(dest_path + '/b.x-expected.txt', '')
+ host.filesystem.write_text_file(dest_path + '/b.x.html', '')
+ importer = TestImporter(host)
+ importer._delete_orphaned_baselines(dest_path)
+ self.assertFalse(host.filesystem.exists(dest_path + '/b-expected.txt'))
+ self.assertTrue(host.filesystem.exists(dest_path + '/b.x-expected.txt'))
+ self.assertTrue(host.filesystem.exists(dest_path + '/b.x.html'))
« 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