Upstream version 8.37.180.0
[platform/framework/web/crosswalk.git] / src / tools / perf / page_sets / maps.py
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 # pylint: disable=W0401,W0614
5 from telemetry.page.actions.all_page_actions import *
6 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module
8
9
10 class MapsPage(page_module.Page):
11
12   def __init__(self, page_set):
13     super(MapsPage, self).__init__(
14       url='http://localhost:10020/tracker.html',
15       page_set=page_set,
16       name='Maps.maps_001')
17     self.archive_data_file = 'data/maps.json'
18
19   def RunNavigateSteps(self, action_runner):
20     action_runner.NavigateToPage(self)
21     action_runner.Wait(3)
22
23   def RunSmoothness(self, action_runner):
24     action_runner.WaitForJavaScriptCondition('window.testDone')
25
26
27 class MapsPageSet(page_set_module.PageSet):
28
29   """ Google Maps examples """
30
31   def __init__(self):
32     super(MapsPageSet, self).__init__(
33         archive_data_file='data/maps.json',
34         bucket=page_set_module.INTERNAL_BUCKET)
35
36     self.AddPage(MapsPage(self))