示例#1
0
    def AddCommandLineArgs(cls, parser):

        ############################################################################
        # Please do not add any more options here without first discussing with    #
        # a telemetry owner. This is not the right place for platform-specific     #
        # options.                                                                 #
        ############################################################################

        group = optparse.OptionGroup(parser, 'Browser options')
        profile_choices = profile_types.GetProfileTypes()
        group.add_option(
            '--profile-type',
            dest='profile_type',
            type='choice',
            default='clean',
            choices=profile_choices,
            help=(
                'The user profile to use. A clean profile is used by default. '
                'Supported values: ' + ', '.join(profile_choices)))
        group.add_option('--profile-dir',
                         dest='profile_dir',
                         help='Profile directory to launch the browser with. '
                         'A clean profile is used by default')
        group.add_option(
            '--extra-browser-args',
            dest='extra_browser_args_as_string',
            help='Additional arguments to pass to the browser when it starts')
        group.add_option(
            '--extra-wpr-args',
            dest='extra_wpr_args_as_string',
            help=('Additional arguments to pass to Web Page Replay. '
                  'See third_party/web-page-replay/replay.py for usage.'))
        group.add_option(
            '--show-stdout',
            action='store_true',
            help='When possible, will display the stdout of the process')

        group.add_option(
            '--browser-logging-verbosity',
            dest='logging_verbosity',
            type='choice',
            choices=cls._LOGGING_LEVELS,
            help=(
                'Browser logging verbosity. The log file is saved in temp '
                "directory. Note that logging affects the browser's "
                'performance. Supported values: %s. Defaults to %s.' %
                (', '.join(cls._LOGGING_LEVELS), cls._DEFAULT_LOGGING_LEVEL)))
        group.add_option(
            '--assert-gpu-compositing',
            dest='assert_gpu_compositing',
            action='store_true',
            help=
            'Assert the browser uses gpu compositing and not software path.')
        parser.add_option_group(group)

        group = optparse.OptionGroup(parser, 'Compatibility options')
        group.add_option(
            '--gtest_output',
            help='Ignored argument for compatibility with runtest.py harness')
        parser.add_option_group(group)
示例#2
0
    def AddCommandLineArgs(cls, parser):

        ############################################################################
        # Please do not add any more options here without first discussing with    #
        # a telemetry owner. This is not the right place for platform-specific     #
        # options.                                                                 #
        ############################################################################

        group = optparse.OptionGroup(parser, 'Browser options')
        profile_choices = profile_types.GetProfileTypes()
        group.add_option(
            '--profile-type',
            dest='profile_type',
            type='choice',
            default='clean',
            choices=profile_choices,
            help=(
                'The user profile to use. A clean profile is used by default. '
                'Supported values: ' + ', '.join(profile_choices)))
        group.add_option('--profile-dir',
                         dest='profile_dir',
                         help='Profile directory to launch the browser with. '
                         'A clean profile is used by default')
        group.add_option(
            '--extra-browser-args',
            dest='extra_browser_args_as_string',
            help='Additional arguments to pass to the browser when it starts')
        group.add_option(
            '--extra-wpr-args',
            dest='extra_wpr_args_as_string',
            help=('Additional arguments to pass to Web Page Replay. '
                  'See third_party/webpagereplay/replay.py for usage.'))
        group.add_option(
            '--netsim',
            default=None,
            type='choice',
            choices=net_configs.NET_CONFIG_NAMES,
            help=('Run benchmark under simulated network conditions. '
                  'Will prompt for sudo. Supported values: ' +
                  ', '.join(net_configs.NET_CONFIG_NAMES)))
        group.add_option(
            '--show-stdout',
            action='store_true',
            help='When possible, will display the stdout of the process')
        group.add_option(
            '--enable-browser-logging',
            dest='enable_logging',
            action='store_true',
            help=
            ('Enable browser logging. The log file is saved in temp directory.'
             "Note that enabling this flag affects the browser's "
             'performance'))
        parser.add_option_group(group)

        group = optparse.OptionGroup(parser, 'Compatibility options')
        group.add_option(
            '--gtest_output',
            help='Ignored argument for compatibility with runtest.py harness')
        parser.add_option_group(group)
示例#3
0
  def AddCommandLineArgs(cls, parser):

    ############################################################################
    # Please do not add any more options here without first discussing with    #
    # a telemetry owner. This is not the right place for platform-specific     #
    # options.                                                                 #
    ############################################################################

    group = optparse.OptionGroup(parser, 'Browser options')
    profile_choices = profile_types.GetProfileTypes()
    group.add_option('--profile-type',
        dest='profile_type',
        type='choice',
        default='clean',
        choices=profile_choices,
        help=('The user profile to use. A clean profile is used by default. '
              'Supported values: ' + ', '.join(profile_choices)))
    group.add_option('--profile-dir',
        dest='profile_dir',
        help='Profile directory to launch the browser with. '
             'A clean profile is used by default')
    group.add_option('--extra-browser-args',
        dest='extra_browser_args_as_string',
        help='Additional arguments to pass to the browser when it starts')
    group.add_option('--extra-wpr-args',
        dest='extra_wpr_args_as_string',
        help=('Additional arguments to pass to Web Page Replay. '
              'See third_party/webpagereplay/replay.py for usage.'))
    group.add_option('--netsim', default=None, type='choice',
        choices=net_configs.NET_CONFIG_NAMES,
        help=('Run benchmark under simulated network conditions. '
              'Will prompt for sudo. Supported values: ' +
              ', '.join(net_configs.NET_CONFIG_NAMES)))
    group.add_option('--show-stdout',
        action='store_true',
        help='When possible, will display the stdout of the process')
    # This hidden option is to be removed, and the older code path deleted,
    # once Chrome 37 reaches Stable. http://crbug.com/379980
    group.add_option('--use-devtools-active-port',
        action='store_true',
        help=optparse.SUPPRESS_HELP)
    parser.add_option_group(group)

    group = optparse.OptionGroup(parser, 'Compatibility options')
    group.add_option('--gtest_output',
        help='Ignored argument for compatibility with runtest.py harness')
    parser.add_option_group(group)
示例#4
0
    def testGetProfileTypes(self):
        types = profile_types.GetProfileTypes()

        self.assertTrue('clean' in types)
        self.assertTrue(len(types) > 0)