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

Side by Side Diff: testing_support/patches_data.py

Issue 9147056: Fix for single line file modification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « patch.py ('k') | tests/patch_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Samples patches to test patch.py.""" 5 """Samples patches to test patch.py."""
6 6
7 7
8 class RAW(object): 8 class RAW(object):
9 PATCH = ( 9 PATCH = (
10 'Index: chrome/file.cc\n' 10 'Index: chrome/file.cc\n'
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 ' <message name="IDS_ACCNAME_WEB_CONTENTS" desc="The acces...\n' 105 ' <message name="IDS_ACCNAME_WEB_CONTENTS" desc="The acces...\n'
106 ' Web Contents\n' 106 ' Web Contents\n'
107 ' </message>\n' 107 ' </message>\n'
108 '- <message name="IDS_ACCNAME_SIDE_BAR" desc="The acces...\n' 108 '- <message name="IDS_ACCNAME_SIDE_BAR" desc="The acces...\n'
109 '- Sidebar\n' 109 '- Sidebar\n'
110 '- </message>\n' 110 '- </message>\n'
111 ' \n' 111 ' \n'
112 ' <!-- Browser Hung Plugin Detector -->\n' 112 ' <!-- Browser Hung Plugin Detector -->\n'
113 ' <message name="IDS_UNKNOWN_PLUGIN_NAME" ...\n') 113 ' <message name="IDS_UNKNOWN_PLUGIN_NAME" ...\n')
114 114
115 # http://codereview.chromium.org/download/issue9091003_9005_8009.diff
116 DIFFERENT = (
117 'Index: master/unittests/data/processes-summary.dat\n'
118 '===================================================================\n'
119 '--- master/unittests/data/processes-summary.dat\t(revision 116240)\n'
120 '+++ master/unittests/data/processes-summary.dat\t(working copy)\n'
121 '@@ -1 +1 @@\n'
122 '-{"traces": {"1t_proc": ["2.0", "0.0"], "1t_proc_ref": ["1.0", ...\n'
123 '+{"traces": {"1t_proc": ["2.0", "0.0"], "1t_proc_ref": ["1.0", ...\n')
124
125
115 class GIT(object): 126 class GIT(object):
116 """Sample patches generated by git diff.""" 127 """Sample patches generated by git diff."""
117 PATCH = ( 128 PATCH = (
118 'diff --git a/chrome/file.cc b/chrome/file.cc\n' 129 'diff --git a/chrome/file.cc b/chrome/file.cc\n'
119 'index 0e4de76..8320059 100644\n' 130 'index 0e4de76..8320059 100644\n'
120 '--- a/chrome/file.cc\n' 131 '--- a/chrome/file.cc\n'
121 '+++ b/chrome/file.cc\n' 132 '+++ b/chrome/file.cc\n'
122 '@@ -3,6 +3,7 @@ bb\n' 133 '@@ -3,6 +3,7 @@ bb\n'
123 ' ccc\n' 134 ' ccc\n'
124 ' dd\n' 135 ' dd\n'
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 ' \n' 309 ' \n'
299 ' def GenerateScmDiff(self):\n' 310 ' def GenerateScmDiff(self):\n'
300 '- return scm.GIT.GenerateDiff(self._local_root, files=[self.Lo...\n' 311 '- return scm.GIT.GenerateDiff(self._local_root, files=[self.Lo...\n'
301 '+ if self._diff is None:\n' 312 '+ if self._diff is None:\n'
302 '+ self._diff = scm.GIT.GenerateDiff(\n' 313 '+ self._diff = scm.GIT.GenerateDiff(\n'
303 '+ self._local_root, files=[self.LocalPath(),])\n' 314 '+ self._local_root, files=[self.LocalPath(),])\n'
304 '+ return self._diff\n' 315 '+ return self._diff\n'
305 ' \n' 316 ' \n'
306 ' \n' 317 ' \n'
307 ' class Change(object):\n') 318 ' class Change(object):\n')
OLDNEW
« no previous file with comments | « patch.py ('k') | tests/patch_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698