| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = layouttestresults_unittest.LayoutTestResultsTest.example_
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(results_json['tests'][ | 214 self.assertEqual(results_json['tests'][ |
| 215 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDevi
ation-attr.html']['state'], 'needs_rebaseline') | 215 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDevi
ation-attr.html']['state'], 'needs_rebaseline') |
| 216 self.assertNotIn('prototype-chocolate.html', results_json['tests']) | 216 self.assertNotIn('prototype-chocolate.html', results_json['tests']) |
| 217 | 217 |
| 218 def _assertRebaseline(self, test_files, results_files, test_name, baseline_t
arget, baseline_move_to, expected_success, expected_log): | 218 def _assertRebaseline(self, test_files, results_files, test_name, baseline_t
arget, |
| 219 baseline_move_to, expected_success, expected_log): |
| 219 log = [] | 220 log = [] |
| 220 test_config = get_test_config(test_files, results_files) | 221 test_config = get_test_config(test_files, results_files) |
| 221 success = rebaselineserver._rebaseline_test( | 222 success = rebaselineserver._rebaseline_test( |
| 222 test_name, | 223 test_name, |
| 223 baseline_target, | 224 baseline_target, |
| 224 baseline_move_to, | 225 baseline_move_to, |
| 225 test_config, | 226 test_config, |
| 226 log=lambda l: log.append(l)) | 227 log=lambda l: log.append(l)) |
| 227 self.assertEqual(expected_log, log) | 228 self.assertEqual(expected_log, log) |
| 228 self.assertEqual(expected_success, success) | 229 self.assertEqual(expected_success, success) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 class TestMacPort(Port): | 308 class TestMacPort(Port): |
| 308 port_name = "mac" | 309 port_name = "mac" |
| 309 FALLBACK_PATHS = {'': ['mac']} | 310 FALLBACK_PATHS = {'': ['mac']} |
| 310 | 311 |
| 311 return TestConfig( | 312 return TestConfig( |
| 312 TestMacPort(host, 'mac'), | 313 TestMacPort(host, 'mac'), |
| 313 layout_tests_directory, | 314 layout_tests_directory, |
| 314 results_directory, | 315 results_directory, |
| 315 ('mac', 'mac-leopard', 'win', 'linux'), | 316 ('mac', 'mac-leopard', 'win', 'linux'), |
| 316 host) | 317 host) |
| OLD | NEW |