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

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

Issue 2776313003: Update ChromeDriver to accept W3C format InitSession (Closed)
Patch Set: Update exception type, code formatting, and comments Created 3 years, 9 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
« no previous file with comments | « chrome/test/chromedriver/session_commands.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 88019e909757ef235bac54e2c91251f41eaafb7b..2c8105af4e9aea685632b05ca64086c71503cafd 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -2125,20 +2125,21 @@ class MobileEmulationCapabilityTest(ChromeDriverBaseTest):
self.assertEquals(network, connection_type)
def testW3cCompliantResponses(self):
- # Asserts that chromedriver has received the correct response.
- # W3C compliant responses should only be received when the capability has
- # been set and the request was sent in the correct format.
- driver = self.CreateDriver(send_w3c_request=True)
- self.assertFalse(driver.w3c_compliant)
+ # It's an error to send W3C format request without W3C capability flag.
+ with self.assertRaises(chromedriver.SessionNotCreatedException):
+ self.CreateDriver(send_w3c_request=True)
+ # W3C capability flag is ignored in a legacy format request.
driver = self.CreateDriver(send_w3c_capability=True)
self.assertFalse(driver.w3c_compliant)
+ # W3C compliant responses should only be received when the capability has
+ # been set and the request was sent in the correct format.
driver = self.CreateDriver(send_w3c_capability=True, send_w3c_request=True)
self.assertTrue(driver.w3c_compliant)
# Asserts that errors are being raised correctly in the test client
- # with a w3c compliant driver.
+ # with a W3C compliant driver.
self.assertRaises(chromedriver.UnknownError,
driver.GetNetworkConnection)
« no previous file with comments | « chrome/test/chromedriver/session_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698