Chromium Code Reviews| 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) |