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 page_set
as page_set_module
8 class KeySearchMobilePage(page_module
.Page
):
10 def __init__(self
, url
, page_set
):
11 super(KeySearchMobilePage
, self
).__init
__(
12 url
=url
, page_set
=page_set
, credentials_path
= 'data/credentials.json')
13 self
.user_agent_type
= 'mobile'
14 self
.archive_data_file
= 'data/key_search_mobile.json'
16 def RunPageInteractions(self
, action_runner
):
17 interaction
= action_runner
.BeginGestureInteraction(
19 action_runner
.ScrollPage()
23 class KeySearchMobilePageSet(page_set_module
.PageSet
):
25 """ Key mobile search queries on google """
28 super(KeySearchMobilePageSet
, self
).__init
__(
29 user_agent_type
='mobile',
30 archive_data_file
='data/key_search_mobile.json',
31 bucket
=page_set_module
.PUBLIC_BUCKET
)
34 # Why: An empty page should be as snappy as possible
35 'http://www.google.com/',
36 # Why: A reasonable search term with no images or ads usually
37 'https://www.google.com/search?q=science',
38 # Why: A reasonable search term with images but no ads usually
39 'http://www.google.com/search?q=orange',
40 # Why: An address search
41 # pylint: disable=C0301
42 'https://www.google.com/search?q=1600+Amphitheatre+Pkwy%2C+Mountain+View%2C+CA',
43 # Why: A search for a known actor
44 'http://www.google.com/search?q=tom+hanks',
45 # Why: A search for weather
46 'https://www.google.com/search?q=weather+94110',
47 # Why: A search for a stock
48 'http://www.google.com/search?q=goog',
50 'https://www.google.com/search?q=population+of+california',
52 'http://www.google.com/search?q=sfo+jfk+flights',
53 # Why: Movie showtimes
54 'https://www.google.com/search?q=movies+94110',
55 # Why: A tip calculator
56 'http://www.google.com/search?q=tip+on+100+bill',
58 'https://www.google.com/search?q=time+in+san+francisco',
60 'http://www.google.com/search?q=define+define',
62 'https://www.google.com/search?q=burritos+94110',
64 'http://www.google.com/search?q=x^3'
68 self
.AddUserStory(KeySearchMobilePage(url
, self
))