OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 11 matching lines...) Expand all Loading... |
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 |
29 import json | 29 import json |
30 import unittest | 30 import unittest |
31 | 31 |
32 from webkitpy.common.net import layouttestresults_unittest | 32 from webkitpy.common.net import layout_test_results_unittest |
33 from webkitpy.common.host_mock import MockHost | 33 from webkitpy.common.host_mock import MockHost |
34 from webkitpy.layout_tests.layout_package.json_results_generator import strip_js
on_wrapper | 34 from webkitpy.layout_tests.layout_package.json_results_generator import strip_js
on_wrapper |
35 from webkitpy.layout_tests.port.base import Port | 35 from webkitpy.layout_tests.port.base import Port |
36 from webkitpy.tool.commands.rebaseline_server import TestConfig, RebaselineServe
r | 36 from webkitpy.tool.commands.rebaseline_server import TestConfig, RebaselineServe
r |
37 from webkitpy.tool.servers import rebaseline_server | 37 from webkitpy.tool.servers import rebaseline_server |
38 | 38 |
39 | 39 |
40 class RebaselineTestTest(unittest.TestCase): | 40 class RebaselineTestTest(unittest.TestCase): |
41 | 41 |
42 def test_text_rebaseline_update(self): | 42 def test_text_rebaseline_update(self): |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 baseline_move_to='none', | 199 baseline_move_to='none', |
200 expected_success=True, | 200 expected_success=True, |
201 expected_log=[ | 201 expected_log=[ |
202 'Rebaselining fast/image...', | 202 'Rebaselining fast/image...', |
203 ' Updating baselines for mac', | 203 ' Updating baselines for mac', |
204 ' Updated image-expected.checksum', | 204 ' Updated image-expected.checksum', |
205 ' Updated image-expected.png', | 205 ' Updated image-expected.png', |
206 ]) | 206 ]) |
207 | 207 |
208 def test_gather_baselines(self): | 208 def test_gather_baselines(self): |
209 example_json = layouttestresults_unittest.LayoutTestResultsTest.example_
full_results_json | 209 example_json = layout_test_results_unittest.LayoutTestResultsTest.exampl
e_full_results_json |
210 results_json = json.loads(strip_json_wrapper(example_json)) | 210 results_json = json.loads(strip_json_wrapper(example_json)) |
211 server = RebaselineServer() | 211 server = RebaselineServer() |
212 server._test_config = get_test_config() | 212 server._test_config = get_test_config() |
213 server._gather_baselines(results_json) | 213 server._gather_baselines(results_json) |
214 self.assertEqual( | 214 self.assertEqual( |
215 results_json['tests']['svg/dynamic-updates/SVGFEDropShadowElement-do
m-stdDeviation-attr.html']['state'], | 215 results_json['tests']['svg/dynamic-updates/SVGFEDropShadowElement-do
m-stdDeviation-attr.html']['state'], |
216 'needs_rebaseline') | 216 'needs_rebaseline') |
217 self.assertNotIn('prototype-chocolate.html', results_json['tests']) | 217 self.assertNotIn('prototype-chocolate.html', results_json['tests']) |
218 | 218 |
219 def _assertRebaseline(self, test_files, results_files, test_name, baseline_t
arget, | 219 def _assertRebaseline(self, test_files, results_files, test_name, baseline_t
arget, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 # Abstract method path_to_apache not implemented - pylint: disable=abstr
act-method | 312 # Abstract method path_to_apache not implemented - pylint: disable=abstr
act-method |
313 port_name = "mac" | 313 port_name = "mac" |
314 FALLBACK_PATHS = {'': ['mac']} | 314 FALLBACK_PATHS = {'': ['mac']} |
315 | 315 |
316 return TestConfig( | 316 return TestConfig( |
317 TestMacPort(host, 'mac'), | 317 TestMacPort(host, 'mac'), |
318 layout_tests_directory, | 318 layout_tests_directory, |
319 results_directory, | 319 results_directory, |
320 ('mac', 'mac-leopard', 'win', 'linux'), | 320 ('mac', 'mac-leopard', 'win', 'linux'), |
321 host) | 321 host) |
OLD | NEW |