| 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 import functools | 5 import functools |
| 6 import imp | 6 import imp |
| 7 import inspect | 7 import inspect |
| 8 import os | 8 import os |
| 9 import sys | 9 import sys |
| 10 import tempfile | 10 import tempfile |
| 11 | 11 |
| 12 | 12 |
| 13 class RecipeAbort(Exception): |
| 14 pass |
| 15 |
| 16 |
| 13 class Placeholder(object): | 17 class Placeholder(object): |
| 14 """Base class for json placeholders. Do not use directly.""" | 18 """Base class for json placeholders. Do not use directly.""" |
| 15 def render(self, test_data): # pragma: no cover | 19 def render(self, test_data): # pragma: no cover |
| 16 """Return [cmd items]*""" | 20 """Return [cmd items]*""" |
| 17 raise NotImplementedError | 21 raise NotImplementedError |
| 18 | 22 |
| 19 def step_finished(self, presentation, step_result, test_data): | 23 def step_finished(self, presentation, step_result, test_data): |
| 20 """Called after step completion. Intended to modify step_result.""" | 24 """Called after step completion. Intended to modify step_result.""" |
| 21 pass | 25 pass |
| 22 | 26 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 if pre: | 311 if pre: |
| 308 old_followup(step_result) | 312 old_followup(step_result) |
| 309 f(step_result) | 313 f(step_result) |
| 310 else: | 314 else: |
| 311 f(step_result) | 315 f(step_result) |
| 312 old_followup(step_result) | 316 old_followup(step_result) |
| 313 if old_followup is not null_fn: | 317 if old_followup is not null_fn: |
| 314 _inner.__name__ += '[%s]' % old_followup.__name__ | 318 _inner.__name__ += '[%s]' % old_followup.__name__ |
| 315 return _inner | 319 return _inner |
| 316 return decorator | 320 return decorator |
| OLD | NEW |