[GTK] WebDriver: implement AutomationSessionClient::didDisconnectFromRemote
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2018 15:24:58 +0000 (15:24 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2018 15:24:58 +0000 (15:24 +0000)
commita151dfed575a6089f57594883261b0d7fcf17606
treed640f13b71a082049adfa1e8de6e1e9b1faed745
parentf3568fe2cc823ceaf7721c6b483866e4cdeef46e
[GTK] WebDriver: implement AutomationSessionClient::didDisconnectFromRemote
https://bugs.webkit.org/show_bug.cgi?id=185866

Reviewed by Brian Burg.

Source/WebDriver:

Close the dbus connection when receiving an empty target list.

* glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::setTargetList):

Source/WebKit:

To handle the case of the session being closed by the browser, for example in case of a network process
crash. This is currently causing WebDriver tests to timeout in the bot.

* UIProcess/API/glib/WebKitAutomationSession.cpp: Add an implementation of didDisconnectFromRemote() to notify
the WebContext that the session will be closed.
* UIProcess/API/glib/WebKitWebContext.cpp: Remove the automation session when closed.
* UIProcess/API/glib/WebKitWebContextPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebDriver/ChangeLog
Source/WebDriver/glib/SessionHostGlib.cpp
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp
Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h