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

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

Issue 127143003: [chromedriver] Reuse forwarded adb ports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nits Created 6 years, 11 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/run_py_tests.py
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index 660ac7ee1d9da578947f6c4429c596460f7f38ff..71bce28c56fef5dffaa8db75ed3b8ede78caaa27 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -76,7 +76,7 @@ _DESKTOP_NEGATIVE_FILTER = [
'ChromeDriverTest.testSingleTapElement',
'ChromeDriverTest.testTouchDownUpElement',
'ChromeDriverTest.testTouchMovedElement',
- 'ChromeDriverTest.testLatestAndroidAppInstalled',
+ 'ChromeDriverAndroidTest.*',
]
@@ -177,7 +177,8 @@ class ChromeDriverTest(ChromeDriverBaseTest):
chrome_paths.GetTestData())
ChromeDriverTest._sync_server = webserver.SyncWebServer()
if _ANDROID_PACKAGE_KEY:
- ChromeDriverTest._adb = android_commands.AndroidCommands()
+ ChromeDriverTest._adb = android_commands.AndroidCommands(
+ android_commands.GetAttachedDevices()[0])
http_host_port = ChromeDriverTest._http_server._server.server_port
sync_host_port = ChromeDriverTest._sync_server._server.server_port
forwarder.Forwarder.Map(
@@ -654,12 +655,17 @@ class ChromeDriverTest(ChromeDriverBaseTest):
def testDoesntHangOnDebugger(self):
self._driver.ExecuteScript('debugger;')
+
+class ChromeDriverAndroidTest(ChromeDriverBaseTest):
+ """End to end tests for Android-specific tests."""
+
def testLatestAndroidAppInstalled(self):
- assert _ANDROID_PACKAGE_KEY
if ('stable' not in _ANDROID_PACKAGE_KEY and
'beta' not in _ANDROID_PACKAGE_KEY):
return
+ self._driver = self.CreateDriver()
+
try:
omaha_list = json.loads(
urllib2.urlopen('http://omahaproxy.appspot.com/all.json').read())
@@ -676,6 +682,13 @@ class ChromeDriverTest(ChromeDriverBaseTest):
except urllib2.URLError as e:
print 'Unable to fetch current version info from omahaproxy (%s)' % e
+ def testDeviceManagement(self):
+ self._drivers = [self.CreateDriver() for x in
+ android_commands.GetAttachedDevices()]
+ self.assertRaises(chromedriver.UnknownError, self.CreateDriver)
+ self._drivers[0].Quit()
+ self._drivers[0] = self.CreateDriver()
+
class ChromeSwitchesCapabilityTest(ChromeDriverBaseTest):
"""Tests that chromedriver properly processes chromeOptions.args capabilities.
« chrome/test/chromedriver/net/port_server.cc ('K') | « chrome/test/chromedriver/session_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698