Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Side by Side Diff: tools/perf/page_sets/android_screen_restoration_shared_state.py

Issue 1097463004: Add key_idle_power_cases for ensuring idle activity on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698