[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / tools / perf / page_sets / key_search_mobile.py
blob0535790e07a52f1b846d4e24abf9342f2fb7759d
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(
18 'ScrollAction')
19 action_runner.ScrollPage()
20 interaction.End()
23 class KeySearchMobilePageSet(page_set_module.PageSet):
25 """ Key mobile search queries on google """
27 def __init__(self):
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)
33 urls_list = [
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',
49 # Why: Charts
50 'https://www.google.com/search?q=population+of+california',
51 # Why: Flights
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',
57 # Why: Time
58 'https://www.google.com/search?q=time+in+san+francisco',
59 # Why: Definitions
60 'http://www.google.com/search?q=define+define',
61 # Why: Local results
62 'https://www.google.com/search?q=burritos+94110',
63 # Why: Graph
64 'http://www.google.com/search?q=x^3'
67 for url in urls_list:
68 self.AddUserStory(KeySearchMobilePage(url, self))