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 import story |
5 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
6 from telemetry.page import page_set as page_set_module | |
7 | 7 |
8 | 8 |
9 class SpinningBallsPage(page_module.Page): | 9 class SpinningBallsPage(page_module.Page): |
10 | 10 |
11 def __init__(self, page_set): | 11 def __init__(self, page_set): |
12 super(SpinningBallsPage, self).__init__( | 12 super(SpinningBallsPage, self).__init__( |
13 # pylint: disable=C0301 | 13 # pylint: disable=C0301 |
14 url='http://v8.googlecode.com/svn/branches/bleeding_edge/benchmarks/spinni
ng-balls/index.html', | 14 url='http://v8.googlecode.com/svn/branches/bleeding_edge/benchmarks/spinni
ng-balls/index.html', |
15 page_set=page_set) | 15 page_set=page_set) |
16 | 16 |
17 def RunNavigateSteps(self, action_runner): | 17 def RunNavigateSteps(self, action_runner): |
18 super(SpinningBallsPage, self).RunNavigateSteps(action_runner) | 18 super(SpinningBallsPage, self).RunNavigateSteps(action_runner) |
19 action_runner.WaitForJavaScriptCondition( | 19 action_runner.WaitForJavaScriptCondition( |
20 "document.readyState == 'complete'") | 20 "document.readyState == 'complete'") |
21 action_runner.ClickElement(selector='input[type="submit"]') | 21 action_runner.ClickElement(selector='input[type="submit"]') |
22 action_runner.WaitForJavaScriptCondition( | 22 action_runner.WaitForJavaScriptCondition( |
23 "document.readyState == 'complete'") | 23 "document.readyState == 'complete'") |
24 | 24 |
25 def RunPageInteractions(self, action_runner): | 25 def RunPageInteractions(self, action_runner): |
26 with action_runner.CreateInteraction('RunSmoothAllActions'): | 26 with action_runner.CreateInteraction('RunSmoothAllActions'): |
27 action_runner.Wait(15) | 27 action_runner.Wait(15) |
28 | 28 |
29 | 29 |
30 class GarbageCollectionCasesPageSet(page_set_module.PageSet): | 30 class GarbageCollectionCasesPageSet(story.StorySet): |
31 | 31 |
32 """ | 32 """ |
33 Description: GC test cases | 33 Description: GC test cases |
34 """ | 34 """ |
35 | 35 |
36 def __init__(self): | 36 def __init__(self): |
37 super(GarbageCollectionCasesPageSet, self).__init__( | 37 super(GarbageCollectionCasesPageSet, self).__init__( |
38 archive_data_file='data/garbage_collection_cases.json', | 38 archive_data_file='data/garbage_collection_cases.json', |
39 bucket=page_set_module.PARTNER_BUCKET) | 39 cloud_storage_bucket=story.PARTNER_BUCKET) |
40 | 40 |
41 self.AddUserStory(SpinningBallsPage(self)) | 41 self.AddUserStory(SpinningBallsPage(self)) |
OLD | NEW |