| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 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 |
| 5 from page_sets import page_cycler_story |
| 6 from telemetry.page import cache_temperature as cache_temperature_module |
| 7 from telemetry.page import shared_page_state |
| 8 from telemetry import story |
| 9 |
| 10 |
| 11 class LoadingDesktopStorySet(story.StorySet): |
| 12 |
| 13 """ A collection of tests to measure loading performance of desktop sites. |
| 14 |
| 15 Desktop centric version of loading_mobile.py |
| 16 """ |
| 17 |
| 18 def __init__(self, cache_temperatures=None): |
| 19 super(LoadingDesktopStorySet, self).__init__( |
| 20 archive_data_file='data/loading_desktop.json', |
| 21 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 22 |
| 23 if cache_temperatures is None: |
| 24 cache_temperatures = [cache_temperature_module.ANY] |
| 25 |
| 26 self.AddStories( |
| 27 ['intl_ar_fa_he', 'international'], |
| 28 ['http://ynet.co.il/', |
| 29 'http://farsnews.com/', |
| 30 'http://www.aljayyash.net/', |
| 31 'http://haraj.com.sa'], cache_temperatures) |
| 32 self.AddStories( |
| 33 ['intl_es_fr_pt_BR', 'international'], |
| 34 ['http://elmundo.es/', |
| 35 'http://www.free.fr/adsl/index.html', |
| 36 'http://www.leboncoin.fr/annonces/offres/limousin/', |
| 37 'http://www.orange.fr/', |
| 38 'http://www.uol.com.br/', |
| 39 'http://www.mercadolivre.com.br/'], cache_temperatures) |
| 40 self.AddStories( |
| 41 ['intl_hi_ru', 'international'], |
| 42 ['http://www.rambler.ru/', |
| 43 'https://yandex.ru/search/?text=google', |
| 44 'https://ru.wikipedia.org/wiki/%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0', |
| 45 'http://www.indiatimes.com/', |
| 46 'http://www.bhaskar.com/'], cache_temperatures) |
| 47 self.AddStories( |
| 48 ['intl_ja_zh', 'international'], |
| 49 ['http://www.amazon.co.jp', |
| 50 'http://potato.2ch.net/test/read.cgi/software/1475288157/', |
| 51 'http://b.hatena.ne.jp/hotentry', |
| 52 'http://goo.ne.jp/', |
| 53 'http://www.yahoo.co.jp/', |
| 54 'http://fc2information.blog.fc2.com/', |
| 55 'http://kakaku.com/', |
| 56 'https://ja.wikipedia.org/wiki/%E3%82%B4%E3%83%AB%E3%82%B413%E3%81%AE%E
3%82%A8%E3%83%94%E3%82%BD%E3%83%BC%E3%83%89%E4%B8%80%E8%A6%A7', |
| 57 'http://www.baidu.com/s?wd=%D0%C2%20%CE%C5', |
| 58 'http://www.qq.com/', |
| 59 'http://www.taobao.com/index_global.php', |
| 60 'http://www.sina.com.cn/', |
| 61 'http://ruten.com.tw/'], cache_temperatures) |
| 62 self.AddStories( |
| 63 ['intl_ko_th_vi', 'international'], |
| 64 ['http://us.24h.com.vn/', |
| 65 'http://vnexpress.net/', |
| 66 'http://vietnamnet.vn/', |
| 67 'http://kenh14.vn/home.chn', |
| 68 'http://www.naver.com/', |
| 69 'http://www.daum.net/', |
| 70 'http://www.donga.com/', |
| 71 'http://www.chosun.com/', |
| 72 'http://www.danawa.com/', |
| 73 'http://pantip.com/'], cache_temperatures) |
| 74 self.AddStories( |
| 75 ['typical'], |
| 76 ['http://www.rei.com/', |
| 77 'http://www.fifa.com/', |
| 78 'http://www.economist.com/', |
| 79 'http://www.theonion.com', |
| 80 'http://arstechnica.com/', |
| 81 'http://allrecipes.com/recipe/239896/crunchy-french-onion-chicken', |
| 82 'http://www.html5rocks.com/en/', |
| 83 'http://www.mlb.com/', |
| 84 'http://www.imdb.com/title/tt0910970/', |
| 85 'http://www.flickr.com/search/?q=monkeys&f=hp', |
| 86 'http://money.cnn.com/', |
| 87 'http://www.nationalgeographic.com/', |
| 88 'http://premierleague.com', |
| 89 'http://walgreens.com', |
| 90 'http://colorado.edu', |
| 91 'http://www.ticketmaster.com/', |
| 92 'http://www.theverge.com/', |
| 93 'http://www.airbnb.com/', |
| 94 'http://www.ign.com/', |
| 95 'http://www.fda.gov'], cache_temperatures) |
| 96 |
| 97 def AddStories(self, tags, urls, cache_temperatures): |
| 98 for url in urls: |
| 99 for temp in cache_temperatures: |
| 100 self.AddStory(page_cycler_story.PageCyclerStory(url, self, |
| 101 shared_page_state_class=shared_page_state.SharedMobilePageState, |
| 102 cache_temperature=temp, tags=tags)) |
| OLD | NEW |