| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import os | 4 import os |
| 5 import time | 5 import time |
| 6 | 6 |
| 7 import context_lost_expectations | 7 import context_lost_expectations |
| 8 | 8 |
| 9 from telemetry import benchmark as benchmark_module | 9 from telemetry import benchmark as benchmark_module |
| 10 from telemetry.core import exceptions | 10 from telemetry.core import exceptions |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 def RunNavigateSteps(self, action_runner): | 311 def RunNavigateSteps(self, action_runner): |
| 312 action_runner.NavigateToPage(self) | 312 action_runner.NavigateToPage(self) |
| 313 action_runner.WaitForJavaScriptCondition( | 313 action_runner.WaitForJavaScriptCondition( |
| 314 'window.domAutomationController._loaded') | 314 'window.domAutomationController._loaded') |
| 315 | 315 |
| 316 class ContextLost(benchmark_module.Benchmark): | 316 class ContextLost(benchmark_module.Benchmark): |
| 317 enabled = True | 317 enabled = True |
| 318 test = _ContextLostValidator | 318 test = _ContextLostValidator |
| 319 | 319 |
| 320 def CreateExpectations(self, page_set): | 320 def CreateExpectations(self): |
| 321 return context_lost_expectations.ContextLostExpectations() | 321 return context_lost_expectations.ContextLostExpectations() |
| 322 | 322 |
| 323 # For the record, this would have been another way to get the pages | 323 # For the record, this would have been another way to get the pages |
| 324 # to repeat. pageset_repeat would be another option. | 324 # to repeat. pageset_repeat would be another option. |
| 325 # options = {'page_repeat': 5} | 325 # options = {'page_repeat': 5} |
| 326 def CreatePageSet(self, options): | 326 def CreatePageSet(self, options): |
| 327 ps = page_set.PageSet( | 327 ps = page_set.PageSet( |
| 328 file_path=data_path, | 328 file_path=data_path, |
| 329 user_agent_type='desktop', | 329 user_agent_type='desktop', |
| 330 serving_dirs=set([''])) | 330 serving_dirs=set([''])) |
| 331 ps.AddPage(GPUProcessCrashesExactlyOnce(ps, ps.base_dir)) | 331 ps.AddPage(GPUProcessCrashesExactlyOnce(ps, ps.base_dir)) |
| 332 ps.AddPage(WebGLContextLostFromGPUProcessExitPage(ps, ps.base_dir)) | 332 ps.AddPage(WebGLContextLostFromGPUProcessExitPage(ps, ps.base_dir)) |
| 333 ps.AddPage(WebGLContextLostFromLoseContextExtensionPage(ps, ps.base_dir)) | 333 ps.AddPage(WebGLContextLostFromLoseContextExtensionPage(ps, ps.base_dir)) |
| 334 ps.AddPage(WebGLContextLostFromQuantityPage(ps, ps.base_dir)) | 334 ps.AddPage(WebGLContextLostFromQuantityPage(ps, ps.base_dir)) |
| 335 ps.AddPage(WebGLContextLostFromSelectElementPage(ps, ps.base_dir)) | 335 ps.AddPage(WebGLContextLostFromSelectElementPage(ps, ps.base_dir)) |
| 336 ps.AddPage(WebGLContextLostInHiddenTabPage(ps, ps.base_dir)) | 336 ps.AddPage(WebGLContextLostInHiddenTabPage(ps, ps.base_dir)) |
| 337 return ps | 337 return ps |
| OLD | NEW |