OLD | NEW |
---|---|
(Empty) | |
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 | |
3 # found in the LICENSE file. | |
4 from telemetry.page import shared_page_state | |
5 | |
6 | |
7 class AndroidScreenRestorationSharedState(shared_page_state.SharedPageState): | |
8 """ Ensures the screen is on before and after each user story run. """ | |
9 | |
10 def WillRunUserStory(self, page): | |
11 super(AndroidScreenRestorationSharedState, self).WillRunUserStory(page) | |
12 self._EnsureScreenOn() | |
13 | |
nednguyen
2015/04/27 17:47:49
You will want to override GetTestExpectationAndSki
jdduke (slow)
2015/04/28 21:30:29
Done. (overrode CanRunOnBrowser).
| |
14 def DidRunUserStory(self, results): | |
15 try: | |
16 super(AndroidScreenRestorationSharedState, self).DidRunUserStory(results) | |
17 finally: | |
18 self._EnsureScreenOn() | |
19 | |
20 def _EnsureScreenOn(self): | |
21 self.platform.android_action_runner.TurnScreenOn() | |
22 | |
OLD | NEW |