1a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch# Copyright 2014 The Chromium Authors. All rights reserved.
2a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch# Use of this source code is governed by a BSD-style license that can be
3a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch# found in the LICENSE file.
4a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochfrom telemetry.page import page as page_module
5a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochfrom telemetry.page import page_set as page_set_module
6a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
7a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
8010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)class IntlEsFrPtBrPage(page_module.Page):
9a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
10a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  def __init__(self, url, page_set):
11a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    super(IntlEsFrPtBrPage, self).__init__(url=url, page_set=page_set)
12a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    self.user_agent_type = 'desktop'
13a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    self.archive_data_file = 'data/intl_es_fr_pt-BR.json'
14a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
15a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  def RunSmoothness(self, action_runner):
16116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch    interaction = action_runner.BeginGestureInteraction(
17116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch        'ScrollAction', is_smooth=True)
18116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch    action_runner.ScrollPage()
19116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch    interaction.End()
20a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
21a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
22a02191e04bc25c4935f804f2c080ae28663d096dBen Murdochclass IntlEsFrPtBrPageSet(page_set_module.PageSet):
23a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
24a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  """
25a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  Popular pages in Romance languages Spanish, French and Brazilian Portuguese.
26a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  """
27a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
28a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  def __init__(self):
29a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    super(IntlEsFrPtBrPageSet, self).__init__(
30a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      user_agent_type='desktop',
31f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)      archive_data_file='data/intl_es_fr_pt-BR.json',
32f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)      bucket=page_set_module.PARTNER_BUCKET)
33a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
34a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    urls_list = [
35a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://elmundo.es/',
36a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://terra.es/',
37a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      # pylint: disable=C0301
38a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://www.ebay.es/sch/i.html?_sacat=382&_trkparms=clkid%3D6548971389060485883&_qi=RTM1381637',
39a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://www.eltiempo.es/talavera-de-la-reina.html',
40a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://www.free.fr/adsl/index.html',
41a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://www.voila.fr/',
42a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://www.leboncoin.fr/annonces/offres/limousin/',
43a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://www.orange.fr/',
44a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      # Why: #5 site in Brazil
45a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://www.uol.com.br/',
46a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      # Why: #10 site in Brazil
47a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      # pylint: disable=C0301
48a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      'http://produto.mercadolivre.com.br/MLB-468424957-pelicula-protetora-smartphone-h5500-e-h5300-43-frete-free-_JM'
49a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    ]
50a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
51a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    for url in urls_list:
52a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch      self.AddPage(IntlEsFrPtBrPage(url, self))
53