Bug 184494 - Make WebDriverW3CWebServer inherit from WebPlatformTestServer
Summary: Make WebDriverW3CWebServer inherit from WebPlatformTestServer
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-11 06:19 PDT by Carlos Garcia Campos
Modified: 2021-11-01 12:03 PDT (History)
9 users (show)

See Also:


Attachments
Patch (12.67 KB, patch)
2018-04-11 06:25 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2018-04-11 06:19:06 PDT
To share the common code instead of duplicating it and avoid future problems when updating WPT layout tests.
Comment 1 Carlos Garcia Campos 2018-04-11 06:25:50 PDT
Created attachment 337695 [details]
Patch
Comment 2 Carlos Garcia Campos 2018-04-17 02:12:04 PDT
Ping youenn.
Comment 3 youenn fablet 2018-04-17 07:14:22 PDT
Will have a look today
Comment 4 youenn fablet 2018-04-17 15:29:11 PDT
Comment on attachment 337695 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=337695&action=review

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:42
> +        self._mappings = []

I wonder whether we could not unify a bit more W3C and WPT config.json files.
The first has an ssl config that might be needed to WebDriver at some point.
The other has doc_root but maybe it no longer needs it?

I guess the only difference that might need to remain would be ports if we wanted to have both W3C and WebDriver in parallel.
Maybe we do not even need different port values?

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:45
> +        doc_root = os.path.join(WebKitFinder(self._port_obj.host.filesystem).path_from_webkit_base('WebDriverTests'), 'imported', 'w3c')

We usually use self._port_obj.host.filesystem.join.

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:54
> +            self._port_obj.host.filesystem.remove(temporary_config_file)

Would it be possible to not override the base method here?
Maybe by updating a bit the base method?

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:73
>              time.sleep(sleep_secs)

Maybe this could be the default implementation of __wait_for_server?
Comment 5 Michael Catanzaro 2019-04-03 08:12:06 PDT
Forgot about this?
Comment 6 Alex Christensen 2021-11-01 12:03:54 PDT
Comment on attachment 337695 [details]
Patch

This has been requesting review for more than one year.  If this is still needed, please rebase and re-request review.