We currently allow to pass a port number and the server always listens for connections on localhost. We should allow to optionally pass a host IP address to be able to use WebDriver remotely.
Created attachment 344173 [details] Patch
Comment on attachment 344173 [details] Patch Attachment 344173 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8422889 New failing tests: http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
Created attachment 344177 [details] Archive of layout-test-results from ews205 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews205 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment on attachment 344173 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344173&action=review > Source/WebDriver/HTTPServer.h:60 > + bool listen(std::optional<String> host, unsigned port); Nit: it's not that crucial here, but const reference to the std::optional object could be used to avoid copying the object on each call to listen() as well as the soupServerListen() helper. > Source/WebDriver/soup/HTTPServerSoup.cpp:46 > + g_set_error(error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, "Invalid host IP address '%s'", host.value().utf8().data()); Nit: not necessarily an IP address.
Comment on attachment 344173 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344173&action=review Thanks! >> Source/WebDriver/HTTPServer.h:60 >> + bool listen(std::optional<String> host, unsigned port); > > Nit: it's not that crucial here, but const reference to the std::optional object could be used to avoid copying the object on each call to listen() as well as the soupServerListen() helper. Ok. >> Source/WebDriver/soup/HTTPServerSoup.cpp:46 >> + g_set_error(error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, "Invalid host IP address '%s'", host.value().utf8().data()); > > Nit: not necessarily an IP address. It only works with IP addresses, you can't use a domain name.
Committed r233516: <https://trac.webkit.org/changeset/233516>
<rdar://problem/41845014>