| 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 64f128706704a0c2ac1239da1bc064f5c934311a..a3277e96b36a0848277cae48178be775af812f72 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
|
| @@ -12,7 +12,7 @@ from webkitpy.common.system.outputcapture import OutputCapture
|
| from webkitpy.layout_tests.builder_list import BuilderList
|
| from webkitpy.tool.commands.rebaseline import (
|
| AbstractParallelRebaselineCommand, CopyExistingBaselinesInternal,
|
| - Rebaseline, RebaselineExpectations, RebaselineJson, RebaselineTest, ChangeSet
|
| + Rebaseline, RebaselineExpectations, RebaselineJson, RebaselineTest
|
| )
|
| from webkitpy.tool.mock_tool import MockWebKitPatch
|
|
|
| @@ -131,14 +131,13 @@ class TestCopyExistingBaselinesInternal(BaseTestCase):
|
| oc.capture_output()
|
| self.command.execute(options, [], self.tool)
|
| finally:
|
| - out, _, _ = oc.restore_output()
|
| + oc.restore_output()
|
|
|
| self.assertMultiLineEqual(
|
| self._read(self.tool.filesystem.join(
|
| port.layout_tests_dir(),
|
| 'platform/test-mac-mac10.10/failures/expected/image-expected.txt')),
|
| 'original mac10.11 result')
|
| - self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [], "delete": []}\n')
|
|
|
| def test_copying_overwritten_baseline_to_multiple_locations(self):
|
| self.tool.executive = MockExecutive2()
|
| @@ -160,7 +159,7 @@ class TestCopyExistingBaselinesInternal(BaseTestCase):
|
| oc.capture_output()
|
| self.command.execute(options, [], self.tool)
|
| finally:
|
| - out, _, _ = oc.restore_output()
|
| + oc.restore_output()
|
|
|
| self.assertMultiLineEqual(
|
| self._read(self.tool.filesystem.join(
|
| @@ -171,7 +170,6 @@ class TestCopyExistingBaselinesInternal(BaseTestCase):
|
| port.layout_tests_dir(), 'platform/test-linux-precise/userscripts/another-test-expected.txt')))
|
| self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(
|
| port.layout_tests_dir(), 'platform/test-mac-mac10.10/userscripts/another-test-expected.txt')))
|
| - self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [], "delete": []}\n')
|
|
|
| def test_no_copy_existing_baseline(self):
|
| self.tool.executive = MockExecutive2()
|
| @@ -195,7 +193,7 @@ class TestCopyExistingBaselinesInternal(BaseTestCase):
|
| oc.capture_output()
|
| self.command.execute(options, [], self.tool)
|
| finally:
|
| - out, _, _ = oc.restore_output()
|
| + oc.restore_output()
|
|
|
| self.assertMultiLineEqual(
|
| self._read(self.tool.filesystem.join(
|
| @@ -209,7 +207,6 @@ class TestCopyExistingBaselinesInternal(BaseTestCase):
|
| 'original win7 result')
|
| self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(
|
| port.layout_tests_dir(), 'platform/test-mac-mac10.10/userscripts/another-test-expected.txt')))
|
| - self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [], "delete": []}\n')
|
|
|
| def test_no_copy_skipped_test(self):
|
| self.tool.executive = MockExecutive2()
|
| @@ -323,22 +320,7 @@ class TestRebaselineTest(BaseTestCase):
|
| OutputCapture().assert_outputs(
|
| self, self.command._rebaseline_test_and_update_expectations, args=[self.options(suffixes='png')],
|
| expected_logs="Cannot rebaseline image result for reftest: userscripts/another-test.html\n")
|
| - self.assertDictEqual(self.command._scm_changes.to_dict(), {'add': [], 'remove-lines': [], "delete": []})
|
| -
|
| - def test_rebaseline_test_and_print_scm_changes(self):
|
| - self.command._print_scm_changes = True
|
| - self.command._scm_changes = ChangeSet()
|
| - self.tool._scm.exists = lambda x: False
|
| -
|
| - self.command._rebaseline_test("MOCK Trusty", "userscripts/another-test.html", "txt", None)
|
| -
|
| - self.assertDictEqual(
|
| - self.command._scm_changes.to_dict(),
|
| - {
|
| - 'add': ['/test.checkout/LayoutTests/platform/test-linux-trusty/userscripts/another-test-expected.txt'],
|
| - 'delete': [],
|
| - 'remove-lines': []
|
| - })
|
| + self.assertDictEqual(self.command.expectation_line_changes.to_dict(), {'remove-lines': []})
|
|
|
| def test_rebaseline_test_internal_with_port_that_lacks_buildbot(self):
|
| self.tool.executive = MockExecutive2()
|
| @@ -374,7 +356,7 @@ class TestRebaselineTest(BaseTestCase):
|
| self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(
|
| port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt')))
|
| self.assertMultiLineEqual(
|
| - out, '{"add": [], "remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Win10"}], "delete": []}\n')
|
| + out, '{"remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Win10"}]}\n')
|
|
|
|
|
| class TestAbstractParallelRebaselineCommand(BaseTestCase):
|
| @@ -438,7 +420,7 @@ class TestRebaselineJson(BaseTestCase):
|
| '--builder', 'MOCK Win7', '--test', 'userscripts/first-test.html', '--verbose']],
|
| [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt,png',
|
| '--builder', 'MOCK Win7', '--test', 'userscripts/first-test.html', '--verbose']],
|
| - [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt,png',
|
| + [['python', 'echo', 'optimize-baselines', '--suffixes', 'txt,png',
|
| 'userscripts/first-test.html', '--verbose']]
|
| ])
|
|
|
| @@ -456,7 +438,7 @@ class TestRebaselineJson(BaseTestCase):
|
| '--builder', 'MOCK Win7 (dbg)', '--test', 'userscripts/first-test.html', '--verbose']],
|
| [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt,png', '--builder',
|
| 'MOCK Win7 (dbg)', '--test', 'userscripts/first-test.html', '--verbose']],
|
| - [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt,png',
|
| + [['python', 'echo', 'optimize-baselines', '--suffixes', 'txt,png',
|
| 'userscripts/first-test.html', '--verbose']]
|
| ])
|
|
|
| @@ -936,7 +918,7 @@ class MockLineRemovingExecutive(MockExecutive):
|
| for cmd_line, cwd in commands:
|
| out = self.run_command(cmd_line, cwd=cwd)
|
| if 'rebaseline-test-internal' in cmd_line:
|
| - out = '{"add": [], "remove-lines": [{"test": "%s", "builder": "%s"}], "delete": []}\n' % (cmd_line[8], cmd_line[6])
|
| + out = '{"remove-lines": [{"test": "%s", "builder": "%s"}]}\n' % (cmd_line[8], cmd_line[6])
|
| command_outputs.append([0, out, ''])
|
|
|
| new_calls = self.calls[num_previous_calls:]
|
|
|