| 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 import logging | 5 import logging |
| 6 import os | 6 import os |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 from telemetry.core import exceptions | 9 from telemetry.core import exceptions |
| 10 from telemetry.core import util | 10 from telemetry.core import util |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 wpr_mode = wpr_modes.WPR_REPLAY | 95 wpr_mode = wpr_modes.WPR_REPLAY |
| 96 | 96 |
| 97 use_live_traffic = wpr_mode == wpr_modes.WPR_OFF | 97 use_live_traffic = wpr_mode == wpr_modes.WPR_OFF |
| 98 | 98 |
| 99 if self.platform.network_controller.is_open: | 99 if self.platform.network_controller.is_open: |
| 100 self.platform.network_controller.Close() | 100 self.platform.network_controller.Close() |
| 101 self.platform.network_controller.InitializeIfNeeded( | 101 self.platform.network_controller.InitializeIfNeeded( |
| 102 use_live_traffic=use_live_traffic) | 102 use_live_traffic=use_live_traffic) |
| 103 self.platform.network_controller.Open(wpr_mode, | 103 self.platform.network_controller.Open(wpr_mode, |
| 104 browser_options.extra_wpr_args) | 104 browser_options.extra_wpr_args) |
| 105 self.platform.Initialize() |
| 105 | 106 |
| 106 @property | 107 @property |
| 107 def possible_browser(self): | 108 def possible_browser(self): |
| 108 return self._possible_browser | 109 return self._possible_browser |
| 109 | 110 |
| 110 @property | 111 @property |
| 111 def browser(self): | 112 def browser(self): |
| 112 return self._browser | 113 return self._browser |
| 113 | 114 |
| 114 def _FindBrowser(self, finder_options): | 115 def _FindBrowser(self, finder_options): |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 class SharedDesktopPageState(SharedPageState): | 355 class SharedDesktopPageState(SharedPageState): |
| 355 _device_type = 'desktop' | 356 _device_type = 'desktop' |
| 356 | 357 |
| 357 | 358 |
| 358 class SharedTabletPageState(SharedPageState): | 359 class SharedTabletPageState(SharedPageState): |
| 359 _device_type = 'tablet' | 360 _device_type = 'tablet' |
| 360 | 361 |
| 361 | 362 |
| 362 class Shared10InchTabletPageState(SharedPageState): | 363 class Shared10InchTabletPageState(SharedPageState): |
| 363 _device_type = 'tablet_10_inch' | 364 _device_type = 'tablet_10_inch' |
| OLD | NEW |