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

Unified Diff: PRESUBMIT_test_mocks.py

Issue 1784373002: Include isolate.py in data for Android unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 9 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 | « PRESUBMIT_test.py ('k') | build/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT_test_mocks.py
diff --git a/PRESUBMIT_test_mocks.py b/PRESUBMIT_test_mocks.py
index 5230c8721073592e17f0479f20da23ac32091f3c..373b52c6d3c68643cfe0622f1a622d1098dca7f8 100644
--- a/PRESUBMIT_test_mocks.py
+++ b/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,13 +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 'A' # TODO(dbeam): feel free to change if your test actually uses.
+ return self._action
def ChangedContents(self):
return self._changed_contents
« no previous file with comments | « PRESUBMIT_test.py ('k') | build/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698