Chromium Code Reviews| Index: tools/chrome_proxy/webdriver/bypass.py |
| diff --git a/tools/chrome_proxy/webdriver/bypass.py b/tools/chrome_proxy/webdriver/bypass.py |
| index 2b3259fe52f1590fb859e5c3e969bce54249b5d4..fa2137e086386f96811c7c9454bd85e0fbc95359 100644 |
| --- a/tools/chrome_proxy/webdriver/bypass.py |
| +++ b/tools/chrome_proxy/webdriver/bypass.py |
| @@ -172,6 +172,24 @@ class Bypass(IntegrationTest): |
| for response in responses: |
| self.assertHasChromeProxyViaHeader(response) |
| + # DataSaver uses a https proxy by default, if that fails it will fall back to |
| + # a http proxy |
| + def testBadHTTPSFallback(self): |
| + with TestDriver() as test_driver: |
| + test_driver.AddChromeArg('--enable-spdy-proxy-auth') |
| + # set the primary (https) proxy to a bad one. |
|
bustamante
2017/04/11 22:04:10
Nit - the "S" in set should be capitalized.
|
| + # That will force DataSaver to the http proxy for normal page requests. |
| + test_driver.AddChromeArg('--spdy-proxy-auth-origin=' |
| + 'https://nonexistent.googlezip.net') |
| + test_driver.AddChromeArg('--data-reduction-proxy-http-proxies=' |
| + 'http://compress.googlezip.net') |
| + |
| + test_driver.LoadURL('http://check.googlezip.net/test.html') |
| + responses = test_driver.GetHTTPResponses() |
| + self.assertNotEqual(0, len(responses)) |
| + for response in responses: |
| + self.assertHasChromeProxyViaHeader(response) |
| + self.assertEqual(u'http/1.1', response.protocol) |
|
bustamante
2017/04/11 22:04:10
Port 80 may be a better check as it could also go
|
| if __name__ == '__main__': |
| IntegrationTest.RunAllTests() |