Chromium Code Reviews| 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://www.ianfette.org/') | |
|
Robert Ogden
2017/03/01 16:57:07
Go ahead and use http://testsafebrowsing.appspot.c
dougarnett
2017/03/01 21:56:47
Done.
| |
| 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://www.ianfette.org/') | |
|
Robert Ogden
2017/03/01 16:57:07
Go ahead and use http://testsafebrowsing.appspot.c
dougarnett
2017/03/01 21:56:47
Done.
| |
| 27 responses = t.GetHTTPResponses() | |
| 28 self.assertEqual(1, len(responses)) | |
| 29 for response in responses: | |
| 30 self.assertEqual('http://www.ianfette.org/', response.url) | |
|
Robert Ogden
2017/03/01 16:57:07
Instead of checking the URL, check that is used th
dougarnett
2017/03/01 21:56:47
Done.
| |
| 31 | |
| 32 if __name__ == '__main__': | |
| 33 IntegrationTest.RunAllTests() | |
| OLD | NEW |