Ejemplo n.º 1
0
  def GetBrowserStartupArgs(self):
    args = []
    args.extend(self.options.extra_browser_args)
    args.append('--disable-background-networking')
    args.append('--metrics-recording-only')
    args.append('--no-first-run')
    if self.options.wpr_mode != wpr_modes.WPR_OFF:
      args.extend(wpr_server.GetChromeFlags(
          self.WEBPAGEREPLAY_HOST,
          self.webpagereplay_remote_http_port,
          self.webpagereplay_remote_https_port))
    args.extend(user_agent.GetChromeUserAgentArgumentFromType(
        self.options.browser_user_agent_type))

    extensions = [extension.local_path for extension in
                  self.options.extensions_to_load if not extension.is_component]
    extension_str = ','.join(extensions)
    if len(extensions) > 0:
      args.append('--load-extension=%s' % extension_str)

    component_extensions = [extension.local_path for extension in
                  self.options.extensions_to_load if extension.is_component]
    component_extension_str = ','.join(component_extensions)
    if len(component_extensions) > 0:
      args.append('--load-component-extension=%s' % component_extension_str)

    if self.options.no_proxy_server:
      args.append('--no-proxy-server')

    return args
    def GetBrowserStartupArgs(self):
        args = []
        args.extend(self.browser_options.extra_browser_args)
        args.append('--disable-background-networking')
        args.append('--enable-net-benchmarking')
        args.append('--metrics-recording-only')
        args.append('--no-default-browser-check')
        args.append('--no-first-run')

        # Turn on GPU benchmarking extension for all runs. The only side effect of
        # the extension being on is that render stats are tracked. This is believed
        # to be effectively free. And, by doing so here, it avoids us having to
        # programmatically inspect a pageset's actions in order to determine if it
        # might eventually scroll.
        args.append('--enable-gpu-benchmarking')

        # Set --no-proxy-server to work around some XP issues unless
        # some other flag indicates a proxy is needed.
        if not '--enable-spdy-proxy-auth' in args:
            args.append('--no-proxy-server')

        if self.browser_options.netsim:
            args.append('--ignore-certificate-errors')
        elif self.browser_options.wpr_mode != wpr_modes.WPR_OFF:
            args.extend(
                wpr_server.GetChromeFlags(self.forwarder_factory.host_ip,
                                          self.wpr_port_pairs))
        args.extend(
            user_agent.GetChromeUserAgentArgumentFromType(
                self.browser_options.browser_user_agent_type))

        extensions = [
            extension.local_path for extension in self._extensions_to_load
            if not extension.is_component
        ]
        extension_str = ','.join(extensions)
        if len(extensions) > 0:
            args.append('--load-extension=%s' % extension_str)

        component_extensions = [
            extension.local_path for extension in self._extensions_to_load
            if extension.is_component
        ]
        component_extension_str = ','.join(component_extensions)
        if len(component_extensions) > 0:
            args.append('--load-component-extension=%s' %
                        component_extension_str)

        if self.browser_options.no_proxy_server:
            args.append('--no-proxy-server')

        if self.browser_options.disable_component_extensions_with_background_pages:
            args.append('--disable-component-extensions-with-background-pages')

        return args
Ejemplo n.º 3
0
    def GetBrowserStartupArgs(self):
        args = []
        args.extend(self.browser_options.extra_browser_args)
        args.append('--disable-background-networking')
        args.append('--metrics-recording-only')
        args.append('--no-first-run')
        args.append('--no-default-browser-check')
        args.append('--no-proxy-server')
        if self.browser_options.netsim:
            args.append('--ignore-certificate-errors')
        elif self.browser_options.wpr_mode != wpr_modes.WPR_OFF:
            args.extend(
                wpr_server.GetChromeFlags(
                    self.WEBPAGEREPLAY_HOST,
                    self.wpr_http_port_pair.remote_port,
                    self.wpr_https_port_pair.remote_port))
        args.extend(
            user_agent.GetChromeUserAgentArgumentFromType(
                self.browser_options.browser_user_agent_type))

        extensions = [
            extension.local_path for extension in self._extensions_to_load
            if not extension.is_component
        ]
        extension_str = ','.join(extensions)
        if len(extensions) > 0:
            args.append('--load-extension=%s' % extension_str)

        component_extensions = [
            extension.local_path for extension in self._extensions_to_load
            if extension.is_component
        ]
        component_extension_str = ','.join(component_extensions)
        if len(component_extensions) > 0:
            args.append('--load-component-extension=%s' %
                        component_extension_str)

        if self.browser_options.no_proxy_server:
            args.append('--no-proxy-server')

        if self.browser_options.disable_component_extensions_with_background_pages:
            args.append('--disable-component-extensions-with-background-pages')

        return args