Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: tools/telemetry/telemetry/core/browser.py

Issue 736653002: [Pywebsocket PerformanceTests 2/2] Add blink_perf.pywebsocket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 os 5 import os
6 6
7 from telemetry.core import app 7 from telemetry.core import app
8 from telemetry.core.backends import browser_backend 8 from telemetry.core.backends import browser_backend
9 from telemetry.core import browser_credentials 9 from telemetry.core import browser_credentials
10 from telemetry.core import exceptions 10 from telemetry.core import exceptions
(...skipping 14 matching lines...) Expand all
25 the browser. Or better yet: 25 the browser. Or better yet:
26 browser_to_create = FindBrowser(options) 26 browser_to_create = FindBrowser(options)
27 with browser_to_create.Create(options) as browser: 27 with browser_to_create.Create(options) as browser:
28 ... do all your operations on browser here 28 ... do all your operations on browser here
29 """ 29 """
30 def __init__(self, backend, platform_backend, credentials_path): 30 def __init__(self, backend, platform_backend, credentials_path):
31 super(Browser, self).__init__(app_backend=backend, 31 super(Browser, self).__init__(app_backend=backend,
32 platform_backend=platform_backend) 32 platform_backend=platform_backend)
33 self._browser_backend = backend 33 self._browser_backend = backend
34 self._platform_backend = platform_backend 34 self._platform_backend = platform_backend
35 # TODO: move _local_server_controller to Platform.
35 self._local_server_controller = local_server.LocalServerController( 36 self._local_server_controller = local_server.LocalServerController(
36 platform_backend) 37 platform_backend)
37 self._tabs = tab_list.TabList(backend.tab_list_backend) 38 self._tabs = tab_list.TabList(backend.tab_list_backend)
38 self.credentials = browser_credentials.BrowserCredentials() 39 self.credentials = browser_credentials.BrowserCredentials()
39 self.credentials.credentials_path = credentials_path 40 self.credentials.credentials_path = credentials_path
40 self._platform_backend.DidCreateBrowser(self, self._browser_backend) 41 self._platform_backend.DidCreateBrowser(self, self._browser_backend)
41 42
42 browser_options = self._browser_backend.browser_options 43 browser_options = self._browser_backend.browser_options
43 self.platform.FlushDnsCache() 44 self.platform.FlushDnsCache()
44 if browser_options.clear_sytem_cache_for_browser_and_profile_on_start: 45 if browser_options.clear_sytem_cache_for_browser_and_profile_on_start:
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 284
284 @property 285 @property
285 def supports_system_info(self): 286 def supports_system_info(self):
286 return self._browser_backend.supports_system_info 287 return self._browser_backend.supports_system_info
287 288
288 def GetSystemInfo(self): 289 def GetSystemInfo(self):
289 """Returns low-level information about the system, if available. 290 """Returns low-level information about the system, if available.
290 291
291 See the documentation of the SystemInfo class for more details.""" 292 See the documentation of the SystemInfo class for more details."""
292 return self._browser_backend.GetSystemInfo() 293 return self._browser_backend.GetSystemInfo()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698