OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
8 | 8 |
9 | 9 |
10 class MapsPage(page_module.Page): | 10 class MapsPage(page_module.Page): |
11 | 11 |
12 def __init__(self, page_set): | 12 def __init__(self, page_set): |
13 super(MapsPage, self).__init__( | 13 super(MapsPage, self).__init__( |
14 url='http://localhost:10020/tracker.html', | 14 url='http://localhost:10020/tracker.html', |
15 page_set=page_set, | 15 page_set=page_set, |
16 name='Maps.maps_001') | 16 name='Maps.maps_001') |
17 self.archive_data_file = 'data/maps.json' | 17 self.archive_data_file = 'data/maps.json' |
18 | 18 |
19 def RunNavigateSteps(self, action_runner): | 19 def RunNavigateSteps(self, action_runner): |
20 action_runner.RunAction(NavigateAction()) | 20 action_runner.NavigateToPage(self) |
21 action_runner.RunAction(WaitAction({'seconds': 3})) | 21 action_runner.RunAction(WaitAction({'seconds': 3})) |
22 | 22 |
23 def RunSmoothness(self, action_runner): | 23 def RunSmoothness(self, action_runner): |
24 action_runner.RunAction(WaitAction({'javascript': 'window.testDone'})) | 24 action_runner.RunAction(WaitAction({'javascript': 'window.testDone'})) |
25 | 25 |
26 | 26 |
27 class MapsPageSet(page_set_module.PageSet): | 27 class MapsPageSet(page_set_module.PageSet): |
28 | 28 |
29 """ Google Maps examples """ | 29 """ Google Maps examples """ |
30 | 30 |
31 def __init__(self): | 31 def __init__(self): |
32 super(MapsPageSet, self).__init__( | 32 super(MapsPageSet, self).__init__( |
33 archive_data_file='data/maps.json') | 33 archive_data_file='data/maps.json') |
34 | 34 |
35 self.AddPage(MapsPage(self)) | 35 self.AddPage(MapsPage(self)) |
OLD | NEW |