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 # pylint: disable=W0401,W0614
      5 from telemetry.page.actions.all_page_actions import *
      6 from telemetry.page import page as page_module
      7 from telemetry.page import page_set as page_set_module
      8 
      9 
     10 class IntlHiRuPage(page_module.Page):
     11 
     12   def __init__(self, url, page_set):
     13     super(IntlHiRuPage, self).__init__(url=url, page_set=page_set)
     14     self.user_agent_type = 'desktop'
     15     self.archive_data_file = 'data/intl_hi_ru.json'
     16 
     17   def RunSmoothness(self, action_runner):
     18     action_runner.RunAction(ScrollAction())
     19 
     20 
     21 class IntlHiRuPageSet(page_set_module.PageSet):
     22 
     23   """ Popular pages in Hindi and Russian. """
     24 
     25   def __init__(self):
     26     super(IntlHiRuPageSet, self).__init__(
     27       user_agent_type='desktop',
     28       archive_data_file='data/intl_hi_ru.json',
     29       bucket=page_set_module.PARTNER_BUCKET)
     30 
     31     urls_list = [
     32       # Why: #12 site in Russia
     33       'http://www.rambler.ru/',
     34       'http://apeha.ru/',
     35       # pylint: disable=C0301
     36       'http://yandex.ru/yandsearch?lr=102567&text=%D0%9F%D0%BE%D0%B3%D0%BE%D0%B4%D0%B0',
     37       'http://photofile.ru/',
     38       'http://ru.wikipedia.org/',
     39       'http://narod.yandex.ru/',
     40       # Why: #15 in Russia
     41       'http://rutracker.org/forum/index.php',
     42       'http://hindi.webdunia.com/',
     43       # Why: #49 site in India
     44       'http://hindi.oneindia.in/',
     45       # Why: #9 site in India
     46       'http://www.indiatimes.com/',
     47       # Why: #2 site in India
     48       'http://news.google.co.in/nwshp?tab=in&hl=hi'
     49     ]
     50 
     51     for url in urls_list:
     52       self.AddPage(IntlHiRuPage(url, self))
     53