| OLD | NEW | 
|---|
|  | (Empty) | 
| 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 from telemetry.page import page as page_module |  | 
| 5 from telemetry.page import shared_page_state |  | 
| 6 from telemetry import story |  | 
| 7 |  | 
| 8 |  | 
| 9 class KeySearchMobilePage(page_module.Page): |  | 
| 10 |  | 
| 11   def __init__(self, url, page_set): |  | 
| 12     super(KeySearchMobilePage, self).__init__( |  | 
| 13         url=url, page_set=page_set, credentials_path = 'data/credentials.json', |  | 
| 14         shared_page_state_class=shared_page_state.SharedMobilePageState) |  | 
| 15 |  | 
| 16   def RunPageInteractions(self, action_runner): |  | 
| 17     with action_runner.CreateGestureInteraction('ScrollAction'): |  | 
| 18       action_runner.ScrollPage() |  | 
| 19 |  | 
| 20 |  | 
| 21 class KeySearchMobilePageSet(story.StorySet): |  | 
| 22 |  | 
| 23   """ Key mobile search queries on google """ |  | 
| 24 |  | 
| 25   def __init__(self): |  | 
| 26     super(KeySearchMobilePageSet, self).__init__( |  | 
| 27       archive_data_file='data/key_search_mobile.json', |  | 
| 28       cloud_storage_bucket=story.PUBLIC_BUCKET) |  | 
| 29 |  | 
| 30     urls_list = [ |  | 
| 31       # Why: An empty page should be as snappy as possible |  | 
| 32       'http://www.google.com/', |  | 
| 33       # Why: A reasonable search term with no images or ads usually |  | 
| 34       'https://www.google.com/search?q=science', |  | 
| 35       # Why: A reasonable search term with images but no ads usually |  | 
| 36       'http://www.google.com/search?q=orange', |  | 
| 37       # Why: An address search |  | 
| 38       # pylint: disable=line-too-long |  | 
| 39       'https://www.google.com/search?q=1600+Amphitheatre+Pkwy%2C+Mountain+View%2
    C+CA', |  | 
| 40       # Why: A search for a known actor |  | 
| 41       'http://www.google.com/search?q=tom+hanks', |  | 
| 42       # Why: A search for weather |  | 
| 43       'https://www.google.com/search?q=weather+94110', |  | 
| 44       # Why: A search for a stock |  | 
| 45       'http://www.google.com/search?q=goog', |  | 
| 46       # Why: Charts |  | 
| 47       'https://www.google.com/search?q=population+of+california', |  | 
| 48       # Why: Flights |  | 
| 49       'http://www.google.com/search?q=sfo+jfk+flights', |  | 
| 50       # Why: Movie showtimes |  | 
| 51       'https://www.google.com/search?q=movies+94110', |  | 
| 52       # Why: A tip calculator |  | 
| 53       'http://www.google.com/search?q=tip+on+100+bill', |  | 
| 54       # Why: Time |  | 
| 55       'https://www.google.com/search?q=time+in+san+francisco', |  | 
| 56       # Why: Definitions |  | 
| 57       'http://www.google.com/search?q=define+define', |  | 
| 58       # Why: Local results |  | 
| 59       'https://www.google.com/search?q=burritos+94110', |  | 
| 60       # Why: Graph |  | 
| 61       'http://www.google.com/search?q=x^3' |  | 
| 62     ] |  | 
| 63 |  | 
| 64     for url in urls_list: |  | 
| 65       self.AddStory(KeySearchMobilePage(url, self)) |  | 
| OLD | NEW | 
|---|