| OLD | NEW |
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 if path in self._exclusion_list: | 44 if path in self._exclusion_list: |
| 45 return False | 45 return False |
| 46 return MockSCM.exists(self, path) | 46 return MockSCM.exists(self, path) |
| 47 | 47 |
| 48 def delete(self, path): | 48 def delete(self, path): |
| 49 return self.delete_list([path]) | 49 return self.delete_list([path]) |
| 50 | 50 |
| 51 def delete_list(self, paths): | 51 def delete_list(self, paths): |
| 52 for path in paths: | 52 for path in paths: |
| 53 if path in self._exclusion_list: | 53 if path in self._exclusion_list: |
| 54 raise Exception('File is not SCM managed: ' + path) | 54 raise Exception("File is not SCM managed: " + path) |
| 55 return MockSCM.delete_list(self, paths) | 55 return MockSCM.delete_list(self, paths) |
| 56 | 56 |
| 57 def move(self, origin, destination): | 57 def move(self, origin, destination): |
| 58 if origin in self._exclusion_list: | 58 if origin in self._exclusion_list: |
| 59 raise Exception('File is not SCM managed: ' + origin) | 59 raise Exception("File is not SCM managed: " + origin) |
| 60 return MockSCM.move(self, origin, destination) | 60 return MockSCM.move(self, origin, destination) |
| 61 | 61 |
| 62 | 62 |
| 63 class BaselineOptimizerTest(unittest.TestCase): | 63 class BaselineOptimizerTest(unittest.TestCase): |
| 64 | 64 |
| 65 def test_move_baselines(self): | 65 def test_move_baselines(self): |
| 66 host = MockHost(scm=ExcludingMockSCM( | 66 host = MockHost(scm=ExcludingMockSCM( |
| 67 ['/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another
/test-expected.txt'])) | 67 ['/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another
/test-expected.txt'])) |
| 68 host.filesystem.write_text_file('/mock-checkout/third_party/WebKit/Layou
tTests/VirtualTestSuites', '[]') | 68 host.filesystem.write_text_file('/mock-checkout/third_party/WebKit/Layou
tTests/VirtualTestSuites', '[]') |
| 69 host.filesystem.write_binary_file( | 69 host.filesystem.write_binary_file( |
| 70 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/
test-expected.txt', 'result A') | 70 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/
test-expected.txt', 'result A') |
| 71 host.filesystem.write_binary_file( | 71 host.filesystem.write_binary_file( |
| 72 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another/
test-expected.txt', 'result A') | 72 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another/
test-expected.txt', 'result A') |
| 73 host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/Lay
outTests/another/test-expected.txt', 'result B') | 73 host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/Lay
outTests/another/test-expected.txt', 'result B') |
| 74 baseline_optimizer = BaselineOptimizer(host, host.port_factory.get( | 74 baseline_optimizer = BaselineOptimizer(host, host.port_factory.get( |
| 75 ), host.port_factory.all_port_names(), skip_scm_commands=False) | 75 ), host.port_factory.all_port_names(), skip_scm_commands=False) |
| 76 baseline_optimizer.move_baselines( | 76 baseline_optimizer._move_baselines('another/test-expected.txt', { |
| 77 'another/test-expected.txt', | 77 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win': 'aaa', |
| 78 { | 78 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac': 'aaa', |
| 79 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win': 'a
aa', | 79 '/mock-checkout/third_party/WebKit/LayoutTests': 'bbb', |
| 80 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac': 'a
aa', | 80 }, { |
| 81 '/mock-checkout/third_party/WebKit/LayoutTests': 'bbb', | 81 '/mock-checkout/third_party/WebKit/LayoutTests': 'aaa', |
| 82 }, | 82 }) |
| 83 { | |
| 84 '/mock-checkout/third_party/WebKit/LayoutTests': 'aaa', | |
| 85 }) | |
| 86 self.assertEqual(host.filesystem.read_binary_file( | 83 self.assertEqual(host.filesystem.read_binary_file( |
| 87 '/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected
.txt'), 'result A') | 84 '/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected
.txt'), 'result A') |
| 88 | 85 |
| 89 def test_move_baselines_skip_scm_commands(self): | 86 def test_move_baselines_skip_scm_commands(self): |
| 90 host = MockHost(scm=ExcludingMockSCM( | 87 host = MockHost(scm=ExcludingMockSCM( |
| 91 ['/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another
/test-expected.txt'])) | 88 ['/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another
/test-expected.txt'])) |
| 92 host.filesystem.write_text_file('/mock-checkout/third_party/WebKit/Layou
tTests/VirtualTestSuites', '[]') | 89 host.filesystem.write_text_file('/mock-checkout/third_party/WebKit/Layou
tTests/VirtualTestSuites', '[]') |
| 93 host.filesystem.write_binary_file( | 90 host.filesystem.write_binary_file( |
| 94 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/
test-expected.txt', 'result A') | 91 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/
test-expected.txt', 'result A') |
| 95 host.filesystem.write_binary_file( | 92 host.filesystem.write_binary_file( |
| 96 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another/
test-expected.txt', 'result A') | 93 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/another/
test-expected.txt', 'result A') |
| 97 host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/Lay
outTests/another/test-expected.txt', 'result B') | 94 host.filesystem.write_binary_file('/mock-checkout/third_party/WebKit/Lay
outTests/another/test-expected.txt', 'result B') |
| 98 baseline_optimizer = BaselineOptimizer(host, host.port_factory.get( | 95 baseline_optimizer = BaselineOptimizer(host, host.port_factory.get( |
| 99 ), host.port_factory.all_port_names(), skip_scm_commands=True) | 96 ), host.port_factory.all_port_names(), skip_scm_commands=True) |
| 100 baseline_optimizer.move_baselines( | 97 baseline_optimizer._move_baselines('another/test-expected.txt', { |
| 101 'another/test-expected.txt', | 98 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win': 'aaa', |
| 102 { | 99 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac': 'aaa', |
| 103 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win': 'a
aa', | 100 '/mock-checkout/third_party/WebKit/LayoutTests': 'bbb', |
| 104 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac': 'a
aa', | 101 }, { |
| 105 '/mock-checkout/third_party/WebKit/LayoutTests': 'bbb', | 102 '/mock-checkout/third_party/WebKit/LayoutTests/platform/linux': 'bbb
', |
| 106 }, | 103 '/mock-checkout/third_party/WebKit/LayoutTests': 'aaa', |
| 107 { | 104 }) |
| 108 '/mock-checkout/third_party/WebKit/LayoutTests/platform/linux':
'bbb', | |
| 109 '/mock-checkout/third_party/WebKit/LayoutTests': 'aaa', | |
| 110 }) | |
| 111 self.assertEqual(host.filesystem.read_binary_file( | 105 self.assertEqual(host.filesystem.read_binary_file( |
| 112 '/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected
.txt'), 'result A') | 106 '/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected
.txt'), 'result A') |
| 113 | 107 |
| 114 self.assertEqual(baseline_optimizer.files_to_delete, [ | 108 self.assertEqual(baseline_optimizer._files_to_delete, [ |
| 115 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/
test-expected.txt', | 109 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/another/
test-expected.txt', |
| 116 ]) | 110 ]) |
| 117 | 111 |
| 118 self.assertEqual(baseline_optimizer.files_to_add, [ | 112 self.assertEqual(baseline_optimizer._files_to_add, [ |
| 119 '/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected
.txt', | 113 '/mock-checkout/third_party/WebKit/LayoutTests/another/test-expected
.txt', |
| 120 '/mock-checkout/third_party/WebKit/LayoutTests/platform/linux/anothe
r/test-expected.txt', | 114 '/mock-checkout/third_party/WebKit/LayoutTests/platform/linux/anothe
r/test-expected.txt', |
| 121 ]) | 115 ]) |
| 122 | 116 |
| 123 def _assert_optimization(self, dir_to_results, dir_to_expected_new_results, | 117 def _assertOptimization(self, results_by_directory, expected_new_results_by_
directory, |
| 124 baseline_dirname='', expected_files_to_delete=None,
host=None): | 118 baseline_dirname='', expected_files_to_delete=None,
host=None): |
| 125 if not host: | 119 if not host: |
| 126 host = MockHost() | 120 host = MockHost() |
| 127 fs = host.filesystem | 121 fs = host.filesystem |
| 128 webkit_base = WebKitFinder(fs).webkit_base() | 122 webkit_base = WebKitFinder(fs).webkit_base() |
| 129 baseline_name = 'mock-baseline-expected.txt' | 123 baseline_name = 'mock-baseline-expected.txt' |
| 130 fs.write_text_file(fs.join(webkit_base, 'LayoutTests', 'VirtualTestSuite
s'), | 124 fs.write_text_file(fs.join(webkit_base, 'LayoutTests', 'VirtualTestSuite
s'), |
| 131 '[{"prefix": "gpu", "base": "fast/canvas", "args": ["
--foo"]}]') | 125 '[{"prefix": "gpu", "base": "fast/canvas", "args": ["
--foo"]}]') |
| 132 | 126 |
| 133 for dirname, contents in dir_to_results.items(): | 127 for dirname, contents in results_by_directory.items(): |
| 134 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name) | 128 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name) |
| 135 fs.write_binary_file(path, contents) | 129 fs.write_binary_file(path, contents) |
| 136 | 130 |
| 137 baseline_optimizer = BaselineOptimizer(host, host.port_factory.get( | 131 baseline_optimizer = BaselineOptimizer(host, host.port_factory.get( |
| 138 ), host.port_factory.all_port_names(), skip_scm_commands=expected_files_
to_delete is not None) | 132 ), host.port_factory.all_port_names(), skip_scm_commands=expected_files_
to_delete is not None) |
| 139 self.assertTrue(baseline_optimizer.optimize(fs.join(baseline_dirname, ba
seline_name))) | 133 self.assertTrue(baseline_optimizer.optimize(fs.join(baseline_dirname, ba
seline_name))) |
| 140 | 134 |
| 141 for dirname, contents in dir_to_expected_new_results.items(): | 135 for dirname, contents in expected_new_results_by_directory.items(): |
| 142 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name) | 136 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name) |
| 143 if contents is None: | 137 if contents is None: |
| 144 self.assertTrue(not fs.exists(path) or path in baseline_optimize
r.files_to_delete) | 138 self.assertTrue(not fs.exists(path) or path in baseline_optimize
r._files_to_delete) |
| 145 else: | 139 else: |
| 146 self.assertEqual(fs.read_binary_file(path), contents) | 140 self.assertEqual(fs.read_binary_file(path), contents) |
| 147 | 141 |
| 148 # Check that the files that were in the original set have been deleted w
here necessary. | 142 # Check that the files that were in the original set have been deleted w
here necessary. |
| 149 for dirname in dir_to_results: | 143 for dirname in results_by_directory: |
| 150 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name) | 144 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name) |
| 151 if dirname not in dir_to_expected_new_results: | 145 if not dirname in expected_new_results_by_directory: |
| 152 self.assertTrue(not fs.exists(path) or path in baseline_optimize
r.files_to_delete) | 146 self.assertTrue(not fs.exists(path) or path in baseline_optimize
r._files_to_delete) |
| 153 | 147 |
| 154 if expected_files_to_delete: | 148 if expected_files_to_delete: |
| 155 self.assertEqual(sorted(baseline_optimizer.files_to_delete), sorted(
expected_files_to_delete)) | 149 self.assertEqual(sorted(baseline_optimizer._files_to_delete), sorted
(expected_files_to_delete)) |
| 156 | 150 |
| 157 def test_linux_redundant_with_win(self): | 151 def test_linux_redundant_with_win(self): |
| 158 self._assert_optimization( | 152 self._assertOptimization({ |
| 159 { | 153 'platform/win': '1', |
| 160 'platform/win': '1', | 154 'platform/linux': '1', |
| 161 'platform/linux': '1', | 155 }, { |
| 162 }, | 156 'platform/win': '1', |
| 163 { | 157 }) |
| 164 'platform/win': '1', | |
| 165 }) | |
| 166 | 158 |
| 167 def test_covers_mac_win_linux(self): | 159 def test_covers_mac_win_linux(self): |
| 168 self._assert_optimization( | 160 self._assertOptimization({ |
| 169 { | 161 'platform/mac': '1', |
| 170 'platform/mac': '1', | 162 'platform/win': '1', |
| 171 'platform/win': '1', | 163 'platform/linux': '1', |
| 172 'platform/linux': '1', | 164 '': None, |
| 173 '': None, | 165 }, { |
| 174 }, | 166 '': '1', |
| 175 { | 167 }) |
| 176 '': '1', | |
| 177 }) | |
| 178 | 168 |
| 179 def test_overwrites_root(self): | 169 def test_overwrites_root(self): |
| 180 self._assert_optimization( | 170 self._assertOptimization({ |
| 181 { | 171 'platform/mac': '1', |
| 182 'platform/mac': '1', | 172 'platform/win': '1', |
| 183 'platform/win': '1', | 173 'platform/linux': '1', |
| 184 'platform/linux': '1', | 174 '': '2', |
| 185 '': '2', | 175 }, { |
| 186 }, | 176 '': '1', |
| 187 { | 177 }) |
| 188 '': '1', | |
| 189 }) | |
| 190 | 178 |
| 191 def test_no_new_common_directory(self): | 179 def test_no_new_common_directory(self): |
| 192 self._assert_optimization( | 180 self._assertOptimization({ |
| 193 { | 181 'platform/mac': '1', |
| 194 'platform/mac': '1', | 182 'platform/linux': '1', |
| 195 'platform/linux': '1', | 183 '': '2', |
| 196 '': '2', | 184 }, { |
| 197 }, | 185 'platform/mac': '1', |
| 198 { | 186 'platform/linux': '1', |
| 199 'platform/mac': '1', | 187 '': '2', |
| 200 'platform/linux': '1', | 188 }) |
| 201 '': '2', | |
| 202 }) | |
| 203 | 189 |
| 204 def test_local_optimization(self): | 190 def test_local_optimization(self): |
| 205 self._assert_optimization( | 191 self._assertOptimization({ |
| 206 { | 192 'platform/mac': '1', |
| 207 'platform/mac': '1', | 193 'platform/linux': '1', |
| 208 'platform/linux': '1', | 194 'platform/linux-precise': '1', |
| 209 'platform/linux-precise': '1', | 195 }, { |
| 210 }, | 196 'platform/mac': '1', |
| 211 { | 197 'platform/linux': '1', |
| 212 'platform/mac': '1', | 198 }) |
| 213 'platform/linux': '1', | |
| 214 }) | |
| 215 | 199 |
| 216 def test_local_optimization_skipping_a_port_in_the_middle(self): | 200 def test_local_optimization_skipping_a_port_in_the_middle(self): |
| 217 self._assert_optimization( | 201 self._assertOptimization({ |
| 218 { | 202 'platform/mac-snowleopard': '1', |
| 219 'platform/mac-snowleopard': '1', | 203 'platform/win': '1', |
| 220 'platform/win': '1', | 204 'platform/linux': '1', |
| 221 'platform/linux': '1', | 205 'platform/linux-precise': '1', |
| 222 'platform/linux-precise': '1', | 206 }, { |
| 223 }, | 207 'platform/mac-snowleopard': '1', |
| 224 { | 208 'platform/win': '1', |
| 225 'platform/mac-snowleopard': '1', | 209 }) |
| 226 'platform/win': '1', | |
| 227 }) | |
| 228 | 210 |
| 229 def test_baseline_redundant_with_root(self): | 211 def test_baseline_redundant_with_root(self): |
| 230 self._assert_optimization( | 212 self._assertOptimization({ |
| 231 { | 213 'platform/mac': '1', |
| 232 'platform/mac': '1', | 214 'platform/win': '2', |
| 233 'platform/win': '2', | 215 '': '2', |
| 234 '': '2', | 216 }, { |
| 235 }, | 217 'platform/mac': '1', |
| 236 { | 218 '': '2', |
| 237 'platform/mac': '1', | 219 }) |
| 238 '': '2', | |
| 239 }) | |
| 240 | 220 |
| 241 def test_root_baseline_unused(self): | 221 def test_root_baseline_unused(self): |
| 242 self._assert_optimization( | 222 self._assertOptimization({ |
| 243 { | 223 'platform/mac': '1', |
| 244 'platform/mac': '1', | 224 'platform/win': '2', |
| 245 'platform/win': '2', | 225 '': '3', |
| 246 '': '3', | 226 }, { |
| 247 }, | 227 'platform/mac': '1', |
| 248 { | 228 'platform/win': '2', |
| 249 'platform/mac': '1', | 229 }) |
| 250 'platform/win': '2', | |
| 251 }) | |
| 252 | 230 |
| 253 def test_root_baseline_unused_and_non_existant(self): | 231 def test_root_baseline_unused_and_non_existant(self): |
| 254 self._assert_optimization( | 232 self._assertOptimization({ |
| 255 { | 233 'platform/mac': '1', |
| 256 'platform/mac': '1', | 234 'platform/win': '2', |
| 257 'platform/win': '2', | 235 }, { |
| 258 }, | 236 'platform/mac': '1', |
| 259 { | 237 'platform/win': '2', |
| 260 'platform/mac': '1', | 238 }) |
| 261 'platform/win': '2', | |
| 262 }) | |
| 263 | 239 |
| 264 def test_virtual_root_redundant_with_actual_root(self): | 240 def test_virtual_root_redundant_with_actual_root(self): |
| 265 self._assert_optimization( | 241 self._assertOptimization({ |
| 266 { | 242 'virtual/gpu/fast/canvas': '2', |
| 267 'virtual/gpu/fast/canvas': '2', | 243 'fast/canvas': '2', |
| 268 'fast/canvas': '2', | 244 }, { |
| 269 }, | 245 'virtual/gpu/fast/canvas': None, |
| 270 { | 246 'fast/canvas': '2', |
| 271 'virtual/gpu/fast/canvas': None, | 247 }, baseline_dirname='virtual/gpu/fast/canvas') |
| 272 'fast/canvas': '2', | |
| 273 }, | |
| 274 baseline_dirname='virtual/gpu/fast/canvas') | |
| 275 | 248 |
| 276 def test_virtual_root_redundant_with_ancestors(self): | 249 def test_virtual_root_redundant_with_ancestors(self): |
| 277 self._assert_optimization( | 250 self._assertOptimization({ |
| 278 { | 251 'virtual/gpu/fast/canvas': '2', |
| 279 'virtual/gpu/fast/canvas': '2', | 252 'platform/mac/fast/canvas': '2', |
| 280 'platform/mac/fast/canvas': '2', | 253 'platform/win/fast/canvas': '2', |
| 281 'platform/win/fast/canvas': '2', | 254 }, { |
| 282 }, | 255 'virtual/gpu/fast/canvas': None, |
| 283 { | 256 'fast/canvas': '2', |
| 284 'virtual/gpu/fast/canvas': None, | 257 }, baseline_dirname='virtual/gpu/fast/canvas') |
| 285 'fast/canvas': '2', | |
| 286 }, | |
| 287 baseline_dirname='virtual/gpu/fast/canvas') | |
| 288 | 258 |
| 289 def test_virtual_root_redundant_with_ancestors_skip_scm_commands(self): | 259 def test_virtual_root_redundant_with_ancestors_skip_scm_commands(self): |
| 290 self._assert_optimization( | 260 self._assertOptimization({ |
| 291 { | 261 'virtual/gpu/fast/canvas': '2', |
| 292 'virtual/gpu/fast/canvas': '2', | 262 'platform/mac/fast/canvas': '2', |
| 293 'platform/mac/fast/canvas': '2', | 263 'platform/win/fast/canvas': '2', |
| 294 'platform/win/fast/canvas': '2', | 264 }, { |
| 295 }, | 265 'virtual/gpu/fast/canvas': None, |
| 296 { | 266 'fast/canvas': '2', |
| 297 'virtual/gpu/fast/canvas': None, | 267 }, |
| 298 'fast/canvas': '2', | |
| 299 }, | |
| 300 baseline_dirname='virtual/gpu/fast/canvas', | 268 baseline_dirname='virtual/gpu/fast/canvas', |
| 301 expected_files_to_delete=[ | 269 expected_files_to_delete=[ |
| 302 '/mock-checkout/third_party/WebKit/LayoutTests/virtual/gpu/fast/
canvas/mock-baseline-expected.txt', | 270 '/mock-checkout/third_party/WebKit/LayoutTests/virtual/gpu/fast/canv
as/mock-baseline-expected.txt', |
| 303 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/fast
/canvas/mock-baseline-expected.txt', | 271 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/fast/can
vas/mock-baseline-expected.txt', |
| 304 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/fast
/canvas/mock-baseline-expected.txt', | 272 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/fast/can
vas/mock-baseline-expected.txt', |
| 305 ]) | 273 ]) |
| 306 | 274 |
| 307 def test_virtual_root_redundant_with_ancestors_skip_scm_commands_with_file_n
ot_in_scm(self): | 275 def test_virtual_root_redundant_with_ancestors_skip_scm_commands_with_file_n
ot_in_scm(self): |
| 308 self._assert_optimization( | 276 self._assertOptimization({ |
| 309 { | 277 'virtual/gpu/fast/canvas': '2', |
| 310 'virtual/gpu/fast/canvas': '2', | 278 'platform/mac/fast/canvas': '2', |
| 311 'platform/mac/fast/canvas': '2', | 279 'platform/win/fast/canvas': '2', |
| 312 'platform/win/fast/canvas': '2', | 280 }, { |
| 313 }, | 281 'virtual/gpu/fast/canvas': None, |
| 314 { | 282 'fast/canvas': '2', |
| 315 'virtual/gpu/fast/canvas': None, | 283 }, |
| 316 'fast/canvas': '2', | |
| 317 }, | |
| 318 baseline_dirname='virtual/gpu/fast/canvas', | 284 baseline_dirname='virtual/gpu/fast/canvas', |
| 319 expected_files_to_delete=[ | 285 expected_files_to_delete=[ |
| 320 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/fast
/canvas/mock-baseline-expected.txt', | 286 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/fast/can
vas/mock-baseline-expected.txt', |
| 321 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/fast
/canvas/mock-baseline-expected.txt', | 287 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/fast/can
vas/mock-baseline-expected.txt', |
| 322 ], | 288 ], |
| 323 host=MockHost(scm=ExcludingMockSCM([ | 289 host=MockHost(scm=ExcludingMockSCM(['/mock-checkout/third_party/WebK
it/LayoutTests/virtual/gpu/fast/canvas/mock-baseline-expected.txt']))) |
| 324 '/mock-checkout/third_party/WebKit/LayoutTests/virtual/gpu/fast/
canvas/mock-baseline-expected.txt' | |
| 325 ]))) | |
| 326 | 290 |
| 327 def test_virtual_root_not_redundant_with_ancestors(self): | 291 def test_virtual_root_not_redundant_with_ancestors(self): |
| 328 self._assert_optimization( | 292 self._assertOptimization({ |
| 329 { | 293 'virtual/gpu/fast/canvas': '2', |
| 330 'virtual/gpu/fast/canvas': '2', | 294 'platform/mac/fast/canvas': '1', |
| 331 'platform/mac/fast/canvas': '1', | 295 }, { |
| 332 }, | 296 'virtual/gpu/fast/canvas': '2', |
| 333 { | 297 'platform/mac/fast/canvas': '1', |
| 334 'virtual/gpu/fast/canvas': '2', | 298 }, baseline_dirname='virtual/gpu/fast/canvas') |
| 335 'platform/mac/fast/canvas': '1', | |
| 336 }, | |
| 337 baseline_dirname='virtual/gpu/fast/canvas') | |
| OLD | NEW |