Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2015 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 | |
| 5 from telemetry import story | |
| 6 from telemetry import page | |
| 7 | |
| 8 | |
| 9 class ExamplePage(page.Page): | |
| 10 | |
| 11 def __init__(self, page_set): | |
| 12 super(ExamplePage, self).__init__( | |
| 13 url='https://google.com/search?q=lemon', | |
| 14 page_set=page_set) | |
| 15 | |
| 16 def RunPageInteractions(self, action_runner): | |
| 17 action_runner.Wait(0.5) | |
|
aiolos (Not reviewing)
2015/11/06 18:15:21
It might be worthwhile to add a comment about Crea
nednguyen
2015/11/06 18:36:15
Done.
| |
| 18 with action_runner.CreateInteraction('Wait'): | |
| 19 action_runner.Wait(0.3) | |
| 20 action_runner.Wait(0.1) | |
| 21 with action_runner.CreateInteraction('Scroll'): | |
| 22 # To see all the web APIs that action_runner supports, see: | |
|
aiolos (Not reviewing)
2015/11/06 18:15:21
This seems like an odd place for this comment. Can
nednguyen
2015/11/06 18:36:15
Done.
| |
| 23 # telemetry.page.action_runner module. | |
| 24 action_runner.ScrollPage() | |
| 25 with action_runner.CreateInteraction('Wait-two'): | |
| 26 action_runner.Wait(1) | |
| 27 | |
| 28 | |
| 29 class SimpleStorySet(story.StorySet): | |
| 30 def __init__(self): | |
| 31 super(SimpleStorySet, self).__init__( | |
| 32 archive_data_file='data/simple_story_set.json', | |
| 33 cloud_storage_bucket=story.PARTNER_BUCKET) | |
| 34 self.AddStory(ExamplePage(self)) | |
| OLD | NEW |