| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 @staticmethod | 54 @staticmethod |
| 55 def DefaultExeLocations(): | 55 def DefaultExeLocations(): |
| 56 """Returns the paths that are used to find the ChromeDriver executable. | 56 """Returns the paths that are used to find the ChromeDriver executable. |
| 57 | 57 |
| 58 Returns: | 58 Returns: |
| 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, 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'), | 69 'linux3': [ os.path.join(chrome_src, 'out', 'Debug'), |
| 70 os.path.join(chrome_src, 'sconsbuild', 'Debug'), | 70 os.path.join(chrome_src, 'sconsbuild', 'Debug'), |
| 71 os.path.join(chrome_src, 'out', 'Release'), | 71 os.path.join(chrome_src, 'out', 'Release'), |
| 72 os.path.join(chrome_src, 'sconsbuild', 'Release')], | 72 os.path.join(chrome_src, 'sconsbuild', 'Release')], |
| 73 'darwin': [ os.path.join(chrome_src, 'xcodebuild', 'Debug'), | 73 'darwin': [ os.path.join(chrome_src, 'xcodebuild', 'Debug'), |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 self._process = None | 198 self._process = None |
| 199 | 199 |
| 200 def GetURL(self): | 200 def GetURL(self): |
| 201 url = 'http://localhost:' + str(self._port) | 201 url = 'http://localhost:' + str(self._port) |
| 202 if self._url_base: | 202 if self._url_base: |
| 203 url += self._url_base | 203 url += self._url_base |
| 204 return url | 204 return url |
| 205 | 205 |
| 206 def GetPort(self): | 206 def GetPort(self): |
| 207 return self._port | 207 return self._port |
| OLD | NEW |