Bug 253043 - HTTP/2 WPT layout tests actually run over HTTP/1.1
Summary: HTTP/2 WPT layout tests actually run over HTTP/1.1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ben Nham
URL:
Keywords: InRadar
Depends on:
Blocks: 253533
  Show dependency treegraph
 
Reported: 2023-02-27 16:53 PST by Ben Nham
Modified: 2023-03-09 22:13 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Nham 2023-02-27 16:53:12 PST
There are a number of WPT tests that use "h2" in the filename to designate that they should be run over HTTP/2: https://web-platform-tests.org/writing-tests/server-features.html#tests-requiring-http-2-0

However, when I add logging to various h2 layout tests, I see that they're actually directed towards the plain-text HTTP/1.1 WPT server. For instance, `console.log(window.location)` in `imported/w3c/web-platform-tests/xhr/status.h2.window.html` produces this URL:

  http://localhost:8800/xhr/status.h2.window.html

It should actually produce this URL, since the h2 server runs on port 9000 by default:

  https://localhost:9000/xhr/status.h2.window.html

It looks like the issue might be that the `wpt_test_path_to_uri` method has to be updated to parse `h2` out of the test filename and direct the request to the HTTP/2 as necessary.
Comment 1 Radar WebKit Bug Importer 2023-02-27 16:55:09 PST
<rdar://problem/106003603>
Comment 2 Ben Nham 2023-02-28 09:30:54 PST
I was able to get the particular h2-only test I cared about to run over h2 by editing `wpt_test_path_to_uri` to run h2 tests on port 9000.
Comment 3 Sam Sneddon [:gsnedders] 2023-03-01 00:15:02 PST
(In reply to Ben Nham from comment #2)
> I was able to get the particular h2-only test I cared about to run over h2
> by editing `wpt_test_path_to_uri` to run h2 tests on port 9000.

This is probably a reasonable fix for now, if you want to submit a PR for it?
Comment 4 Ben Nham 2023-03-02 16:10:29 PST
Pull request: https://github.com/WebKit/WebKit/pull/10974
Comment 5 EWS 2023-03-09 22:13:07 PST
Committed 261489@main (7fb8f6320080): <https://commits.webkit.org/261489@main>

Reviewed commits have been landed. Closing PR #10974 and removing active labels.