Add close method for Chrome
This adds a close method for the Chrome class and calls it during cleanup in
power_LoadTest. This makes power_LoadTest close Chrome when it finishes.
BUG=chromium:393027
TEST=run power_LoadTest
Change-Id: Ic3511a3c1908040a5b90e99645980b4bd35a9a68
Reviewed-on: https://chromium-review.googlesource.com/207688
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Derek Basehore <dbasehore@chromium.org>
Tested-by: Derek Basehore <dbasehore@chromium.org>
diff --git a/client/common_lib/cros/chrome.py b/client/common_lib/cros/chrome.py
index e63fc6c..0a7146c 100644
--- a/client/common_lib/cros/chrome.py
+++ b/client/common_lib/cros/chrome.py
@@ -98,7 +98,7 @@
def __exit__(self, *args):
- self.browser.Close()
+ self.close()
@property
@@ -174,3 +174,8 @@
exceptions.BrowserConnectionGoneException):
return True
return False
+
+
+ def close(self):
+ """Closes the browser."""
+ self._browser.Close()