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 # Number of seconds to wait between backgrounding the browser and | |
| 9 # measuring the memory use. | |
| 10 PRE_MEASUREMENT_DELAY_SECONDS = 2 | |
| 11 | |
| 12 class _BackgroundStory(system_health_story.SystemHealthStory): | |
| 13 """Abstract base class for background stories | |
| 14 | |
| 15 As in _LoadingStory except it puts the browser into the | |
| 16 background before measuring. | |
| 17 """ | |
| 18 ABSTRACT_STORY = True | |
| 19 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | |
| 20 | |
| 21 def _Measure(self, action_runner): | |
| 22 action_runner.tab.browser.Background() | |
| 23 action_runner.Wait(PRE_MEASUREMENT_DELAY_SECONDS) | |
|
perezju
2016/10/05 13:55:38
Actually, no, sorry about that. The _Measure metho
hjd
2016/10/05 15:07:40
Done.
| |
| 24 super(_BackgroundStory, self)._Measure(action_runner) | |
| 25 | |
| 26 | |
| 27 class BackgroundGoogleStory(_BackgroundStory): | |
| 28 NAME = 'background:search:google' | |
| 29 URL = 'https://www.google.co.uk/' | |
|
perezju
2016/10/05 13:55:38
My proposal would be to include:
- background:soc
hjd
2016/10/05 15:07:40
Done, except gmail which is a little tricky.
| |
| 30 | |
| OLD | NEW |