From 189d4fd8fad9e3c776873be51938cd31a42b6177 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 20 May 2021 09:47:09 +0200 Subject: BASELINE: Update Chromium to 90.0.4430.221 Change-Id: Iff4d9d18d2fcf1a576f3b1f453010f744a232920 Reviewed-by: Allan Sandfeld Jensen --- chromium/PRESUBMIT_test_mocks.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'chromium/PRESUBMIT_test_mocks.py') diff --git a/chromium/PRESUBMIT_test_mocks.py b/chromium/PRESUBMIT_test_mocks.py index 0a9e5a54ecd..f8143ae44cf 100644 --- a/chromium/PRESUBMIT_test_mocks.py +++ b/chromium/PRESUBMIT_test_mocks.py @@ -179,16 +179,21 @@ class MockFile(object): MockInputApi for presubmit unittests. """ - def __init__(self, local_path, new_contents, old_contents=None, action='A'): + def __init__(self, local_path, new_contents, old_contents=None, action='A', + scm_diff=None): 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 - self._scm_diff = "--- /dev/null\n+++ %s\n@@ -0,0 +1,%d @@\n" % (local_path, - len(new_contents)) + if scm_diff: + self._scm_diff = scm_diff + else: + self._scm_diff = ( + "--- /dev/null\n+++ %s\n@@ -0,0 +1,%d @@\n" % + (local_path, len(new_contents))) + for l in new_contents: + self._scm_diff += "+%s\n" % l self._old_contents = old_contents - for l in new_contents: - self._scm_diff += "+%s\n" % l def Action(self): return self._action -- cgit v1.2.1