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

Side by Side Diff: chrome/test/chromedriver/test.py

Issue 11415205: [chromedriver] Implement connecting to devtools and loading a page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """End to end tests for ChromeDriver.""" 5 """End to end tests for ChromeDriver."""
6 6
7 import ctypes 7 import ctypes
8 import os 8 import os
9 import sys 9 import sys
10 import unittest 10 import unittest
11 11
12 import chromedriver 12 import chromedriver
13 13
14 14
15 class ChromeDriverTest(unittest.TestCase): 15 class ChromeDriverTest(unittest.TestCase):
16 """End to end tests for ChromeDriver.""" 16 """End to end tests for ChromeDriver."""
17 17
18 def testStartStop(self): 18 def testStartStop(self):
19 driver = chromedriver.ChromeDriver(_CHROMEDRIVER_LIB) 19 driver = chromedriver.ChromeDriver(_CHROMEDRIVER_LIB)
20 driver.Quit() 20 driver.Quit()
21 21
22 def testLoadUrl(self):
23 driver = chromedriver.ChromeDriver(_CHROMEDRIVER_LIB)
24 driver.Load('http://www.google.com')
25 driver.Quit()
26
22 if __name__ == '__main__': 27 if __name__ == '__main__':
23 if len(sys.argv) != 2: 28 if len(sys.argv) != 2:
24 print 'Usage: %s <path_to_chromedriver_so>' % __file__ 29 print 'Usage: %s <path_to_chromedriver_so>' % __file__
25 sys.exit(1) 30 sys.exit(1)
26 global _CHROMEDRIVER_LIB 31 global _CHROMEDRIVER_LIB
27 _CHROMEDRIVER_LIB = os.path.abspath(sys.argv[1]) 32 _CHROMEDRIVER_LIB = os.path.abspath(sys.argv[1])
28 all_tests_suite = unittest.defaultTestLoader.loadTestsFromModule( 33 all_tests_suite = unittest.defaultTestLoader.loadTestsFromModule(
29 sys.modules[__name__]) 34 sys.modules[__name__])
30 result = unittest.TextTestRunner().run(all_tests_suite) 35 result = unittest.TextTestRunner().run(all_tests_suite)
31 sys.exit(len(result.failures) + len(result.errors)) 36 sys.exit(len(result.failures) + len(result.errors))
OLDNEW
« chrome/test/chromedriver/status.cc ('K') | « chrome/test/chromedriver/status_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698