Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import json | 5 import json |
| 6 import optparse | 6 import optparse |
| 7 | 7 |
| 8 from webkitpy.common.net.buildbot import Build | 8 from webkitpy.common.net.buildbot import Build |
| 9 from webkitpy.common.net.rietveld import Rietveld | 9 from webkitpy.common.net.rietveld import Rietveld |
| 10 from webkitpy.common.net.web_mock import MockWeb | 10 from webkitpy.common.net.web_mock import MockWeb |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 'INFO: Rebaselining fast/dom/prototype-taco.html\n', | 154 'INFO: Rebaselining fast/dom/prototype-taco.html\n', |
| 155 'INFO: Rebaselining svg/dynamic-updates/SVGFEDropShadowElement-dom-s tdDeviation-attr.html\n', | 155 'INFO: Rebaselining svg/dynamic-updates/SVGFEDropShadowElement-dom-s tdDeviation-attr.html\n', |
| 156 ]) | 156 ]) |
| 157 # The first executive call, before the rebaseline calls, is triggering t ry jobs. | 157 # The first executive call, before the rebaseline calls, is triggering t ry jobs. |
| 158 self.assertEqual(self.tool.executive.calls[0], ['git', 'cl', 'try', '-b' , 'MOCK Try Linux']) | 158 self.assertEqual(self.tool.executive.calls[0], ['git', 'cl', 'try', '-b' , 'MOCK Try Linux']) |
| 159 | 159 |
| 160 def test_rebaseline_calls(self): | 160 def test_rebaseline_calls(self): |
| 161 """Tests the list of commands that are invoked when rebaseline is called .""" | 161 """Tests the list of commands that are invoked when rebaseline is called .""" |
| 162 # First write test contents to the mock filesystem so that | 162 # First write test contents to the mock filesystem so that |
| 163 # fast/dom/prototype-taco.html is considered a real test to rebaseline. | 163 # fast/dom/prototype-taco.html is considered a real test to rebaseline. |
| 164 # TODO(qyearsley): Change this to avoid accessing protected methods. | |
| 165 # pylint: disable=protected-access | |
| 166 port = self.tool.port_factory.get('test-win-win7') | 164 port = self.tool.port_factory.get('test-win-win7') |
| 167 self._write( | 165 self._write( |
| 168 port._filesystem.join(port.layout_tests_dir(), 'fast/dom/prototype-t aco.html'), | 166 port.host.filesystem.join(port.layout_tests_dir(), 'fast/dom/prototy pe-taco.html'), |
|
jeffcarp
2016/10/05 21:17:44
This looks like it might not belong in this CL?
qyearsley
2016/10/05 23:09:52
You're right -- it's not related to the topic of t
| |
| 169 'test contents') | 167 'test contents') |
| 170 | 168 |
| 171 self.command._rebaseline( | 169 self.command.rebaseline( |
| 172 self.command_options(issue=11112222), | 170 self.command_options(issue=11112222), |
| 173 {"fast/dom/prototype-taco.html": {Build("MOCK Try Win", 5000): ["txt ", "png"]}}) | 171 {"fast/dom/prototype-taco.html": {Build("MOCK Try Win", 5000): ["txt ", "png"]}}) |
| 174 | 172 |
| 175 self.assertEqual( | 173 self.assertEqual( |
| 176 self.tool.executive.calls, | 174 self.tool.executive.calls, |
| 177 [ | 175 [ |
| 178 [['python', 'echo', 'copy-existing-baselines-internal', '--suffi xes', 'txt', | 176 [['python', 'echo', 'copy-existing-baselines-internal', '--suffi xes', 'txt', |
| 179 '--builder', 'MOCK Try Win', '--test', 'fast/dom/prototype-tac o.html', '--build-number', '5000']], | 177 '--builder', 'MOCK Try Win', '--test', 'fast/dom/prototype-tac o.html', '--build-number', '5000']], |
| 180 [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 't xt', | 178 [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 't xt', |
| 181 '--builder', 'MOCK Try Win', '--test', 'fast/dom/prototype-tac o.html', '--build-number', '5000']], | 179 '--builder', 'MOCK Try Win', '--test', 'fast/dom/prototype-tac o.html', '--build-number', '5000']], |
| 182 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '-- suffixes', 'txt', 'fast/dom/prototype-taco.html']] | 180 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '-- suffixes', 'txt', 'fast/dom/prototype-taco.html']] |
| 183 ]) | 181 ]) |
| OLD | NEW |