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

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

Issue 2045013002: Fix test_importer.py to skip files named reftest.list and add test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
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 23 matching lines...) Expand all
34 from webkitpy.common.system.outputcapture import OutputCapture 34 from webkitpy.common.system.outputcapture import OutputCapture
35 from webkitpy.w3c.test_importer import TestImporter 35 from webkitpy.w3c.test_importer import TestImporter
36 36
37 37
38 FAKE_SOURCE_DIR = '/blink/w3c' 38 FAKE_SOURCE_DIR = '/blink/w3c'
39 FAKE_REPO_DIR = '/blink' 39 FAKE_REPO_DIR = '/blink'
40 40
41 FAKE_FILES = {'/mock-checkout/third_party/Webkit/LayoutTests/w3c/OWNERS': '', 41 FAKE_FILES = {'/mock-checkout/third_party/Webkit/LayoutTests/w3c/OWNERS': '',
42 '/blink/w3c/dir/README.txt': '', 42 '/blink/w3c/dir/README.txt': '',
43 '/blink/w3c/dir/OWNERS': '', 43 '/blink/w3c/dir/OWNERS': '',
44 '/blink/w3c/dir/reftest.list': '',
44 '/blink/w3c/dir1/OWNERS': '', 45 '/blink/w3c/dir1/OWNERS': '',
46 '/blink/w3c/dir1/reftest.list': '',
45 '/mock-checkout/third_party/WebKit/LayoutTests/w3c/README.txt': '' , 47 '/mock-checkout/third_party/WebKit/LayoutTests/w3c/README.txt': '' ,
46 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectatio ns': ''} 48 '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectatio ns': ''}
47 49
48 50
49 51
50 class TestImporterTest(unittest.TestCase): 52 class TestImporterTest(unittest.TestCase):
51 53
52 @staticmethod 54 @staticmethod
53 def options(**kwargs): 55 def options(**kwargs):
54 """Returns a set of option values for TestImporter.""" 56 """Returns a set of option values for TestImporter."""
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 host = MockHost() 90 host = MockHost()
89 host.filesystem = MockFileSystem(files=FAKE_FILES) 91 host.filesystem = MockFileSystem(files=FAKE_FILES)
90 importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, self.optio ns()) 92 importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, self.optio ns())
91 importer.find_importable_tests(FAKE_REPO_DIR) 93 importer.find_importable_tests(FAKE_REPO_DIR)
92 self.assertEqual(importer.import_list, 94 self.assertEqual(importer.import_list,
93 [{'copy_list': [{'dest': 'README.txt', 'src': '/blink/w 3c/dir/README.txt'}], 95 [{'copy_list': [{'dest': 'README.txt', 'src': '/blink/w 3c/dir/README.txt'}],
94 'dirname': '/blink/w3c/dir', 96 'dirname': '/blink/w3c/dir',
95 'jstests': 0, 97 'jstests': 0,
96 'reftests': 0, 98 'reftests': 0,
97 'total_tests': 0}]) 99 'total_tests': 0}])
100
101 def test_does_not_import_reftest(self):
102 host = MockHost()
103 host.filesystem = MockFileSystem(files=FAKE_FILES)
104 importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, self.optio ns())
105 importer.find_importable_tests(FAKE_REPO_DIR)
106 self.assertEqual(importer.import_list,
107 [{'copy_list': [{'dest': 'README.txt', 'src': '/blink/w 3c/dir/README.txt'}],
108 'dirname': '/blink/w3c/dir',
109 'jstests': 0,
110 'reftests': 0,
111 'total_tests': 0}])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698