def __init__(self, platform_backend, browser_options, browser_directory, profile_directory, supports_extensions, supports_tab_control): super(ChromeBrowserBackend, self).__init__(platform_backend=platform_backend, browser_options=browser_options, supports_extensions=supports_extensions, tab_list_backend=tab_list_backend.TabListBackend) self._browser_directory = browser_directory self._profile_directory = profile_directory self._supports_tab_control = supports_tab_control self._devtools_client = None self._extensions_to_load = browser_options.extensions_to_load if not supports_extensions and len(self._extensions_to_load) > 0: raise browser_backend.ExtensionsNotSupportedException( 'Extensions are not supported on the selected browser') if (self.browser_options.dont_override_profile and not options_for_unittests.AreSet()): sys.stderr.write( 'Warning: Not overriding profile. This can cause ' 'unexpected effects due to profile-specific settings, ' 'such as about:flags settings, cookies, and ' 'extensions.\n')
def __init__(self, platform_backend, supports_tab_control, supports_extensions, browser_options, output_profile_path, extensions_to_load): super(ChromeBrowserBackend, self).__init__(platform_backend=platform_backend, supports_extensions=supports_extensions, browser_options=browser_options, tab_list_backend=tab_list_backend.TabListBackend) self._port = None self._supports_tab_control = supports_tab_control self._devtools_client = None self._system_info_backend = None self._output_profile_path = output_profile_path self._extensions_to_load = extensions_to_load if browser_options.netsim: self.wpr_port_pairs = forwarders.PortPairs( http=forwarders.PortPair(80, 80), https=forwarders.PortPair(443, 443), dns=forwarders.PortPair(53, 53)) else: self.wpr_port_pairs = forwarders.PortPairs( http=forwarders.PortPair(0, 0), https=forwarders.PortPair(0, 0), dns=None) if (self.browser_options.dont_override_profile and not options_for_unittests.AreSet()): sys.stderr.write( 'Warning: Not overriding profile. This can cause ' 'unexpected effects due to profile-specific settings, ' 'such as about:flags settings, cookies, and ' 'extensions.\n')
def __init__(self, platform_backend, supports_tab_control, supports_extensions, browser_options): super(ChromeBrowserBackend, self).__init__(platform_backend=platform_backend, supports_extensions=supports_extensions, browser_options=browser_options, tab_list_backend=tab_list_backend.TabListBackend) self._supports_tab_control = supports_tab_control self._devtools_client = None self._output_profile_path = browser_options.output_profile_path self._extensions_to_load = browser_options.extensions_to_load if (self.browser_options.dont_override_profile and not options_for_unittests.AreSet()): sys.stderr.write( 'Warning: Not overriding profile. This can cause ' 'unexpected effects due to profile-specific settings, ' 'such as about:flags settings, cookies, and ' 'extensions.\n')