Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: tools/chrome_proxy/webdriver/simple_smoke.py

Issue 2570433008: Bake in Python's unittest command line args. (Closed)
Patch Set: Fix git issues Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/chrome_proxy/webdriver/common.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 sys 5 import sys
6 import time 6 import time
7 import unittest 7 import unittest
8 8
9 import common 9 import common
10 from common import TestDriver 10 from common import TestDriver
(...skipping 24 matching lines...) Expand all
35 # Show how to use WaitForJavascriptExpression 35 # Show how to use WaitForJavascriptExpression
36 def testHTML5(self): 36 def testHTML5(self):
37 with TestDriver() as t: 37 with TestDriver() as t:
38 t.AddChromeArg('--enable-spdy-proxy-auth') 38 t.AddChromeArg('--enable-spdy-proxy-auth')
39 t.LoadURL('http://html5test.com/') 39 t.LoadURL('http://html5test.com/')
40 t.WaitForJavascriptExpression( 40 t.WaitForJavascriptExpression(
41 'document.getElementsByClassName("pointsPanel")', 15) 41 'document.getElementsByClassName("pointsPanel")', 15)
42 42
43 if __name__ == '__main__': 43 if __name__ == '__main__':
44 # The unittest library uses sys.argv itself and is easily confused by our 44 # The unittest library uses sys.argv itself and is easily confused by our
45 # command line options. Pass it a simpler argv instead. 45 # command line options. Pass it a simpler argv instead, while working in the
46 unittest.main(argv=[sys.argv[0]], verbosity=2) 46 # unittest command line args functionality.
47 flags = common.ParseFlags()
48 unittest.main(argv=[sys.argv[0]], verbosity=2, failfast=flags.failfast,
49 catchbreak=flags.catch, buffer=flags.buffer)
OLDNEW
« no previous file with comments | « tools/chrome_proxy/webdriver/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698