Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 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 | |
| 5 from page_sets.system_health import platforms | |
| 6 from page_sets.system_health import system_health_story | |
| 7 | |
| 8 class _BackgroundStory(system_health_story.SystemHealthStory): | |
| 9 """Abstract base class for background stories | |
| 10 | |
| 11 As a _LoadingStory except it puts the browser into the | |
| 12 background before measuring. | |
| 13 """ | |
| 14 ABSTRACT_STORY = True | |
| 15 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | |
| 16 | |
| 17 def _Measure(self, action_runner): | |
| 18 action_runner.tab.browser.Background() | |
|
nednguyen
2016/10/05 13:10:49
Should we wait few seconds after backgrounding to
perezju
2016/10/05 13:14:54
+1
hjd
2016/10/05 13:45:44
Sounds good; 2 seconds?
| |
| 19 super(_BackgroundStory, self)._Measure(action_runner) | |
| 20 action_runner.tab.browser.Foreground() | |
|
nednguyen
2016/10/05 13:10:49
What happens if we don't foreground here? Would th
perezju
2016/10/05 13:14:54
I agree, we probably don't need to "Foreground" ag
hjd
2016/10/05 13:45:44
Yep the restart brings up the browser again :) Sha
| |
| 21 | |
| 22 | |
| 23 class BackgroundGoogleStory(_BackgroundStory): | |
| 24 NAME = 'background:search:google' | |
| 25 URL = 'https://www.google.co.uk/' | |
|
nednguyen
2016/10/05 13:10:50
Given that we only have around 5 single page stori
perezju
2016/10/05 13:14:54
I'm coming up with a list of stories to pick. Will
| |
| 26 | |
| OLD | NEW |