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

Unified Diff: tools/chrome_proxy/webdriver/bypass.py

Issue 2813703005: Implement the BadHTTPSFallback Integration Test with ChromeDriver (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698