Chromium Code Reviews| Index: tools/chrome_proxy/webdriver/fallback.py |
| diff --git a/tools/chrome_proxy/webdriver/fallback.py b/tools/chrome_proxy/webdriver/fallback.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..65eb296af54b5dcf72e8b549a048b55ad079e1d7 |
| --- /dev/null |
| +++ b/tools/chrome_proxy/webdriver/fallback.py |
| @@ -0,0 +1,34 @@ |
| +# Copyright 2017 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import common |
| +from common import TestDriver |
| +from common import IntegrationTest |
| + |
| +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.
|
| + |
| + # Ensure that when a carrier blocks using the secure proxy, requests fallback |
| + # to the HTTP proxy server. |
| + def testSecureProxyProbeFallback(self): |
| + with TestDriver() as test_driver: |
| + test_driver.AddChromeArg('--enable-spdy-proxy-auth') |
| + |
| + # Set the secure proxy check URL to the google.com favicon, which will be |
| + # interpreted as a secure proxy check failure since the response body is |
| + # not "OK". The google.com favicon is used because it will load reliably |
| + # fast, and there have been problems with chromeproxy-test.appspot.com |
| + # being slow and causing tests to flake. |
| + test_driver.AddChromeArg( |
| + '--data-reduction-proxy-secure-proxy-check-url=' |
| + 'http://www.google.com/favicon.ico') |
| + |
| + 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) |
|
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
|
| + |
| +if __name__ == '__main__': |
| + IntegrationTest.RunAllTests() |