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 telemetry.page import page | 5 from telemetry.page import page |
6 from telemetry.page import page_set | 6 from telemetry.page import page_set |
7 from telemetry.page.actions import all_page_actions as actions | |
8 | 7 |
9 | 8 |
10 archive_data_file_path = 'data/service_worker.json' | 9 archive_data_file_path = 'data/service_worker.json' |
11 | 10 |
12 | 11 |
13 class ServiceWorkerPage(page.Page): | 12 class ServiceWorkerPage(page.Page): |
14 def RunNavigateSteps(self, action_runner): | 13 def RunNavigateSteps(self, action_runner): |
15 action_runner.RunAction(actions.NavigateAction()) | 14 action_runner.NavigateToPage() |
16 action_runner.WaitForJavaScriptCondition('window.done') | 15 action_runner.WaitForJavaScriptCondition('window.done') |
17 | 16 |
18 | 17 |
19 class ServiceWorkerPageSet(page_set.PageSet): | 18 class ServiceWorkerPageSet(page_set.PageSet): |
20 """ServiceWorker performance tests""" | 19 """ServiceWorker performance tests""" |
21 | 20 |
22 def __init__(self): | 21 def __init__(self): |
23 super(ServiceWorkerPageSet, self).__init__( | 22 super(ServiceWorkerPageSet, self).__init__( |
24 archive_data_file=archive_data_file_path, | 23 archive_data_file=archive_data_file_path, |
25 make_javascript_deterministic=False, | 24 make_javascript_deterministic=False, |
26 bucket=page_set.PUBLIC_BUCKET) | 25 bucket=page_set.PUBLIC_BUCKET) |
27 | 26 |
28 self.AddPage(ServiceWorkerPage('http://localhost:8091/index.html', self)) | 27 self.AddPage(ServiceWorkerPage('http://localhost:8091/index.html', self)) |
OLD | NEW |