OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
5 from telemetry import story | 5 from telemetry import story |
6 | 6 |
7 | 7 |
8 class ToughPathRenderingCasesPage(page_module.Page): | 8 class ToughPathRenderingCasesPage(page_module.Page): |
9 def RunPageInteractions(self, action_runner): | 9 def RunPageInteractions(self, action_runner): |
10 with action_runner.CreateInteraction('ClickStart'): | 10 with action_runner.CreateInteraction('ClickStart'): |
11 action_runner.Wait(10) | 11 action_runner.Wait(10) |
12 | 12 |
13 | 13 |
14 class ChalkboardPage(page_module.Page): | 14 class ChalkboardPage(page_module.Page): |
15 | 15 |
16 def RunPageInteractions(self, action_runner): | 16 def RunPageInteractions(self, action_runner): |
17 with action_runner.CreateInteraction('ClickStart'): | 17 with action_runner.CreateInteraction('ClickStart'): |
18 action_runner.EvaluateJavaScript2( | 18 action_runner.EvaluateJavaScript( |
19 'document.getElementById("StartButton").click()') | 19 'document.getElementById("StartButton").click()') |
20 action_runner.Wait(20) | 20 action_runner.Wait(20) |
21 | 21 |
22 class ToughPathRenderingCasesPageSet(story.StorySet): | 22 class ToughPathRenderingCasesPageSet(story.StorySet): |
23 | 23 |
24 """ | 24 """ |
25 Description: Self-driven path rendering examples | 25 Description: Self-driven path rendering examples |
26 """ | 26 """ |
27 | 27 |
28 def __init__(self): | 28 def __init__(self): |
(...skipping 11 matching lines...) Expand all Loading... |
40 ] | 40 ] |
41 | 41 |
42 for name, url in page_list: | 42 for name, url in page_list: |
43 self.AddStory(ToughPathRenderingCasesPage(name=name, url=url, | 43 self.AddStory(ToughPathRenderingCasesPage(name=name, url=url, |
44 page_set=self)) | 44 page_set=self)) |
45 | 45 |
46 # Chalkboard content linked from | 46 # Chalkboard content linked from |
47 # http://ie.microsoft.com/testdrive/Performance/Chalkboard/. | 47 # http://ie.microsoft.com/testdrive/Performance/Chalkboard/. |
48 self.AddStory(ChalkboardPage( | 48 self.AddStory(ChalkboardPage( |
49 'https://testdrive-archive.azurewebsites.net/performance/chalkboard/', s
elf)) | 49 'https://testdrive-archive.azurewebsites.net/performance/chalkboard/', s
elf)) |
OLD | NEW |