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

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

Issue 2813703005: Implement the BadHTTPSFallback Integration Test with ChromeDriver (Closed)
Patch Set: Remove white space 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..e046ce74bf3d32bc48da13cb687973f78c03a86b 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)
+ # Data Saver 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.
+ # That will force Data Saver 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/fallback/')
+ responses = test_driver.GetHTTPResponses()
+ self.assertNotEqual(0, len(responses))
+ for response in responses:
+ self.assertEqual(80, response.port)
if __name__ == '__main__':
- IntegrationTest.RunAllTests()
+ 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