summaryrefslogtreecommitdiff
path: root/chromium/PRESUBMIT_test_mocks.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-29 10:46:47 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-02 12:02:10 +0000
commit99677208ff3b216fdfec551fbe548da5520cd6fb (patch)
tree476a4865c10320249360e859d8fdd3e01833b03a /chromium/PRESUBMIT_test_mocks.py
parentc30a6232df03e1efbd9f3b226777b07e087a1122 (diff)
downloadqtwebengine-chromium-99677208ff3b216fdfec551fbe548da5520cd6fb.tar.gz
BASELINE: Update Chromium to 86.0.4240.124
Change-Id: Ide0ff151e94cd665ae6521a446995d34a9d1d644 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/PRESUBMIT_test_mocks.py')
-rw-r--r--chromium/PRESUBMIT_test_mocks.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/chromium/PRESUBMIT_test_mocks.py b/chromium/PRESUBMIT_test_mocks.py
index 8318028e87c..0a9e5a54ecd 100644
--- a/chromium/PRESUBMIT_test_mocks.py
+++ b/chromium/PRESUBMIT_test_mocks.py
@@ -60,7 +60,7 @@ class MockInputApi(object):
attribute as the list of changed files.
"""
- DEFAULT_BLACK_LIST = ()
+ DEFAULT_FILES_TO_SKIP = ()
def __init__(self):
self.canned_checks = MockCannedChecks()
@@ -92,25 +92,26 @@ class MockInputApi(object):
def AffectedSourceFiles(self, file_filter=None):
return self.AffectedFiles(file_filter=file_filter)
- def FilterSourceFile(self, file, white_list=(), black_list=()):
+ def FilterSourceFile(self, file,
+ files_to_check=(), files_to_skip=()):
local_path = file.LocalPath()
- found_in_white_list = not white_list
- if white_list:
- if type(white_list) is str:
- raise TypeError('white_list should be an iterable of strings')
- for pattern in white_list:
+ found_in_files_to_check = not files_to_check
+ if files_to_check:
+ if type(files_to_check) is str:
+ raise TypeError('files_to_check should be an iterable of strings')
+ for pattern in files_to_check:
compiled_pattern = re.compile(pattern)
if compiled_pattern.search(local_path):
- found_in_white_list = True
+ found_in_files_to_check = True
break
- if black_list:
- if type(black_list) is str:
- raise TypeError('black_list should be an iterable of strings')
- for pattern in black_list:
+ if files_to_skip:
+ if type(files_to_skip) is str:
+ raise TypeError('files_to_skip should be an iterable of strings')
+ for pattern in files_to_skip:
compiled_pattern = re.compile(pattern)
if compiled_pattern.search(local_path):
return False
- return found_in_white_list
+ return found_in_files_to_check
def LocalPaths(self):
return [file.LocalPath() for file in self.files]