summaryrefslogtreecommitdiff
path: root/chromium/PRESUBMIT_test_mocks.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-05 14:08:31 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-11 07:46:53 +0000
commit6a4cabb866f66d4128a97cdc6d9d08ce074f1247 (patch)
treeab00f70a5e89278d6a0d16ff0c42578dc4d84a2d /chromium/PRESUBMIT_test_mocks.py
parente733310db58160074f574c429d48f8308c0afe17 (diff)
downloadqtwebengine-chromium-6a4cabb866f66d4128a97cdc6d9d08ce074f1247.tar.gz
BASELINE: Update Chromium to 57.0.2987.144
Change-Id: I29db402ff696c71a04c4dbaec822c2e53efe0267 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/PRESUBMIT_test_mocks.py')
-rw-r--r--chromium/PRESUBMIT_test_mocks.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/PRESUBMIT_test_mocks.py b/chromium/PRESUBMIT_test_mocks.py
index 772f405725b..c269deec1fb 100644
--- a/chromium/PRESUBMIT_test_mocks.py
+++ b/chromium/PRESUBMIT_test_mocks.py
@@ -99,6 +99,10 @@ class MockFile(object):
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))
+ for l in new_contents:
+ self._scm_diff += "+%s\n" % l
def Action(self):
return self._action
@@ -115,6 +119,9 @@ class MockFile(object):
def AbsoluteLocalPath(self):
return self._local_path
+ def GenerateScmDiff(self):
+ return self._scm_diff
+
def rfind(self, p):
"""os.path.basename is called on MockFile so we need an rfind method."""
return self._local_path.rfind(p)