OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Launches and kills ChromeDriver. | 6 """Launches and kills ChromeDriver. |
7 | 7 |
8 For ChromeDriver documentation, refer to: | 8 For ChromeDriver documentation, refer to: |
9 http://dev.chromium.org/developers/testing/webdriver-for-chrome | 9 http://dev.chromium.org/developers/testing/webdriver-for-chrome |
10 """ | 10 """ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 a list of directories that would be searched for the executable | 59 a list of directories that would be searched for the executable |
60 """ | 60 """ |
61 script_dir = os.path.dirname(__file__) | 61 script_dir = os.path.dirname(__file__) |
62 chrome_src = os.path.abspath(os.path.join( | 62 chrome_src = os.path.abspath(os.path.join( |
63 script_dir, os.pardir, os.pardir, os.pardir)) | 63 script_dir, os.pardir, os.pardir, os.pardir)) |
64 bin_dirs = { | 64 bin_dirs = { |
65 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), | 65 'linux2': [ os.path.join(chrome_src, 'out', 'Debug'), |
66 os.path.join(chrome_src, 'sconsbuild', 'Debug'), | 66 os.path.join(chrome_src, 'sconsbuild', 'Debug'), |
67 os.path.join(chrome_src, 'out', 'Release'), | 67 os.path.join(chrome_src, 'out', 'Release'), |
68 os.path.join(chrome_src, 'sconsbuild', 'Release')], | 68 os.path.join(chrome_src, 'sconsbuild', 'Release')], |
| 69 'linux3': [ os.path.join(chrome_src, 'out', 'Debug'), |
| 70 os.path.join(chrome_src, 'sconsbuild', 'Debug'), |
| 71 os.path.join(chrome_src, 'out', 'Release'), |
| 72 os.path.join(chrome_src, 'sconsbuild', 'Release')], |
69 'darwin': [ os.path.join(chrome_src, 'xcodebuild', 'Debug'), | 73 'darwin': [ os.path.join(chrome_src, 'xcodebuild', 'Debug'), |
70 os.path.join(chrome_src, 'xcodebuild', 'Release')], | 74 os.path.join(chrome_src, 'xcodebuild', 'Release')], |
71 'win32': [ os.path.join(chrome_src, 'chrome', 'Debug'), | 75 'win32': [ os.path.join(chrome_src, 'chrome', 'Debug'), |
72 os.path.join(chrome_src, 'build', 'Debug'), | 76 os.path.join(chrome_src, 'build', 'Debug'), |
73 os.path.join(chrome_src, 'chrome', 'Release'), | 77 os.path.join(chrome_src, 'chrome', 'Release'), |
74 os.path.join(chrome_src, 'build', 'Release')], | 78 os.path.join(chrome_src, 'build', 'Release')], |
75 } | 79 } |
76 return [os.getcwd()] + bin_dirs.get(sys.platform, []) | 80 return [os.getcwd()] + bin_dirs.get(sys.platform, []) |
77 | 81 |
78 @staticmethod | 82 @staticmethod |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 self._process = None | 198 self._process = None |
195 | 199 |
196 def GetURL(self): | 200 def GetURL(self): |
197 url = 'http://localhost:' + str(self._port) | 201 url = 'http://localhost:' + str(self._port) |
198 if self._url_base: | 202 if self._url_base: |
199 url += self._url_base | 203 url += self._url_base |
200 return url | 204 return url |
201 | 205 |
202 def GetPort(self): | 206 def GetPort(self): |
203 return self._port | 207 return self._port |
OLD | NEW |