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) |