| Index: tools/chrome_proxy/webdriver/smoke.py
|
| diff --git a/tools/chrome_proxy/webdriver/smoke.py b/tools/chrome_proxy/webdriver/smoke.py
|
| index ff99fdf21d8af5246cb94ce336be023f259fb6e2..fab1e40408209d36860ea1c577495ebcc10be1d9 100644
|
| --- a/tools/chrome_proxy/webdriver/smoke.py
|
| +++ b/tools/chrome_proxy/webdriver/smoke.py
|
| @@ -11,6 +11,29 @@ from decorators import NotAndroid
|
|
|
| class Smoke(IntegrationTest):
|
|
|
| + # Checks that the "alternative" value is sent in the "exp" directive.
|
| + def testAlternative(self):
|
| + # If it was attempted to run with another experiment, skip this test.
|
| + with TestDriver() as test_driver:
|
| + test_driver.AddChromeArg('--enable-spdy-proxy-auth')
|
| + test_driver.AddChromeArg('--data-reduction-proxy-lo-fi=always-on')
|
| + test_driver.AddChromeArg('--enable-data-reduction-proxy-lite-page')
|
| + test_driver.AddChromeArg(
|
| + '--enable-features=DataReductionProxyAlternativeBackEnd')
|
| +
|
| + test_driver.LoadURL('http://check.googlezip.net/test.html')
|
| +
|
| + # Alternative does not represent a strict implementation, but must have
|
| + # "exp=alternative".
|
| + for response in test_driver.GetHTTPResponses():
|
| + self.assertHasChromeProxyViaHeader(response)
|
| + self.assertEqual(200, response.status)
|
| + if not common.ParseFlags().browser_args or (
|
| + '--data-reduction-proxy-experiment' not in
|
| + common.ParseFlags().browser_args):
|
| + self.assertIn('exp=alternative',
|
| + response.request_headers['chrome-proxy'])
|
| +
|
| # Ensure Chrome does not use DataSaver in Incognito mode.
|
| # Clank does not honor the --incognito flag.
|
| @NotAndroid
|
|
|