[webkit-changes] [WebKit/WebKit] 72de00: Make TestWebKitAPI::WebTransportServer more robust

Alex Christensen noreply at github.com
Wed Sep 4 16:28:15 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 72de008ffc2a35922d34a064338028ea694ff7b6
      https://github.com/WebKit/WebKit/commit/72de008ffc2a35922d34a064338028ea694ff7b6
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    A Tools/TestWebKitAPI/CoroutineUtilities.h
    A Tools/TestWebKitAPI/NetworkConnection.h
    A Tools/TestWebKitAPI/NetworkConnection.mm
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm
    M Tools/TestWebKitAPI/WebTransportServer.h
    M Tools/TestWebKitAPI/WebTransportServer.mm
    M Tools/TestWebKitAPI/cocoa/HTTPServer.h
    M Tools/TestWebKitAPI/cocoa/HTTPServer.mm

  Log Message:
  -----------
  Make TestWebKitAPI::WebTransportServer more robust
https://bugs.webkit.org/show_bug.cgi?id=279107
rdar://135249015

Reviewed by Matthew Finkel.

WebTransportServer was barely enough to do one echo.
This makes it more robust.  It now receives a connection
handler in its constructor and shares the TestWebKitAPI::Connection
code with HTTPServer.  This will allow us to write more interesting
tests.

* Tools/TestWebKitAPI/CoroutineUtilities.h: Copied from Tools/TestWebKitAPI/WebTransportServer.h.
(TestWebKitAPI::CoroutineHandle::CoroutineHandle):
(TestWebKitAPI::CoroutineHandle::~CoroutineHandle):
(TestWebKitAPI::Task::promise_type::get_return_object):
(TestWebKitAPI::Task::promise_type::initial_suspend):
(TestWebKitAPI::Task::promise_type::unhandled_exception):
(TestWebKitAPI::Task::promise_type::return_void):
* Tools/TestWebKitAPI/NetworkConnection.h: Added.
(TestWebKitAPI::Connection::receiveHTTPRequest):
(TestWebKitAPI::Connection::webSocketHandshake):
(TestWebKitAPI::Connection::terminate):
(TestWebKitAPI::Connection::Connection):
(TestWebKitAPI::ReceiveHTTPRequestOperation::ReceiveHTTPRequestOperation):
(TestWebKitAPI::ReceiveHTTPRequestOperation::await_ready):
(TestWebKitAPI::ReceiveHTTPRequestOperation::await_resume):
(TestWebKitAPI::ReceiveBytesOperation::ReceiveBytesOperation):
(TestWebKitAPI::ReceiveBytesOperation::await_ready):
(TestWebKitAPI::ReceiveBytesOperation::await_resume):
(TestWebKitAPI::SendOperation::SendOperation):
(TestWebKitAPI::SendOperation::await_ready):
(TestWebKitAPI::SendOperation::await_resume):
* Tools/TestWebKitAPI/NetworkConnection.mm: Added.
(TestWebKitAPI::dataFromVector):
(TestWebKitAPI::vectorFromData):
(TestWebKitAPI::dataFromString):
(TestWebKitAPI::Connection::receiveBytes const):
(TestWebKitAPI::Connection::receiveHTTPRequest const):
(TestWebKitAPI::Connection::awaitableReceiveHTTPRequest const):
(TestWebKitAPI::ReceiveHTTPRequestOperation::await_suspend):
(TestWebKitAPI::Connection::awaitableReceiveBytes const):
(TestWebKitAPI::ReceiveBytesOperation::await_suspend):
(TestWebKitAPI::SendOperation::await_suspend):
(TestWebKitAPI::Connection::awaitableSend):
(TestWebKitAPI::Connection::send const):
(TestWebKitAPI::Connection::sendAndReportError const):
(TestWebKitAPI::Connection::webSocketHandshake):
(TestWebKitAPI::Connection::terminate):
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm:
(TestWebKitAPI::TEST(WebTransport, Basic)):
* Tools/TestWebKitAPI/WebTransportServer.h:
* Tools/TestWebKitAPI/WebTransportServer.mm:
(TestWebKitAPI::WebTransportServer::Data::create):
(TestWebKitAPI::WebTransportServer::Data::Data):
(TestWebKitAPI::WebTransportServer::WebTransportServer):
(TestWebKitAPI::WebTransportServer::port const):
* Tools/TestWebKitAPI/cocoa/HTTPServer.h:
(TestWebKitAPI::CoroutineHandle::CoroutineHandle): Deleted.
(TestWebKitAPI::CoroutineHandle::~CoroutineHandle): Deleted.
(TestWebKitAPI::Task::promise_type::get_return_object): Deleted.
(TestWebKitAPI::Task::promise_type::initial_suspend): Deleted.
(TestWebKitAPI::Task::promise_type::unhandled_exception): Deleted.
(TestWebKitAPI::Task::promise_type::return_void): Deleted.
(TestWebKitAPI::Connection::receiveHTTPRequest): Deleted.
(TestWebKitAPI::Connection::webSocketHandshake): Deleted.
(TestWebKitAPI::Connection::terminate): Deleted.
(TestWebKitAPI::Connection::Connection): Deleted.
(TestWebKitAPI::ReceiveOperation::ReceiveOperation): Deleted.
(TestWebKitAPI::ReceiveOperation::await_ready): Deleted.
(TestWebKitAPI::ReceiveOperation::await_resume): Deleted.
(TestWebKitAPI::SendOperation::SendOperation): Deleted.
(TestWebKitAPI::SendOperation::await_ready): Deleted.
(TestWebKitAPI::SendOperation::await_resume): Deleted.
* Tools/TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::dataFromString): Deleted.
(TestWebKitAPI::dataFromVector): Deleted.
(TestWebKitAPI::vectorFromData): Deleted.
(TestWebKitAPI::Connection::receiveBytes const): Deleted.
(TestWebKitAPI::Connection::receiveHTTPRequest const): Deleted.
(TestWebKitAPI::Connection::awaitableReceiveHTTPRequest const): Deleted.
(TestWebKitAPI::ReceiveOperation::await_suspend): Deleted.
(TestWebKitAPI::SendOperation::await_suspend): Deleted.
(TestWebKitAPI::Connection::awaitableSend): Deleted.
(TestWebKitAPI::Connection::send const): Deleted.
(TestWebKitAPI::Connection::sendAndReportError const): Deleted.
(TestWebKitAPI::Connection::webSocketHandshake): Deleted.
(TestWebKitAPI::Connection::terminate): Deleted.

Canonical link: https://commits.webkit.org/283177@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list