Commit 9345efad authored by achuith@chromium.org's avatar achuith@chromium.org

Fix dtor of web_contents.

BUG=NONE
TEST=run_tests
Review URL: https://codereview.chromium.org/12253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182313 0039d316-1c4b-4281-b951-d872f2087c98
parent 96ea819e
......@@ -20,10 +20,7 @@ class Tab(web_contents.WebContents):
super(Tab, self).__init__(inspector_backend)
def __del__(self):
self.Disconnect()
def Disconnect(self):
self._inspector_backend.Disconnect()
super(Tab, self).__del__()
@property
def browser(self):
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment