Chromium Code Reviews| Index: tools/telemetry/telemetry/page/actions/wait.py |
| diff --git a/tools/telemetry/telemetry/page/actions/wait.py b/tools/telemetry/telemetry/page/actions/wait.py |
| index 4cb8742f267be96fd298c2d7a62128d489acc596..d2c8073ef69dfb95e25542c1154fdfd7e1c950d8 100644 |
| --- a/tools/telemetry/telemetry/page/actions/wait.py |
| +++ b/tools/telemetry/telemetry/page/actions/wait.py |
| @@ -18,6 +18,22 @@ class WaitAction(page_action.PageAction): |
| return (getattr(self, 'condition', None) == 'navigate' or |
| getattr(self, 'condition', None) == 'href_change') |
| + def UntilTrue(self, expression): |
|
nduca
2014/03/05 03:00:57
I think in the long term, I'd rather we remove th
nednguyen
2014/03/05 04:54:04
sgtm :)
|
| + self.SetAttributes({'javascript': expression}) |
| + return self |
| + |
| + def UntilTextElementAvailable(self, text): |
| + self.SetAttributes({'condition': 'element', 'text': text}) |
| + return self |
| + |
| + def UntilSelectorElementAvailable(self, selector): |
| + self.SetAttributes({'condition': 'element', 'selector': selector}) |
| + return self |
| + |
| + def ForSeconds(self, seconds): |
| + self.SetAttributes({'seconds': seconds}) |
| + return self |
| + |
| def RunAction(self, page, tab, previous_action): |
| tab.ExecuteJavaScript( |
| 'console.time("' + self._GetUniqueTimelineMarkerName() + '")') |