| OLD | NEW |
| (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 from common import AndroidOnly |
| 9 from common import NotAndroid |
| 10 |
| 11 |
| 12 class SafeBrowsing(IntegrationTest): |
| 13 |
| 14 @AndroidOnly |
| 15 def testSafeBrowsingOn(self): |
| 16 with TestDriver() as t: |
| 17 t.AddChromeArg('--enable-spdy-proxy-auth') |
| 18 t.LoadURL('http://testsafebrowsing.appspot.com/s/malware.html') |
| 19 responses = t.GetHTTPResponses() |
| 20 self.assertEqual(0, len(responses)) |
| 21 |
| 22 @NotAndroid |
| 23 def testSafeBrowsingOff(self): |
| 24 with TestDriver() as t: |
| 25 t.AddChromeArg('--enable-spdy-proxy-auth') |
| 26 t.LoadURL('http://testsafebrowsing.appspot.com/s/malware.html') |
| 27 responses = t.GetHTTPResponses() |
| 28 self.assertEqual(1, len(responses)) |
| 29 for response in responses: |
| 30 self.assertHasChromeProxyViaHeader(response) |
| 31 |
| 32 if __name__ == '__main__': |
| 33 IntegrationTest.RunAllTests() |
| OLD | NEW |