Home | History | Annotate | Download | only in page_sets
      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 IntlEsFrPtBrPage(page_module.Page):
      9 
     10   def __init__(self, url, page_set):
     11     super(IntlEsFrPtBrPage, self).__init__(url=url, page_set=page_set)
     12     self.user_agent_type = 'desktop'
     13     self.archive_data_file = 'data/intl_es_fr_pt-BR.json'
     14 
     15   def RunSmoothness(self, action_runner):
     16     interaction = action_runner.BeginGestureInteraction(
     17         'ScrollAction', is_smooth=True)
     18     action_runner.ScrollPage()
     19     interaction.End()
     20 
     21 
     22 class IntlEsFrPtBrPageSet(page_set_module.PageSet):
     23 
     24   """
     25   Popular pages in Romance languages Spanish, French and Brazilian Portuguese.
     26   """
     27 
     28   def __init__(self):
     29     super(IntlEsFrPtBrPageSet, self).__init__(
     30       user_agent_type='desktop',
     31       archive_data_file='data/intl_es_fr_pt-BR.json',
     32       bucket=page_set_module.PARTNER_BUCKET)
     33 
     34     urls_list = [
     35       'http://elmundo.es/',
     36       'http://terra.es/',
     37       # pylint: disable=C0301
     38       'http://www.ebay.es/sch/i.html?_sacat=382&_trkparms=clkid%3D6548971389060485883&_qi=RTM1381637',
     39       'http://www.eltiempo.es/talavera-de-la-reina.html',
     40       'http://www.free.fr/adsl/index.html',
     41       'http://www.voila.fr/',
     42       'http://www.leboncoin.fr/annonces/offres/limousin/',
     43       'http://www.orange.fr/',
     44       # Why: #5 site in Brazil
     45       'http://www.uol.com.br/',
     46       # Why: #10 site in Brazil
     47       # pylint: disable=C0301
     48       'http://produto.mercadolivre.com.br/MLB-468424957-pelicula-protetora-smartphone-h5500-e-h5300-43-frete-free-_JM'
     49     ]
     50 
     51     for url in urls_list:
     52       self.AddPage(IntlEsFrPtBrPage(url, self))
     53