diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-05-09 14:22:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-05-09 15:11:45 +0000 |
commit | 2ddb2d3e14eef3de7dbd0cef553d669b9ac2361c (patch) | |
tree | e75f511546c5fd1a173e87c1f9fb11d7ac8d1af3 /chromium/PRESUBMIT_test_mocks.py | |
parent | a4f3d46271c57e8155ba912df46a05559d14726e (diff) | |
download | qtwebengine-chromium-2ddb2d3e14eef3de7dbd0cef553d669b9ac2361c.tar.gz |
BASELINE: Update Chromium to 51.0.2704.41
Also adds in all smaller components by reversing logic for exclusion.
Change-Id: Ibf90b506e7da088ea2f65dcf23f2b0992c504422
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'chromium/PRESUBMIT_test_mocks.py')
-rw-r--r-- | chromium/PRESUBMIT_test_mocks.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chromium/PRESUBMIT_test_mocks.py b/chromium/PRESUBMIT_test_mocks.py index 8e15d8cf53d..373b52c6d3c 100644 --- a/chromium/PRESUBMIT_test_mocks.py +++ b/chromium/PRESUBMIT_test_mocks.py @@ -26,7 +26,7 @@ class MockInputApi(object): self.is_committing = False self.change = MockChange([]) - def AffectedFiles(self, file_filter=None): + def AffectedFiles(self, file_filter=None, include_deletes=False): return self.files def AffectedSourceFiles(self, file_filter=None): @@ -92,10 +92,14 @@ class MockFile(object): MockInputApi for presubmit unittests. """ - def __init__(self, local_path, new_contents): + def __init__(self, local_path, new_contents, action='A'): self._local_path = local_path self._new_contents = new_contents self._changed_contents = [(i + 1, l) for i, l in enumerate(new_contents)] + self._action = action + + def Action(self): + return self._action def ChangedContents(self): return self._changed_contents @@ -106,6 +110,9 @@ class MockFile(object): def LocalPath(self): return self._local_path + def AbsoluteLocalPath(self): + return self._local_path + def rfind(self, p): """os.path.basename is called on MockFile so we need an rfind method.""" return self._local_path.rfind(p) |