| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import collections | 4 import collections |
| 5 import itertools | 5 import itertools |
| 6 import os | 6 import os |
| 7 import unittest | 7 import unittest |
| 8 | 8 |
| 9 from telemetry.testing import fakes | 9 from telemetry.testing import fakes |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 os_conditions = e.os_conditions | 100 os_conditions = e.os_conditions |
| 101 if 'win' in os_conditions: | 101 if 'win' in os_conditions: |
| 102 os_conditions += test_expectations.WIN_CONDITIONS | 102 os_conditions += test_expectations.WIN_CONDITIONS |
| 103 if 'mac' in os_conditions: | 103 if 'mac' in os_conditions: |
| 104 os_conditions += test_expectations.MAC_CONDITIONS | 104 os_conditions += test_expectations.MAC_CONDITIONS |
| 105 | 105 |
| 106 conditions_by_pattern[e.pattern].append(Conditions( | 106 conditions_by_pattern[e.pattern].append(Conditions( |
| 107 ( | 107 ( |
| 108 set(e.os_conditions), | 108 set(e.os_conditions), |
| 109 set(e.browser_conditions), | 109 set(e.browser_conditions), |
| 110 set(e.cmd_decoder_conditions), |
| 110 set(e.angle_conditions), | 111 set(e.angle_conditions), |
| 111 ), | 112 ), |
| 112 set(e.gpu_conditions), | 113 set(e.gpu_conditions), |
| 113 set(e.device_id_conditions), | 114 set(e.device_id_conditions), |
| 114 )) | 115 )) |
| 115 | 116 |
| 116 for (pattern, conditions) in conditions_by_pattern.iteritems(): | 117 for (pattern, conditions) in conditions_by_pattern.iteritems(): |
| 117 for (c1, c2) in itertools.combinations(conditions, 2): | 118 for (c1, c2) in itertools.combinations(conditions, 2): |
| 118 # Two conditions for the same page conflict iff we can find a | 119 # Two conditions for the same page conflict iff we can find a |
| 119 # configuration satisfying both conditions, that is iff for each | 120 # configuration satisfying both conditions, that is iff for each |
| (...skipping 25 matching lines...) Expand all Loading... |
| 145 conflicts = non_gpu_conflicts and gpu_conflicts | 146 conflicts = non_gpu_conflicts and gpu_conflicts |
| 146 | 147 |
| 147 if conflicts: | 148 if conflicts: |
| 148 print "WARNING: Found a conflict for", pattern, " :" | 149 print "WARNING: Found a conflict for", pattern, " :" |
| 149 print " ", c1 | 150 print " ", c1 |
| 150 print " ", c2 | 151 print " ", c2 |
| 151 | 152 |
| 152 print " Type:" + (" (non-gpu)" if non_gpu_conflicts else "") + \ | 153 print " Type:" + (" (non-gpu)" if non_gpu_conflicts else "") + \ |
| 153 (" (gpu)" if gpu_conflicts else "") | 154 (" (gpu)" if gpu_conflicts else "") |
| 154 self.assertEquals(conflicts, False) | 155 self.assertEquals(conflicts, False) |
| OLD | NEW |