blob: a64557063144bbbc0379e639a5cd65bc74f13774 [file] [log] [blame]
nednguyen513268e2016-10-11 13:43:391# 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
5from page_sets import page_cycler_story
6from telemetry.page import cache_temperature as cache_temperature_module
7from telemetry.page import shared_page_state
ksakamoto9febcf512016-11-30 12:13:048from telemetry.page import traffic_setting as traffic_setting_module
nednguyen513268e2016-10-11 13:43:399from telemetry import story
10
11
12class LoadingMobileStorySet(story.StorySet):
13
14 """ A collection of tests to measure loading performance of mobile sites.
15
16 Design doc: https://docs.google.com/document/d/1QKlZIoURAxZk-brrXsKYZl9O8ieqXht3ogeF9yLNFCI/edit
17 """
18
Yuki Yamada84bec0a2017-09-29 06:52:0819 def __init__(self, cache_temperatures=None, cache_temperatures_for_pwa=None,
20 traffic_settings=None):
nednguyen513268e2016-10-11 13:43:3921 super(LoadingMobileStorySet, self).__init__(
22 archive_data_file='data/loading_mobile.json',
ashleymariec3c82af2017-06-14 02:21:5423 cloud_storage_bucket=story.PARTNER_BUCKET)
nednguyen513268e2016-10-11 13:43:3924
25 if cache_temperatures is None:
26 cache_temperatures = [cache_temperature_module.ANY]
27
Yuki Yamada84bec0a2017-09-29 06:52:0828 if cache_temperatures_for_pwa is None:
29 cache_temperatures_for_pwa = [cache_temperature_module.ANY]
30
ksakamoto9febcf512016-11-30 12:13:0431 if traffic_settings is None:
32 traffic_settings = [traffic_setting_module.NONE]
33
nednguyen513268e2016-10-11 13:43:3934 self.AddStories(['global'], [
ashleymarieaead6362017-05-31 20:23:1035 ('https://www.google.com/search?q=flower#q=flower+delivery',
36 'GoogleRedirectToGoogleJapan'),
37 ('https://www.youtube.com/watch?v=MU3YuvNRhVY', 'Youtube'),
nednguyen513268e2016-10-11 13:43:3938 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1039 ('https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2&rct=j#q=%E0%A4%AB%E0%A5%82%E0%A4%B2+%E0%A4%B5%E0%A4%BF%E0%A4%A4%E0%A4%B0%E0%A4%A3',
40 'GoogleIndia'),
41 ('https://www.google.com.br/search?q=flor#q=Entrega+de+flores&start=10',
42 'GoogleBrazil'),
ashleymarieaead6362017-05-31 20:23:1043 ('https://www.google.co.id/#q=pengiriman+bunga', 'GoogleIndonesia'),
44 ('https://m.facebook.com/?soft=messages', 'Facebook'),
nednguyen513268e2016-10-11 13:43:3945 # pylint: disable=line-too-long
rnephewf60316b2017-06-02 00:44:3746 ('http://g1.globo.com/politica/noticia/2016/02/maioria-do-stf-autoriza-fisco-obter-dados-bancarios-sem-decisao-judicial.html',
47 'G1'),
nednguyen513268e2016-10-11 13:43:3948 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1049 ('https://m.baidu.com/s?word=%E9%B2%9C%E8%8A%B1%E9%80%9F%E9%80%92&oq=%E9%B2%9C%E8%8A%B1',
50 'Baidu'),
nednguyen513268e2016-10-11 13:43:3951 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1052 ('http://news.yahoo.com/were-top-10-most-visited-us-national-parks-105323727.html',
53 'YahooNews'),
54 ('https://en.m.wikipedia.org/wiki/Solo_Foods', 'Wikipedia'),
nednguyen513268e2016-10-11 13:43:3955 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1056 ('http://noticias.bol.uol.com.br/ultimas-noticias/brasil/2016/08/03/tufao-nida-nao-deixa-vitimas-mas-prejuizos-de-us-43-milhoes.htm',
57 'BOLNoticias'),
ashleymarieaead6362017-05-31 20:23:1058 ('http://www.amazon.com/gp/aw/s/ref=is_s/189-8585431-1246432?k=shoes',
59 'Amazon'),
nednguyen513268e2016-10-11 13:43:3960 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1061 ('http://m.tribunnews.com/superskor/2016/08/03/ribuan-polisi-dikerahkan-mengawal-bonek',
62 'TribunNews'),
63 ('http://xw.qq.com/news/20160803025029/NEW2016080302502901', 'QQNews'),
nednguyen513268e2016-10-11 13:43:3964 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1065 ('http://m.kaskus.co.id/thread/57a03a3214088d91068b4567/inilah-akibat-bersikap-overprotektif-terhadap-anak/?ref=homelanding&med=hot_thread',
66 'Kaskus'),
67 ('http://www.dailymotion.com/video/x3d1kj5_fallout-4-review_videogames',
68 'Dailymotion'),
69 ('https://mobile.twitter.com/scottjehl/status/760618697727803394',
70 'Twitter'),
71 ('http://m.kapanlagi.com/lirik/artis/anji/kata_siapa/',
72 'KapanLagi'),
nednguyen513268e2016-10-11 13:43:3973 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1074 ('http://olx.co.id/iklan/iphone-6s-64-rose-gold-warna-favorite-IDiSdm5.html#5310a118c3;promoted',
75 'OLX'),
nednguyen513268e2016-10-11 13:43:3976 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1077 ('http://enquiry.indianrail.gov.in/mntes/MntesServlet?action=MainMenu&subAction=excep&excpType=EC',
78 'EnquiryIndianRail'),
rnephewf60316b2017-06-02 00:44:3779 # TODO(rnephew): Rerecord this. crbug.com/728882
80 # pylint: disable=line-too-long
81 # ('https://googleblog.blogspot.jp/2016/02/building-safer-web-for-everyone.html',
82 # 'Blogspot'),
83 # pylint: disable=line-too-long
84 # ('http://m.detik.com/finance/read/2016/02/19/151843/3146351/1034/ekspor-tambang-mentah-mau-dibuka-lagi-kalau-sudah-bangun-smelter-bagaimana',
85 # 'Detik'),
ksakamoto9febcf512016-11-30 12:13:0486 ], cache_temperatures, traffic_settings)
nednguyen513268e2016-10-11 13:43:3987
88 self.AddStories(['pwa'], [
89 # pylint: disable=line-too-long
ashleymarieaead6362017-05-31 20:23:1090 ('https://www.flipkart.com/big-wing-casuals/p/itmemeageyfn6m9z?lid=LSTSHOEMEAGURG2PHPW18FTBN&pid=SHOEMEAGURG2PHPW',
91 'FlipKart'),
92 ('https://smp.suumo.jp/mansion/tokyo/sc_104/cond/?moreCond=1',
93 'Suumo'),
ashleymarieaead6362017-05-31 20:23:1094 ('https://voice-memos.appspot.com', 'VoiceMemos'),
ashleymarieaead6362017-05-31 20:23:1095 ('https://dev.opera.com/', 'DevOpera'),
ashleymarieaead6362017-05-31 20:23:1096 ('https://flipboard.com/topic/yoga', 'FlipBoard'),
rnephewf60316b2017-06-02 00:44:3797 # TODO(rnephew): Record these. crbug.com/728882
98 # ('https://wiki-offline.jakearchibald.com/',
99 # 'WikiOffline'),
100 # ('https://busrouter.sg', 'BusRouter'),
101 # ('https://airhorner.com', 'AirHorner'),
Yuki Yamada84bec0a2017-09-29 06:52:08102 ], cache_temperatures_for_pwa, traffic_settings)
nednguyen513268e2016-10-11 13:43:39103
104 self.AddStories(['tough_ttfmp'], [
ashleymarieaead6362017-05-31 20:23:10105 ('http://www.localmoxie.com', 'LocalMoxie'),
106 ('http://www.dawn.com', 'Dawn'),
107 ('http://www.thairath.co.th', 'Thairath'),
rnephewf60316b2017-06-02 00:44:37108 ('http://www.hashocean.com', 'HashOcean'),
109 ('http://www.163.com', '163'),
ksakamoto9febcf512016-11-30 12:13:04110 ], cache_temperatures, traffic_settings)
nednguyen513268e2016-10-11 13:43:39111
112 self.AddStories(['easy_ttfmp'], [
ashleymarieaead6362017-05-31 20:23:10113 ('http://www.slideshare.net', 'SlideShare'),
114 ('http://www.bradesco.com.br', 'Bradesco'),
115 ('http://www.gsshop.com', 'GSShop'),
rnephewf60316b2017-06-02 00:44:37116 ('http://www.sbs.co.kr', 'SBS'),
117 ('http://www.futura-sciences.com', 'FuturaSciences'),
ksakamoto9febcf512016-11-30 12:13:04118 ], cache_temperatures, traffic_settings)
nednguyen513268e2016-10-11 13:43:39119
120 self.AddStories(['tough_tti'], [
ashleymarieaead6362017-05-31 20:23:10121 ('http://www.thestar.com.my', 'TheStar'),
122 ('http://www.58pic.com', '58Pic'),
123 ('http://www.hongkiat.com', 'Hongkiat'),
rnephewf60316b2017-06-02 00:44:37124 ('http://www.ebs.in', 'EBS'),
125 ('http://www.ibicn.com', 'IBI'),
ksakamoto9febcf512016-11-30 12:13:04126 ], cache_temperatures, traffic_settings)
nednguyen513268e2016-10-11 13:43:39127
128 self.AddStories(['easy_tti'], [
ashleymarieaead6362017-05-31 20:23:10129 ('http://www.dramaq.com.tw', 'Dramaq'),
130 ('http://www.locanto.in', 'Locanto'),
131 ('http://www.francetvinfo.fr', 'FranceTVInfo'),
rnephewf60316b2017-06-02 00:44:37132 ('http://www.gfk.com', 'GFK'),
133 ('http://www.mlsmatrix.com', 'MLSMatrix'),
ksakamoto9febcf512016-11-30 12:13:04134 ], cache_temperatures, traffic_settings)
nednguyen513268e2016-10-11 13:43:39135
nednguyen88137e922017-01-20 20:44:20136 def AddStories(self, tags, urls, cache_temperatures, traffic_settings):
ashleymarieaead6362017-05-31 20:23:10137 for url, name in urls:
nednguyen513268e2016-10-11 13:43:39138 for temp in cache_temperatures:
ksakamoto9febcf512016-11-30 12:13:04139 for traffic in traffic_settings:
ashleymarieaead6362017-05-31 20:23:10140 self.AddStory(page_cycler_story.PageCyclerStory(url, self, name=name,
ksakamoto9febcf512016-11-30 12:13:04141 shared_page_state_class=shared_page_state.SharedMobilePageState,
nednguyen88137e922017-01-20 20:44:20142 cache_temperature=temp, traffic_setting=traffic, tags=tags))