| 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 import os |
| 6 |
| 7 from telemetry.testing import serially_executed_browser_test_case |
| 8 |
| 9 from catapult_base import cloud_storage |
| 10 |
| 11 _WPR_ARCHIVE_PATH = os.path.join(os.path.dirname(__file__), |
| 12 'popular_urls_000.wpr') |
| 13 _POPULAR_URLS = [ |
| 14 'http://www.google.com/', |
| 15 'http://www.facebook.com/', |
| 16 'http://www.youtube.com/', |
| 17 'http://www.yahoo.com/', |
| 18 'http://www.baidu.com/', |
| 19 'http://www.wikipedia.org/', |
| 20 'http://www.live.com/', |
| 21 'http://www.twitter.com/', |
| 22 'http://www.qq.com/', |
| 23 'http://www.amazon.com/', |
| 24 'http://www.blogspot.com/', |
| 25 'http://www.linkedin.com/', |
| 26 'http://www.google.co.in/', |
| 27 'http://www.taobao.com/', |
| 28 'http://www.sina.com.cn/', |
| 29 'http://www.yahoo.co.jp/', |
| 30 'http://www.msn.com/', |
| 31 'http://www.wordpress.com/', |
| 32 'http://www.t.co/', |
| 33 'http://www.google.de/', |
| 34 'http://www.google.com.hk/', |
| 35 'http://www.ebay.com/', |
| 36 'http://www.googleusercontent.com/', |
| 37 'http://www.google.co.uk/', |
| 38 'http://www.google.co.jp/', |
| 39 'http://www.yandex.ru/', |
| 40 'http://www.163.com/', |
| 41 'http://www.google.fr/', |
| 42 'http://www.weibo.com/', |
| 43 'http://www.bing.com/', |
| 44 'http://www.microsoft.com/', |
| 45 'http://www.google.com.br/', |
| 46 'http://www.mail.ru/', |
| 47 'http://www.tumblr.com/', |
| 48 'http://www.pinterest.com/', |
| 49 'http://www.paypal.com/', |
| 50 'http://www.apple.com/', |
| 51 'http://www.google.it/', |
| 52 'http://www.blogger.com/', |
| 53 'http://www.babylon.com/', |
| 54 'http://www.google.es/', |
| 55 'http://www.google.ru/', |
| 56 'http://www.craigslist.org/', |
| 57 'http://www.sohu.com/', |
| 58 'http://www.imdb.com/', |
| 59 'http://www.flickr.com/', |
| 60 'http://www.bbc.co.uk/', |
| 61 'http://www.xvideos.com/', |
| 62 'http://www.fc2.com/', |
| 63 'http://www.go.com/', |
| 64 'http://www.xhamster.com/', |
| 65 'http://www.ask.com/', |
| 66 'http://www.ifeng.com/', |
| 67 'http://www.google.com.mx/', |
| 68 'http://www.youku.com/', |
| 69 'http://www.google.ca/', |
| 70 'http://www.livejasmin.com/', |
| 71 'http://www.tmall.com/', |
| 72 'http://www.zedo.com/', |
| 73 'http://www.imgur.com/', |
| 74 'http://www.conduit.com/', |
| 75 'http://www.odnoklassniki.ru/', |
| 76 'http://www.cnn.com/', |
| 77 'http://www.adobe.com/', |
| 78 'http://www.google.co.id/', |
| 79 'http://www.mediafire.com/', |
| 80 'http://www.thepiratebay.se/', |
| 81 'http://www.pornhub.com/', |
| 82 'http://www.aol.com/', |
| 83 'http://www.hao123.com/', |
| 84 'http://www.espn.go.com/', |
| 85 'http://www.alibaba.com/', |
| 86 'http://www.ebay.de/', |
| 87 'http://www.google.com.tr/', |
| 88 'http://www.rakuten.co.jp/', |
| 89 'http://www.about.com/', |
| 90 'http://www.avg.com/', |
| 91 'http://www.google.com.au/', |
| 92 'http://www.blogspot.in/', |
| 93 'http://www.wordpress.org/', |
| 94 'http://www.chinaz.com/', |
| 95 'http://www.ameblo.jp/', |
| 96 'http://www.ebay.co.uk/', |
| 97 'http://www.godaddy.com/', |
| 98 'http://www.amazon.de/', |
| 99 'http://www.google.pl/', |
| 100 'http://www.uol.com.br/', |
| 101 'http://www.360buy.com/', |
| 102 'http://www.stackoverflow.com/', |
| 103 'http://www.amazon.co.jp/', |
| 104 'http://www.bp.blogspot.com/', |
| 105 'http://www.dailymotion.com/', |
| 106 'http://www.huffingtonpost.com/', |
| 107 'http://www.4shared.com/', |
| 108 'http://www.mercadolivre.com.br/', |
| 109 'http://www.vagalume.com.br/', |
| 110 'http://www.letras.mus.br/', |
| 111 'http://www.abril.com.br/', |
| 112 'http://www.detik.com/', |
| 113 'http://www.stafaband.info/', |
| 114 'http://www.kaskus.co.id/', |
| 115 'http://www.tribunnews.com/', |
| 116 'http://www.kompas.com/', |
| 117 'http://www.indianrail.gov.in/', |
| 118 'http://www.flipkart.com/', |
| 119 'http://www.snapdeal.com/', |
| 120 'http://www.espncricinfo.com/', |
| 121 'http://www.amazon.in/', |
| 122 ] |
| 123 |
| 124 |
| 125 def ConvertPathToTestName(url): |
| 126 return url.replace('.', '_').replace('/', '').replace(':', '') |
| 127 |
| 128 |
| 129 class PopularUrlsTest( |
| 130 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase): |
| 131 |
| 132 @classmethod |
| 133 def GenerateTestCases_PageLoadTest(cls, options): |
| 134 # pylint: disable=unused-argument |
| 135 for url in _POPULAR_URLS: |
| 136 yield 'page_load_%s' % ConvertPathToTestName(url), [url] |
| 137 |
| 138 def PageLoadTest(self, url): |
| 139 self.action_runner.Navigate(url) |
| 140 |
| 141 @classmethod |
| 142 def setUpClass(cls): |
| 143 super(cls, PopularUrlsTest).setUpClass() |
| 144 cls.SetBrowserOptions(cls._finder_options) |
| 145 cls.StartWPRServer(archive_path=_WPR_ARCHIVE_PATH, |
| 146 archive_bucket=cloud_storage.PARTNER_BUCKET) |
| 147 cls.StartBrowser() |
| 148 cls.action_runner = cls.browser.tabs[0].action_runner |
| 149 |
| 150 @classmethod |
| 151 def tearDownClass(cls): |
| 152 super(cls, PopularUrlsTest).tearDownClass() |
| 153 cls.StopWPRServer() |
| OLD | NEW |