intl_hi_ru.py revision a02191e04bc25c4935f804f2c080ae28663d096d
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
5from telemetry.page.actions.all_page_actions import *
6from telemetry.page import page as page_module
7from telemetry.page import page_set as page_set_module
8
9
10class IntlHiRuPage(page_module.PageWithDefaultRunNavigate):
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
21class 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
30    urls_list = [
31      # Why: #12 site in Russia
32      'http://www.rambler.ru/',
33      'http://apeha.ru/',
34      # pylint: disable=C0301
35      'http://yandex.ru/yandsearch?lr=102567&text=%D0%9F%D0%BE%D0%B3%D0%BE%D0%B4%D0%B0',
36      'http://photofile.ru/',
37      'http://ru.wikipedia.org/',
38      'http://narod.yandex.ru/',
39      # Why: #15 in Russia
40      'http://rutracker.org/forum/index.php',
41      'http://hindi.webdunia.com/',
42      # Why: #49 site in India
43      'http://hindi.oneindia.in/',
44      # Why: #9 site in India
45      'http://www.indiatimes.com/',
46      # Why: #2 site in India
47      'http://news.google.co.in/nwshp?tab=in&hl=hi'
48    ]
49
50    for url in urls_list:
51      self.AddPage(IntlHiRuPage(url, self))
52