[GTK] WebDriver: test imported/w3c/webdriver/tests/sessions/new_session/response...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jan 2018 14:04:47 +0000 (14:04 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jan 2018 14:04:47 +0000 (14:04 +0000)
commit15082012cd34dcdfe22e8d7891651335517cf0dd
tree687fee124df7af71ebdc770b67a8bc3a8d15ec13
parent4583e3370f10e46b8d915275152b2ca01d3ad49c
[GTK] WebDriver: test imported/w3c/webdriver/tests/sessions/new_session/response.py is crashing in the bots
https://bugs.webkit.org/show_bug.cgi?id=181904

Reviewed by Carlos Alberto Lopez Perez.

Source/WebDriver:

Handle the case of failing to launch the browser. The test is actually failing because it's sending wrong
capabilities, the driver tries to fall back to the default driver, but since WebKit is not installed in the
bots, it fails to find the MiniBrowser. The test needs to be fixed, but we shouldn't crash when the browser
can't be spawned for whatever reason in any case. This patch handles that case and changes the boolean result of
connectToBrowser to be an optional error string instead. This way we can provide more detailed error message
when we reject the session creation because the browser failed to start.

* SessionHost.h:
* WebDriverService.cpp:
(WebDriver::WebDriverService::newSession):
* glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::connectToBrowser):
(WebDriver::ConnectToBrowserAsyncData::ConnectToBrowserAsyncData):
(WebDriver::SessionHost::launchBrowser):
(WebDriver::SessionHost::setupConnection):

WebDriverTests:

Unskip imported/w3c/webdriver/tests/sessions/new_session/response.py.

* TestExpectations.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebDriver/ChangeLog
Source/WebDriver/SessionHost.h
Source/WebDriver/WebDriverService.cpp
Source/WebDriver/glib/SessionHostGlib.cpp
WebDriverTests/ChangeLog
WebDriverTests/TestExpectations.json