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 IntlJaZhPage(page_module.Page):
     11 
     12   def __init__(self, url, page_set):
     13     super(IntlJaZhPage, self).__init__(url=url, page_set=page_set)
     14     self.user_agent_type = 'desktop'
     15     self.archive_data_file = 'data/intl_ja_zh.json'
     16 
     17   def RunSmoothness(self, action_runner):
     18     action_runner.RunAction(ScrollAction())
     19 
     20 
     21 class IntlJaZhPageSet(page_set_module.PageSet):
     22 
     23   """ Popular pages in Japanese and Chinese. """
     24 
     25   def __init__(self):
     26     super(IntlJaZhPageSet, self).__init__(
     27       user_agent_type='desktop',
     28       archive_data_file='data/intl_ja_zh.json',
     29       bucket=page_set_module.PARTNER_BUCKET)
     30 
     31     urls_list = [
     32       # Why: #5 Japanese site
     33       'http://www.amazon.co.jp',
     34       'http://mixi.jp/',
     35       'http://dtiblog.com/',
     36       'http://2ch.net/',
     37       'http://jugem.jp/',
     38       'http://hatena.ne.jp/',
     39       'http://goo.ne.jp/',
     40       # Why: #1 Japanese site
     41       'http://www.yahoo.co.jp/',
     42       # Why: #3 Japanese site
     43       'http://fc2.com/ja/',
     44       'http://kakaku.com/',
     45       'http://zol.com.cn/',
     46       'http://cn.yahoo.com/',
     47       # Why: #1 Chinese site
     48       'http://www.baidu.com/s?wd=%D0%C2%20%CE%C5',
     49       # Why: #2 Chinese site
     50       'http://www.qq.com/',
     51       # Why: #3 Chinese site
     52       'http://www.taobao.com/index_global.php',
     53       # Why: #4 Chinese site
     54       'http://www.sina.com.cn/',
     55       # Why: #5 Chinese site
     56       # pylint: disable=C0301
     57       'http://www.google.com.hk/#q=%E9%82%84%E6%8F%90%E4%BE%9B&fp=c44d333e710cb480',
     58       'http://udn.com/NEWS/mainpage.shtml',
     59       'http://ruten.com.tw/'
     60     ]
     61 
     62     for url in urls_list:
     63       self.AddPage(IntlJaZhPage(url, self))
     64