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

Side by Side Diff: tools/chrome_proxy/webdriver/fallback.py

Issue 2714003002: Adding a probe fallback to HTTP test (Closed)
Patch Set: tbansal nit Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/chrome_proxy/webdriver/common.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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):
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 # Start chrome to begin the secure proxy check
27 test_driver.LoadURL('http://www.google.com/favicon.ico')
28
29 self.assertTrue(
30 test_driver.SleepUntilHistogramHasEntry("DataReductionProxy.ProbeURL"))
31
32 test_driver.LoadURL('http://check.googlezip.net/test.html')
33 responses = test_driver.GetHTTPResponses()
34 self.assertNotEqual(0, len(responses))
35 for response in responses:
36 self.assertHasChromeProxyViaHeader(response)
37 self.assertEqual(u'http/1.1', response.protocol)
38
39 if __name__ == '__main__':
40 IntegrationTest.RunAllTests()
OLDNEW
« no previous file with comments | « tools/chrome_proxy/webdriver/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698