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 |