Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import common | |
| 6 from common import TestDriver | |
| 7 from common import IntegrationTest | |
| 8 | |
| 9 class Fallback(IntegrationTest): | |
|
tbansal1
2017/02/23 22:26:34
SecureProxyCheckFallback
RyanSturm
2017/02/23 22:33:17
I wasn't sure if there were other fallbacks intend
Robert Ogden
2017/02/23 23:30:43
There are :) Good as is
tbansal1
2017/02/24 19:39:17
Acknowledged.
| |
| 10 | |
| 11 # Ensure that when a carrier blocks using the secure proxy, requests fallback | |
| 12 # to the HTTP proxy server. | |
| 13 def testSecureProxyProbeFallback(self): | |
| 14 with TestDriver() as test_driver: | |
| 15 test_driver.AddChromeArg('--enable-spdy-proxy-auth') | |
| 16 | |
| 17 # Set the secure proxy check URL to the google.com favicon, which will be | |
| 18 # interpreted as a secure proxy check failure since the response body is | |
| 19 # not "OK". The google.com favicon is used because it will load reliably | |
| 20 # fast, and there have been problems with chromeproxy-test.appspot.com | |
| 21 # being slow and causing tests to flake. | |
| 22 test_driver.AddChromeArg( | |
| 23 '--data-reduction-proxy-secure-proxy-check-url=' | |
| 24 'http://www.google.com/favicon.ico') | |
| 25 | |
| 26 test_driver.LoadURL('http://check.googlezip.net/test.html') | |
| 27 responses = test_driver.GetHTTPResponses() | |
| 28 self.assertNotEqual(0, len(responses)) | |
| 29 for response in responses: | |
| 30 self.assertHasChromeProxyViaHeader(response) | |
| 31 self.assertEqual(u'http/1.1', response.protocol) | |
|
tbansal1
2017/02/23 22:26:34
Is this flaky? why is it guaranteed that the secur
RyanSturm
2017/02/23 22:33:17
Hmm. Any suggestions here? Like the copied comment
| |
| 32 | |
| 33 if __name__ == '__main__': | |
| 34 IntegrationTest.RunAllTests() | |
| OLD | NEW |