Commit 4e52d0b4 authored by sullivan's avatar sullivan Committed by Commit bot

Add a typical mobile page set for energy consumption.

BUG=

Review URL: https://codereview.chromium.org/669733009

Cr-Commit-Position: refs/heads/master@{#300607}
parent 92d22da5
...@@ -14,3 +14,12 @@ class PowerAndroidAcceptance(benchmark.Benchmark): ...@@ -14,3 +14,12 @@ class PowerAndroidAcceptance(benchmark.Benchmark):
test = power.Power test = power.Power
page_set = page_sets.AndroidAcceptancePageSet page_set = page_sets.AndroidAcceptancePageSet
@benchmark.Enabled('android')
class PowerTypical10Mobile(benchmark.Benchmark):
"""Android typical 10 mobile power test."""
test = power.Power
page_set = page_sets.Typical10MobilePageSet
{
"description": "Describes the Web Page Replay archives for a page set. Don't edit by hand! Use record_wpr for updating.",
"archives": {
"typical_10_mobile_000.wpr": [
"http://m.ynet.co.il",
"http://m.facebook.com/barackobama",
"http://m.chiebukuro.yahoo.co.jp/detail/q10136829180",
"http://m.ebay.com/itm/351157205404",
"http://siriuslymeg.tumblr.com/",
"http://www.rg.ru/2014/10/21/cska-site.html",
"http://wapbaike.baidu.com/",
"http://m.huffpost.com/us/entry/6004486",
"http://www.cnn.com/2014/03/31/showbiz/tv/himym-finale/index.html",
"http://de.m.wikipedia.org/wiki/K%C3%B6lner_Dom"
]
}
}
\ No newline at end of file
88abc57bafa161d3536f7daf5b792a4a9b7ef1fc
\ No newline at end of file
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class Typical10MobilePage(page_module.Page):
def __init__(self, url, page_set, name=''):
super(Typical10MobilePage, self).__init__(
url=url, page_set=page_set, name=name,
credentials_path = 'data/credentials.json')
self.user_agent_type = 'mobile'
self.archive_data_file = 'data/typical_10_mobile.json'
def RunPowerPageInteractions(self, action_runner):
action_runner.Wait(20)
action_runner.ScrollPage()
action_runner.Wait(20)
class Typical10MobilePageSet(page_set_module.PageSet):
"""10 typical mobile pages, used for power testing."""
def __init__(self):
super(Typical10MobilePageSet, self).__init__(
user_agent_type='mobile',
archive_data_file='data/typical_10_mobile.json',
bucket=page_set_module.PARTNER_BUCKET)
urls_list = [
# Why: Top site
'http://m.facebook.com/barackobama',
# Why: Wikipedia article with lots of pictures, German language
'http://de.m.wikipedia.org/wiki/K%C3%B6lner_Dom',
# Why: current top Q&A on popular Japanese site
'http://m.chiebukuro.yahoo.co.jp/detail/q10136829180',
# Why: news article on popular site
'http://m.huffpost.com/us/entry/6004486',
# Why: news article on popular site
'http://www.cnn.com/2014/03/31/showbiz/tv/himym-finale/index.html',
# Why: Popular RTL language site
'http://m.ynet.co.il',
# Why: Popular Russian language site
'http://www.rg.ru/2014/10/21/cska-site.html',
# Why: Popular shopping site
'http://m.ebay.com/itm/351157205404',
# Why: Popular viral site, lots of images
'http://siriuslymeg.tumblr.com/',
# Why: Popular Chinese language site.
'http://wapbaike.baidu.com/',
]
for url in urls_list:
self.AddPage(Typical10MobilePage(url, self))
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