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..86785a5775652393c62a16f9822c45d75eb3d0b5 100644 |
| --- a/tools/chrome_proxy/webdriver/bypass.py |
| +++ b/tools/chrome_proxy/webdriver/bypass.py |
| @@ -172,6 +172,23 @@ 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 |
|
RyanSturm
2017/04/12 19:54:31
nit: s/http/HTTP/ s/https/HTTPS/ s/proxy/proxy./ s
|
| + def testBadHTTPSFallback(self): |
| + with TestDriver() as test_driver: |
| + test_driver.AddChromeArg('--enable-spdy-proxy-auth') |
| + # Set the primary (https) proxy to a bad one. |
| + # 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=' |
|
bustamante
2017/04/11 23:15:18
Nit - trailing whitespace
|
| + 'http://compress.googlezip.net') |
| + |
| + test_driver.LoadURL('http://check.googlezip.net/fallback/') |
| + responses = test_driver.GetHTTPResponses() |
| + self.assertNotEqual(0, len(responses)) |
| + for response in responses: |
| + self.assertEqual(80, response.port) |
|
RyanSturm
2017/04/12 19:54:31
If you add "self.assertHasChromeProxyViaHeader(res
|
| if __name__ == '__main__': |
| - IntegrationTest.RunAllTests() |
| + IntegrationTest.RunAllTests() |