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 | 4 |
| 5 from page_sets import webgl_supported_shared_state |
| 6 from telemetry import story |
5 from telemetry.page import page as page_module | 7 from telemetry.page import page as page_module |
6 from telemetry.page import page_set as page_set_module | |
7 | |
8 from page_sets import webgl_supported_shared_state | |
9 | 8 |
10 | 9 |
11 class MapsPage(page_module.Page): | 10 class MapsPage(page_module.Page): |
12 | 11 |
13 def __init__(self, page_set): | 12 def __init__(self, page_set): |
14 super(MapsPage, self).__init__( | 13 super(MapsPage, self).__init__( |
15 url='http://localhost:10020/tracker.html', | 14 url='http://localhost:10020/tracker.html', |
16 page_set=page_set, | 15 page_set=page_set, |
17 name='Maps.maps_002', | 16 name='Maps.maps_002', |
18 shared_page_state_class=( | 17 shared_page_state_class=( |
19 webgl_supported_shared_state.WebGLSupportedSharedState)) | 18 webgl_supported_shared_state.WebGLSupportedSharedState)) |
20 self.archive_data_file = 'data/maps.json' | 19 self.archive_data_file = 'data/maps.json' |
21 | 20 |
22 def RunNavigateSteps(self, action_runner): | 21 def RunNavigateSteps(self, action_runner): |
23 super(MapsPage, self).RunNavigateSteps(action_runner) | 22 super(MapsPage, self).RunNavigateSteps(action_runner) |
24 action_runner.Wait(3) | 23 action_runner.Wait(3) |
25 | 24 |
26 def RunPageInteractions(self, action_runner): | 25 def RunPageInteractions(self, action_runner): |
27 with action_runner.CreateInteraction('MapAnimation'): | 26 with action_runner.CreateInteraction('MapAnimation'): |
28 action_runner.WaitForJavaScriptCondition('window.testDone', 120) | 27 action_runner.WaitForJavaScriptCondition('window.testDone', 120) |
29 | 28 |
30 | 29 |
31 class MapsPageSet(page_set_module.PageSet): | 30 class MapsPageSet(story.StorySet): |
32 | 31 |
33 """ Google Maps examples """ | 32 """ Google Maps examples """ |
34 | 33 |
35 def __init__(self): | 34 def __init__(self): |
36 super(MapsPageSet, self).__init__( | 35 super(MapsPageSet, self).__init__( |
37 archive_data_file='data/maps.json', | 36 archive_data_file='data/maps.json', |
38 bucket=page_set_module.PUBLIC_BUCKET) | 37 cloud_storage_bucket=story.PUBLIC_BUCKET) |
39 | 38 |
40 self.AddUserStory(MapsPage(self)) | 39 self.AddUserStory(MapsPage(self)) |
OLD | NEW |