Chromium Code Reviews| Index: tools/testing/run_selenium.py |
| =================================================================== |
| --- tools/testing/run_selenium.py (revision 17752) |
| +++ tools/testing/run_selenium.py (working copy) |
| @@ -86,7 +86,15 @@ |
| browser.refresh() |
| try: |
| def pythonTimeout(): |
| - close_browser(browser) |
| + # The builtin quit call for chrome will call close on the RemoteDriver |
| + # which may hang. Explicitly call browser.service.stop() |
| + if (type(browser) is selenium.webdriver.chrome.webdriver.WebDriver): |
| + # Browser may be dead |
| + try: |
| + browser.service.stop() |
| + except: |
| + print("Trying to close browser that has already been closed") |
| + pass |
|
kustermann
2013/01/30 09:52:02
The "pass" should not be necessary here.
ricow1
2013/01/30 09:54:45
removed
|
| # If the browser is crashing selenium may not time out. |
| # Explicitly catch this case with a python timer. |
| t = threading.Timer(timeout, pythonTimeout) |
| @@ -237,16 +245,6 @@ |
| type(browser) is not selenium.webdriver.ie.webdriver.WebDriver): |
| browser.close() |
| - # The builtin quit call will call close on the RemoteDriver which |
| - # may hang. Explicitly call browser.service.stop() |
| - if (type(browser) is selenium.webdriver.chrome.webdriver.WebDriver): |
| - # We may have called stop before if chrome was hanging. |
| - try: |
| - browser.service.stop() |
| - except: |
| - print("Trying to close browser that has already been closed") |
| - pass |
| - else: |
| browser.quit() |
|
kustermann
2013/01/30 09:52:02
I think this should be indented one level to the l
ricow1
2013/01/30 09:54:45
good catch
|
| def report_results(mode, source, browser): |