Bug 215692 - http/tests/websocket/tests/hybi/close-on-* tests are not interoperable
Summary: http/tests/websocket/tests/hybi/close-on-* tests are not interoperable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-20 02:20 PDT by youenn fablet
Modified: 2020-08-24 08:04 PDT (History)
5 users (show)

See Also:


Attachments
Patch (10.54 KB, patch)
2020-08-20 02:29 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (10.55 KB, patch)
2020-08-24 06:54 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-08-20 02:20:49 PDT
http/tests/websocket/tests/hybi/close-on-* tests are not interoperable
Comment 1 youenn fablet 2020-08-20 02:29:46 PDT
Created attachment 406921 [details]
Patch
Comment 2 Darin Adler 2020-08-20 16:18:36 PDT
Comment on attachment 406921 [details]
Patch

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

Seems OK but I have a big question.

> LayoutTests/ChangeLog:10
> +        Before the patch, tests were not passing in Chrome, Firefox and NSURLSession WebSocket code path.
> +        This was due to the fact the web socket script is using try/finally and the closure of the connection is not raising an exception
> +        while it is for Chrome, Firefox and NSURLSession WebSocket code path.

Why should we change our test to smooth over differences between WebSocket implementations? Don’t we want to uncover such interoperability problems and highlight them?

> LayoutTests/ChangeLog:11
> +        Change the WebSocket server script to more reliablly send the socket message at closing time of the connection.

typo: reliably
Comment 3 youenn fablet 2020-08-24 06:52:51 PDT
> Why should we change our test to smooth over differences between WebSocket
> implementations? Don’t we want to uncover such interoperability problems and
> highlight them?

Tests were written to check various things, for instance that navigating is closing the connection. Smoothing the differences keep the initial goal of the tests intact.
I'll add a specific test dedicated to track the difference between legacy WebSocket code path and the other implementations when closing.
Comment 4 youenn fablet 2020-08-24 06:54:08 PDT
Created attachment 407099 [details]
Patch for landing
Comment 5 youenn fablet 2020-08-24 07:19:10 PDT
Uploaded corresponding test in https://bugs.webkit.org/show_bug.cgi?id=215766.
Comment 6 EWS 2020-08-24 08:03:03 PDT
Committed r266059: <https://trac.webkit.org/changeset/266059>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407099 [details].
Comment 7 Radar WebKit Bug Importer 2020-08-24 08:04:17 PDT
<rdar://problem/67680019>