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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 def _GetPossibleBrowser(self, test, finder_options): | 122 def _GetPossibleBrowser(self, test, finder_options): |
123 """Return a possible_browser with the given options for |test|. """ | 123 """Return a possible_browser with the given options for |test|. """ |
124 possible_browser = self._FindBrowser(finder_options) | 124 possible_browser = self._FindBrowser(finder_options) |
125 finder_options.browser_options.browser_type = ( | 125 finder_options.browser_options.browser_type = ( |
126 possible_browser.browser_type) | 126 possible_browser.browser_type) |
127 | 127 |
128 enabled, msg = decorators.IsEnabled(test, possible_browser) | 128 enabled, msg = decorators.IsEnabled(test, possible_browser) |
129 if not enabled and not finder_options.run_disabled_tests: | 129 if not enabled and not finder_options.run_disabled_tests: |
130 logging.warning(msg) | 130 logging.warning(msg) |
131 logging.warning('You are trying to run a disabled test.') | 131 logging.warning('You are trying to run a disabled test.') |
132 logging.warning( | |
133 'Pass --also-run-disabled-tests to squelch this message.') | |
134 sys.exit(0) | |
135 | 132 |
136 if possible_browser.IsRemote(): | 133 if possible_browser.IsRemote(): |
137 possible_browser.RunRemote() | 134 possible_browser.RunRemote() |
138 sys.exit(0) | 135 sys.exit(0) |
139 return possible_browser | 136 return possible_browser |
140 | 137 |
141 def DumpStateUponFailure(self, page, results): | 138 def DumpStateUponFailure(self, page, results): |
142 # Dump browser standard output and log. | 139 # Dump browser standard output and log. |
143 if self._browser: | 140 if self._browser: |
144 self._browser.DumpStateUponFailure() | 141 self._browser.DumpStateUponFailure() |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 class SharedDesktopPageState(SharedPageState): | 351 class SharedDesktopPageState(SharedPageState): |
355 _device_type = 'desktop' | 352 _device_type = 'desktop' |
356 | 353 |
357 | 354 |
358 class SharedTabletPageState(SharedPageState): | 355 class SharedTabletPageState(SharedPageState): |
359 _device_type = 'tablet' | 356 _device_type = 'tablet' |
360 | 357 |
361 | 358 |
362 class Shared10InchTabletPageState(SharedPageState): | 359 class Shared10InchTabletPageState(SharedPageState): |
363 _device_type = 'tablet_10_inch' | 360 _device_type = 'tablet_10_inch' |
OLD | NEW |