Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 | 5 |
| 6 class Verifier: | 6 class Verifier: |
| 7 """Verifies that the current machine states match the expectation.""" | 7 """Verifies that the current machine states match the expectation.""" |
| 8 | 8 |
| 9 def VerifyInput(self, verifier_input, variable_expander): | 9 def VerifyInput(self, verifier_input, variable_expander): |
| 10 """Verifies that the current machine states match |verifier_input|. | 10 """Verifies that the current machine states match |verifier_input|. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 | 42 |
| 43 def _EvaluateCondition(self, condition): | 43 def _EvaluateCondition(self, condition): |
| 44 """Evaluates |condition| using eval(). | 44 """Evaluates |condition| using eval(). |
| 45 | 45 |
| 46 Args: | 46 Args: |
| 47 condition: A condition string. | 47 condition: A condition string. |
| 48 | 48 |
| 49 Returns: | 49 Returns: |
| 50 The result of the evaluated condition. | 50 The result of the evaluated condition. |
| 51 """ | 51 """ |
| 52 return eval(condition, {'__builtins__': None}, None) | 52 return eval(condition, {'__builtins__': {'False': False, 'True': True}}) |
|
gab
2015/04/08 14:28:29
This change looks like it makes sense to me, but I
grt (UTC plus 2)
2015/04/08 14:35:40
Prior to this change, $SUPPORTS_SXS wasn't evaluat
| |
| OLD | NEW |