Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import common | 5 import common |
| 6 from common import TestDriver | 6 from common import TestDriver |
| 7 from common import IntegrationTest | 7 from common import IntegrationTest |
| 8 | 8 |
| 9 | 9 |
| 10 class Incognito(IntegrationTest): | 10 class Incognito(IntegrationTest): |
| 11 | 11 |
| 12 # Ensure Chrome does not use DataSaver in Incognito mode. | 12 # Ensure Chrome does not use DataSaver in Incognito mode. |
| 13 def testCheckPageWithIncognito(self): | 13 def testCheckPageWithIncognito(self): |
| 14 with TestDriver() as t: | 14 with TestDriver() as t: |
| 15 t.AddChromeArg('--enable-spdy-proxy-auth') | 15 t.AddChromeArg('--enable-spdy-proxy-auth') |
| 16 t.AddChromeArg('--incognito') | 16 t.AddChromeArg('--incognito') |
| 17 t.LoadURL('http://check.googlezip.net/test.html') | 17 t.LoadURL('http://check.googlezip.net/test.html') |
| 18 for response in t.GetHTTPResponses(): | 18 for response in t.GetHTTPResponses(): |
| 19 self.assertNotHasChromeProxyViaHeader(response) | 19 self.assertNotHasChromeProxyViaHeader(response) |
| 20 | 20 |
| 21 # Ensure Chrome uses DataSaver with QUIC enabled. | |
|
Robert Ogden
2017/02/14 19:54:32
Please stick this method in another class or renam
tbansal1
2017/02/14 20:33:21
Done.
| |
| 22 def testCheckPageWithQuicProxy(self): | |
| 23 with TestDriver() as t: | |
| 24 t.AddChromeArg('--enable-spdy-proxy-auth') | |
| 25 t.AddChromeArg('--enable-quic') | |
| 26 t.AddChromeArg('--data-reduction-proxy-http-proxies=https://proxy.googlezi p.net:443') | |
| 27 t.AddChromeArg('--force-fieldtrials=DataReductionProxyUseQuic/Enabled') | |
| 28 t.LoadURL('http://check.googlezip.net/test.html') | |
| 29 responses = t.GetHTTPResponses() | |
| 30 self.assertEqual(2, len(responses)) | |
| 31 for response in responses: | |
| 32 self.assertHasChromeProxyViaHeader(response) | |
| 33 | |
| 21 if __name__ == '__main__': | 34 if __name__ == '__main__': |
| 22 IntegrationTest.RunAllTests() | 35 IntegrationTest.RunAllTests() |
| OLD | NEW |