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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

Issue 2590693002: Only add unstaged baseline changes to the git index when rebaselining. (Closed)
Patch Set: rebaseline-cl: Abort if there are unstaged baseline changes. Created 4 years 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 | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index 496ab1dd7975257aed38ee703f59b7cbcf167d67..882cd5a02965ff14a1c9cfac7ea7021084d1bb32 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -484,6 +484,22 @@ class TestRebaselineJson(BaseTestCase):
'--builder', 'MOCK Win7', '--test', 'userscripts/first-test.html', '--verbose', '--results-directory', '/tmp']]
])
+ def test_unstaged_baselines(self):
+ scm = self.tool.scm()
+ scm.unstaged_changes = lambda: {
+ 'third_party/WebKit/LayoutTests/x/foo-expected.txt': 'M',
+ 'third_party/WebKit/LayoutTests/x/foo-expected.something': '?',
+ 'third_party/WebKit/LayoutTests/x/foo-expected.png': '?',
+ 'third_party/WebKit/LayoutTests/x/foo.html': 'M',
+ 'docs/something.md': '?',
+ }
+ self.assertEqual(
+ self.command.unstaged_baselines(),
+ [
+ '/mock-checkout/third_party/WebKit/LayoutTests/x/foo-expected.png',
+ '/mock-checkout/third_party/WebKit/LayoutTests/x/foo-expected.txt',
+ ])
+
class TestRebaselineJsonUpdatesExpectationsFiles(BaseTestCase):
command_constructor = RebaselineJson
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698