Chromium Code Reviews| Index: tools/chrome_proxy/webdriver/simple_smoke.py |
| diff --git a/tools/chrome_proxy/webdriver/simple_smoke.py b/tools/chrome_proxy/webdriver/simple_smoke.py |
| index 5513be9e05d6f55349456611b55fe1b8e64f3069..643497b0fb18bb1a71d6640f7d827e29d8df9690 100644 |
| --- a/tools/chrome_proxy/webdriver/simple_smoke.py |
| +++ b/tools/chrome_proxy/webdriver/simple_smoke.py |
| @@ -2,16 +2,18 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import sys |
| import time |
| +import unittest |
| -from common import IntegrationTest |
| +import common |
| from common import TestDriver |
| -class SimpleSmoke(IntegrationTest): |
| +class SimpleSmoke(unittest.TestCase): |
| # Simple example integration test. |
| - def TestCheckPageWithProxy(self): |
| + def testCheckPageWithProxy(self): |
| with TestDriver() as t: |
| t.AddChromeArg('--enable-spdy-proxy-auth') |
| t.SetURL('http://check.googlezip.net/test.html') |
| @@ -25,7 +27,7 @@ class SimpleSmoke(IntegrationTest): |
| response.ResponseHasViaHeader(), response.WasXHR()) |
| # Show how to get a histogram. |
| - def TestPingbackHistogram(self): |
| + def testPingbackHistogram(self): |
| with TestDriver() as t: |
| t.AddChromeArg('--enable-spdy-proxy-auth') |
| t.SetURL('http://check.googlezip.net/test.html') |
| @@ -34,5 +36,5 @@ class SimpleSmoke(IntegrationTest): |
| print t.GetHistogram('DataReductionProxy.Pingback.Attempted') |
| if __name__ == '__main__': |
| - test = SimpleSmoke() |
| - test.RunAllTests() |
| + # Give a different argv so that unittest won't get in the way of our argparse. |
|
sclittle
2016/12/08 23:14:00
nit: pardon my ignorance, but I don't know what th
robertogden
2016/12/08 23:19:30
How's that?
|
| + unittest.main(argv=[sys.argv[0]], verbosity=2) |