OLD | NEW |
1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 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 copy | 5 import copy |
6 import logging | 6 import logging |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import shlex | 9 import shlex |
10 import sys | 10 import sys |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 def CreateParser(self, *args, **kwargs): | 56 def CreateParser(self, *args, **kwargs): |
57 parser = optparse.OptionParser(*args, **kwargs) | 57 parser = optparse.OptionParser(*args, **kwargs) |
58 | 58 |
59 # Selection group | 59 # Selection group |
60 group = optparse.OptionGroup(parser, 'Which browser to use') | 60 group = optparse.OptionGroup(parser, 'Which browser to use') |
61 group.add_option('--browser', | 61 group.add_option('--browser', |
62 dest='browser_type', | 62 dest='browser_type', |
63 default=None, | 63 default=None, |
64 help='Browser type to run, ' | 64 help='Browser type to run, ' |
65 'in order of priority. Supported values: list,%s' % | 65 'in order of priority. Supported values: list,%s' % |
66 ','.join(browser_finder.FindAllBrowserTypes())) | 66 ','.join(browser_finder.FindAllBrowserTypes(self))) |
67 group.add_option('--browser-executable', | 67 group.add_option('--browser-executable', |
68 dest='browser_executable', | 68 dest='browser_executable', |
69 help='The exact browser to run.') | 69 help='The exact browser to run.') |
70 group.add_option('--chrome-root', | 70 group.add_option('--chrome-root', |
71 dest='chrome_root', | 71 dest='chrome_root', |
72 help='Where to look for chrome builds.' | 72 help='Where to look for chrome builds.' |
73 'Defaults to searching parent dirs by default.') | 73 'Defaults to searching parent dirs by default.') |
74 group.add_option('--device', | 74 group.add_option('--device', |
75 dest='android_device', | 75 dest='android_device', |
76 help='The android device ID to use' | 76 help='The android device ID to use' |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 328 |
329 @property | 329 @property |
330 def extra_browser_args(self): | 330 def extra_browser_args(self): |
331 return self._extra_browser_args | 331 return self._extra_browser_args |
332 | 332 |
333 def AppendExtraBrowserArgs(self, args): | 333 def AppendExtraBrowserArgs(self, args): |
334 if isinstance(args, list): | 334 if isinstance(args, list): |
335 self._extra_browser_args.update(args) | 335 self._extra_browser_args.update(args) |
336 else: | 336 else: |
337 self._extra_browser_args.add(args) | 337 self._extra_browser_args.add(args) |
OLD | NEW |