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 IndexeddbOfflinePage(page_module.Page): | 10 class IndexeddbOfflinePage(page_module.Page): |
11 | 11 |
12 """ Why: Simulates user input while offline and sync while online. """ | 12 """ Why: Simulates user input while offline and sync while online. """ |
13 | 13 |
14 def __init__(self, page_set): | 14 def __init__(self, page_set): |
15 super(IndexeddbOfflinePage, self).__init__( | 15 super(IndexeddbOfflinePage, self).__init__( |
16 url='file://endure/indexeddb_app.html', | 16 url='file://endure/indexeddb_app.html', |
17 page_set=page_set, | 17 page_set=page_set, |
18 name='indexeddb_offline') | 18 name='indexeddb_offline') |
19 self.user_agent_type = 'desktop' | 19 self.user_agent_type = 'desktop' |
20 | 20 |
21 def RunNavigateSteps(self, action_runner): | 21 def RunNavigateSteps(self, action_runner): |
22 action_runner.RunAction(NavigateAction()) | 22 action_runner.NavigateToPage(self) |
23 action_runner.RunAction(WaitAction( | 23 action_runner.RunAction(WaitAction( |
24 { | 24 { |
25 'text': 'initialized', | 25 'text': 'initialized', |
26 'condition': 'element' | 26 'condition': 'element' |
27 })) | 27 })) |
28 | 28 |
29 def RunEndure(self, action_runner): | 29 def RunEndure(self, action_runner): |
30 action_runner.RunAction(WaitAction( | 30 action_runner.RunAction(WaitAction( |
31 { | 31 { |
32 'condition': 'element', | 32 'condition': 'element', |
(...skipping 30 matching lines...) Expand all Loading... |
63 | 63 |
64 class IndexeddbOfflinePageSet(page_set_module.PageSet): | 64 class IndexeddbOfflinePageSet(page_set_module.PageSet): |
65 | 65 |
66 """ Chrome Endure test for IndexedDB. """ | 66 """ Chrome Endure test for IndexedDB. """ |
67 | 67 |
68 def __init__(self): | 68 def __init__(self): |
69 super(IndexeddbOfflinePageSet, self).__init__( | 69 super(IndexeddbOfflinePageSet, self).__init__( |
70 user_agent_type='desktop') | 70 user_agent_type='desktop') |
71 | 71 |
72 self.AddPage(IndexeddbOfflinePage(self)) | 72 self.AddPage(IndexeddbOfflinePage(self)) |
OLD | NEW |