Commit afe786b9 authored by Egor Pasko's avatar Egor Pasko Committed by Commit Bot

benchmarks/startup_mobile: support live sites

Makes it possible to --use-live-sites when invoking from command line.

Support for tools/perf/record_wpr was not tested, hence placing an
assert there to avoid surprises at a later stage. Documentation about
record_wpr [1] seems outdated as it does not mention wprgo, but I am not
sure how much outdated it is, could be only this tiny detail.

[1] Documentation page: "Telemetry: Record a Page Set"
    https://www.chromium.org/developers/telemetry/record_a_page_set

Bug: 760498
Change-Id: I2278eba06eeceb724c5ae6779409df00add90a4e
Reviewed-on: https://chromium-review.googlesource.com/1124857Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572527}
parent 094fbcd1
...@@ -62,7 +62,12 @@ class _MobileStartupSharedState(story_module.SharedState): ...@@ -62,7 +62,12 @@ class _MobileStartupSharedState(story_module.SharedState):
assert isinstance(self.platform, android_platform.AndroidPlatform) assert isinstance(self.platform, android_platform.AndroidPlatform)
self._finder_options.browser_options.browser_user_agent_type = 'mobile' self._finder_options.browser_options.browser_user_agent_type = 'mobile'
self.platform.Initialize() self.platform.Initialize()
self.platform.network_controller.Open(wpr_modes.WPR_REPLAY) assert finder_options.browser_options.wpr_mode != wpr_modes.WPR_RECORD, (
'Recording WPR archives is not supported for this benchmark.')
wpr_mode = wpr_modes.WPR_REPLAY
if finder_options.use_live_sites:
wpr_mode = wpr_modes.WPR_OFF
self.platform.network_controller.Open(wpr_mode)
self._story_set = story_set self._story_set = story_set
@property @property
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment