Bug 187288 - [GTK][WPE] Add --host option to WebDriver process
Summary: [GTK][WPE] Add --host option to WebDriver process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, InRadar, Soup
Depends on:
Blocks:
 
Reported: 2018-07-03 02:59 PDT by Carlos Garcia Campos
Modified: 2018-07-05 05:43 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.83 KB, patch)
2018-07-03 03:03 PDT, Carlos Garcia Campos
zan: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews205 for win-future (12.78 MB, application/zip)
2018-07-03 04:59 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2018-07-03 02:59:51 PDT
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.
Comment 1 Carlos Garcia Campos 2018-07-03 03:03:36 PDT
Created attachment 344173 [details]
Patch
Comment 2 EWS Watchlist 2018-07-03 04:59:42 PDT
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
Comment 3 EWS Watchlist 2018-07-03 04:59:54 PDT
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 4 Zan Dobersek 2018-07-05 00:58:48 PDT
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 5 Carlos Garcia Campos 2018-07-05 01:10:19 PDT
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.
Comment 6 Carlos Garcia Campos 2018-07-05 05:41:19 PDT
Committed r233516: <https://trac.webkit.org/changeset/233516>
Comment 7 Radar WebKit Bug Importer 2018-07-05 05:43:12 PDT
<rdar://problem/41845014>