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

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

Issue 2776313003: Update ChromeDriver to accept W3C format InitSession (Closed)
Patch Set: Disallow using W3C format without setting W3C option flag 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
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..0956cff8dd1cba63c8e39d81a955774ffc196dd6 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -2125,15 +2125,16 @@ 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.
samuong 2017/03/29 17:07:48 nit: w3c -> W3C
+ with self.assertRaises(chromedriver.UnknownError):
+ 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)
« chrome/test/chromedriver/session_commands.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