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

Unified Diff: chrome/test/chromedriver/test_environment.py

Issue 18086004: Move Python setup/tear down logic into Forwarder itself. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
Index: chrome/test/chromedriver/test_environment.py
diff --git a/chrome/test/chromedriver/test_environment.py b/chrome/test/chromedriver/test_environment.py
index e34b4c884d8da5aa6e728458a154117607702371..9dd65c8499e110c8498e27198d3b2929ef66cbd5 100644
--- a/chrome/test/chromedriver/test_environment.py
+++ b/chrome/test/chromedriver/test_environment.py
@@ -94,18 +94,15 @@ class AndroidTestEnvironment(DesktopTestEnvironment):
os.putenv('TEST_HTTP_PORT', str(ANDROID_TEST_HTTP_PORT))
os.putenv('TEST_HTTPS_PORT', str(ANDROID_TEST_HTTPS_PORT))
self._adb = android_commands.AndroidCommands()
- self._forwarder = forwarder.Forwarder(self._adb, 'Debug')
- self._forwarder.Run(
+ forwarder.Forwarder.Map(
[(ANDROID_TEST_HTTP_PORT, ANDROID_TEST_HTTP_PORT),
(ANDROID_TEST_HTTPS_PORT, ANDROID_TEST_HTTPS_PORT)],
- valgrind_tools.BaseTool())
+ self._adb)
# override
def GlobalTearDown(self):
- if self._adb is not None:
- forwarder.Forwarder.KillDevice(self._adb, valgrind_tools.BaseTool())
- if self._forwarder is not None:
- self._forwarder.Close()
+ for device_port in [ANDROID_TEST_HTTP_PORT, ANDROID_TEST_HTTPS_PORT]:
+ forwarder.Forwarder.UnmapDevicePort(device_port, self._adb)
# override
def GetOS(self):

Powered by Google App Engine
This is Rietveld 408576698