OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 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 page as page_module |
| 5 from telemetry.page import page_set as page_set_module |
| 6 |
| 7 |
| 8 class Typical10MobilePage(page_module.Page): |
| 9 |
| 10 def __init__(self, url, page_set, name=''): |
| 11 super(Typical10MobilePage, self).__init__( |
| 12 url=url, page_set=page_set, name=name, |
| 13 credentials_path = 'data/credentials.json') |
| 14 self.user_agent_type = 'mobile' |
| 15 self.archive_data_file = 'data/typical_10_mobile.json' |
| 16 |
| 17 def RunPowerPageInteractions(self, action_runner): |
| 18 action_runner.Wait(20) |
| 19 action_runner.ScrollPage() |
| 20 action_runner.Wait(20) |
| 21 |
| 22 |
| 23 class Typical10MobilePageSet(page_set_module.PageSet): |
| 24 """10 typical mobile pages, used for power testing.""" |
| 25 |
| 26 def __init__(self): |
| 27 super(Typical10MobilePageSet, self).__init__( |
| 28 user_agent_type='mobile', |
| 29 archive_data_file='data/typical_10_mobile.json', |
| 30 bucket=page_set_module.PARTNER_BUCKET) |
| 31 |
| 32 urls_list = [ |
| 33 # Why: Top site |
| 34 'http://m.facebook.com/barackobama', |
| 35 # Why: Wikipedia article with lots of pictures, German language |
| 36 'http://de.m.wikipedia.org/wiki/K%C3%B6lner_Dom', |
| 37 # Why: current top Q&A on popular Japanese site |
| 38 'http://m.chiebukuro.yahoo.co.jp/detail/q10136829180', |
| 39 # Why: news article on popular site |
| 40 'http://m.huffpost.com/us/entry/6004486', |
| 41 # Why: news article on popular site |
| 42 'http://www.cnn.com/2014/03/31/showbiz/tv/himym-finale/index.html', |
| 43 # Why: Popular RTL language site |
| 44 'http://m.ynet.co.il', |
| 45 # Why: Popular Russian language site |
| 46 'http://www.rg.ru/2014/10/21/cska-site.html', |
| 47 # Why: Popular shopping site |
| 48 'http://m.ebay.com/itm/351157205404', |
| 49 # Why: Popular viral site, lots of images |
| 50 'http://siriuslymeg.tumblr.com/', |
| 51 # Why: Popular Chinese language site. |
| 52 'http://wapbaike.baidu.com/', |
| 53 ] |
| 54 |
| 55 for url in urls_list: |
| 56 self.AddPage(Typical10MobilePage(url, self)) |
OLD | NEW |