Commit 15835806 authored by rajendrant's avatar rajendrant Committed by Commit Bot

Fix proxy_connection tests for M75

The tests use some neterrors that are internally falledback and handled
by the NetworkService. So the DRP loader throttle does not receive them
to record DRP InvalidResponseHeadersReceived.NetError histograms.

This test instead relies on warmup fetch failures being recorded.

Theere is some difference with M74 and M75, that the
WarmupURLFetcherCallback.SuccessfulFetch.InsecureProxy.Core is
recorded in M75 and InsecureProxy.NonCore. The test is fixed to run only
for M75+.

Bug: 934875
Change-Id: I2a2147b2d0d94343334494dd7d3558b1e6ec4201
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610508Reviewed-by: default avatarRobert Ogden <robertogden@chromium.org>
Commit-Queue: rajendrant <rajendrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659345}
parent 61fceeb0
......@@ -38,7 +38,7 @@ class ProxyConnection(IntegrationTest):
self.assertTrue(t.SleepUntilHistogramHasEntry('DataReductionProxy.'
'InvalidResponseHeadersReceived.NetError'))
@ChromeVersionEqualOrAfterM(63)
@ChromeVersionEqualOrAfterM(75)
def testTCPReset(self):
port = common.GetOpenPort()
with TestDriver() as t:
......@@ -60,8 +60,12 @@ class ProxyConnection(IntegrationTest):
self.assertEqual(2, len(responses))
for response in responses:
self.assertNotHasChromeProxyViaHeader(response)
self.assertTrue(t.SleepUntilHistogramHasEntry('DataReductionProxy.'
'InvalidResponseHeadersReceived.NetError'))
self.assertTrue(
t.SleepUntilHistogramHasEntry('DataReductionProxy.WarmupURL.NetError',
sleep_intervals=10))
histogram = t.GetBrowserHistogram('DataReductionProxy.'
'WarmupURLFetcherCallback.SuccessfulFetch.InsecureProxy.Core')
self.assertEqual(1, histogram['count'])
@ChromeVersionEqualOrAfterM(63)
def testTLSReset(self):
......@@ -86,6 +90,7 @@ class ProxyConnection(IntegrationTest):
for response in responses:
self.assertNotHasChromeProxyViaHeader(response)
@ChromeVersionEqualOrAfterM(75)
def testTCPBlackhole(self):
port = common.GetOpenPort()
with TestDriver() as t:
......@@ -106,16 +111,15 @@ class ProxyConnection(IntegrationTest):
'--data-reduction-proxy-http-proxies=http://127.0.0.1:%d' % port)
t.UseEmulationServer(BlackHoleHandler, port=port)
# Start Chrome and wait for the proxy timeout to fail. At ECT=4G, this
# will take about 8 seconds.
# Start Chrome and wait for the warmup fetcher timeout (30 seconds).
t.LoadURL('data:,')
self.assertTrue(
t.SleepUntilHistogramHasEntry('DataReductionProxy.WarmupURL.NetError',
sleep_intervals=10))
sleep_intervals=40))
# Check the WarmupURL Callback was called.
histogram = t.GetHistogram('DataReductionProxy.WarmupURLFetcherCallback.'
'SuccessfulFetch.InsecureProxy.NonCore')
histogram = t.GetBrowserHistogram('DataReductionProxy.'
'WarmupURLFetcherCallback.SuccessfulFetch.InsecureProxy.Core')
self.assertEqual(1, histogram['count'])
# Verify DRP was not used.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment