def __init__(self, backend, platform_backend, archive_path,
                 append_to_existing_wpr, make_javascript_deterministic,
                 credentials_path):
        assert platform_backend.platform != None

        self._browser_backend = backend
        self._platform_backend = platform_backend
        self._wpr_server = None
        self._local_server_controller = local_server.LocalServerController(
            backend)
        self._tabs = tab_list.TabList(backend.tab_list_backend)
        self.credentials = browser_credentials.BrowserCredentials()
        self.credentials.credentials_path = credentials_path
        self._platform_backend.DidCreateBrowser(self, self._browser_backend)

        self.SetReplayArchivePath(archive_path, append_to_existing_wpr,
                                  make_javascript_deterministic)

        browser_options = self._browser_backend.browser_options
        self.platform.FlushDnsCache()
        if browser_options.clear_sytem_cache_for_browser_and_profile_on_start:
            if self.platform.CanFlushIndividualFilesFromSystemCache():
                self.platform.FlushSystemCacheForDirectory(
                    self._browser_backend.profile_directory)
                self.platform.FlushSystemCacheForDirectory(
                    self._browser_backend.browser_directory)
            else:
                self.platform.FlushEntireSystemCache()

        self._browser_backend.SetBrowser(self)
        self._browser_backend.Start()
        self._platform_backend.DidStartBrowser(self, self._browser_backend)
Example #2
0
    def __init__(self, backend, platform_backend, credentials_path):
        super(Browser, self).__init__(app_backend=backend,
                                      platform_backend=platform_backend)
        self._browser_backend = backend
        self._platform_backend = platform_backend
        self._local_server_controller = local_server.LocalServerController(
            platform_backend)
        self._tabs = tab_list.TabList(backend.tab_list_backend)
        self.credentials = browser_credentials.BrowserCredentials()
        self.credentials.credentials_path = credentials_path
        self._platform_backend.DidCreateBrowser(self, self._browser_backend)

        browser_options = self._browser_backend.browser_options
        self.platform.FlushDnsCache()
        if browser_options.clear_sytem_cache_for_browser_and_profile_on_start:
            if self.platform.CanFlushIndividualFilesFromSystemCache():
                self.platform.FlushSystemCacheForDirectory(
                    self._browser_backend.profile_directory)
                self.platform.FlushSystemCacheForDirectory(
                    self._browser_backend.browser_directory)
            else:
                self.platform.FlushEntireSystemCache()

        self._browser_backend.SetBrowser(self)
        self._browser_backend.Start()
        self._platform_backend.DidStartBrowser(self, self._browser_backend)
        self._profiling_controller = profiling_controller.ProfilingController(
            self._browser_backend.profiling_controller_backend)
Example #3
0
 def __init__(self, backend, platform_backend):
     self._browser_backend = backend
     self._http_server = None
     self._wpr_server = None
     self._platform_backend = platform_backend
     self._active_profilers = []
     self._profilers_states = {}
     self._local_server_controller = local_server.LocalServerController(
         backend)
     self._tabs = tab_list.TabList(backend.tab_list_backend)
     self.credentials = browser_credentials.BrowserCredentials()
     self.platform.SetFullPerformanceModeEnabled(True)
Example #4
0
  def __init__(self, backend, platform_backend):
    assert platform_backend.platform != None

    self._browser_backend = backend
    self._platform_backend = platform_backend
    self._wpr_server = None
    self._active_profilers = []
    self._profilers_states = {}
    self._local_server_controller = local_server.LocalServerController(backend)
    self._tabs = tab_list.TabList(backend.tab_list_backend)
    self.credentials = browser_credentials.BrowserCredentials()

    self._platform_backend.DidCreateBrowser(self, self._browser_backend)
Example #5
0
 def __init__(self, backend, platform_backend):
     self._browser_backend = backend
     self._http_server = None
     self._wpr_server = None
     self._platform = platform.Platform(platform_backend)
     self._platform_backend = platform_backend
     self._tabs = tab_list.TabList(backend.tab_list_backend)
     self._extensions = None
     if backend.supports_extensions:
         self._extensions = extension_dict.ExtensionDict(
             backend.extension_dict_backend)
     self.credentials = browser_credentials.BrowserCredentials()
     self._platform.SetFullPerformanceModeEnabled(True)