Skip to content
Permalink
Browse files
[ iOS15 Release ] TestWebKitAPI.WebSocket.CloseCode
https://bugs.webkit.org/show_bug.cgi?id=231306

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-06
Reviewed by Chris Dumez.

This test starts by navigating, opening a websocket connection, then navigating away.
Sometimes in release builds we only get one didFinishNavigation callback.
The important thing about this test is that the server receives the expected close code
whenever the page is navigated away from, so drop the two didFinishNavigation checks.

I manually verified that on iOS15 simulator release builds the test would time out here,
and that it doesn't any more.

* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/242597@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Alex Christensen authored and webkit-commit-queue committed Oct 6, 2021
1 parent a22fe73 commit 117887296695c24540479646517fd07e0bcd9318
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
@@ -1,3 +1,21 @@
2021-10-06 Alex Christensen <achristensen@webkit.org>

[ iOS15 Release ] TestWebKitAPI.WebSocket.CloseCode
https://bugs.webkit.org/show_bug.cgi?id=231306

Reviewed by Chris Dumez.

This test starts by navigating, opening a websocket connection, then navigating away.
Sometimes in release builds we only get one didFinishNavigation callback.
The important thing about this test is that the server receives the expected close code
whenever the page is navigated away from, so drop the two didFinishNavigation checks.

I manually verified that on iOS15 simulator release builds the test would time out here,
and that it doesn't any more.

* TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:
(TestWebKitAPI::TEST):

2021-10-06 Philip Chimento <pchimento@igalia.com>

Style checker should check spacing inside braces with elements in them
@@ -181,8 +181,6 @@ HTTPServer httpServer({

auto webView = adoptNS([WKWebView new]);
[webView loadRequest:httpServer.request("/navigateAway")];
[webView _test_waitForDidFinishNavigation];
[webView _test_waitForDidFinishNavigation];
Util::run(&receivedWebSocketClose);
Vector<uint8_t> expected { 0x3, 0xe9 }; // NSURLSessionWebSocketCloseCodeGoingAway
appendString(expected, "WebSocket is closed due to suspension.");

0 comments on commit 1178872

Please sign in to comment.