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

Unified Diff: tools/telemetry/telemetry/web_contents.py

Issue 12253002: Fix dtor of web_contents. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: comments Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/tab.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/web_contents.py
===================================================================
--- tools/telemetry/telemetry/web_contents.py (revision 182002)
+++ tools/telemetry/telemetry/web_contents.py (working copy)
@@ -4,11 +4,19 @@
DEFAULT_WEB_CONTENTS_TIMEOUT = 60
+# TODO(achuith, dtu, nduca): Add unit tests specifically for WebContents,
+# independent of Tab.
class WebContents(object):
"""Represents web contents in the browser"""
def __init__(self, inspector_backend):
self._inspector_backend = inspector_backend
+ def __del__(self):
+ self.Disconnect()
+
+ def Disconnect(self):
+ self._inspector_backend.Disconnect()
+
def WaitForDocumentReadyStateToBeComplete(self,
timeout=DEFAULT_WEB_CONTENTS_TIMEOUT):
self._inspector_backend.WaitForDocumentReadyStateToBeComplete(timeout)
« no previous file with comments | « tools/telemetry/telemetry/tab.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698