Unreviewed changes
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: remoting/protocol/stream_packet_socket_unittest.cc
Insertions: 3, Deletions: 3.
@@ -188,9 +188,9 @@
// We expect Write to be called once.
EXPECT_CALL(*mock_stream_socket_, Write(_, _, _, _))
- .WillOnce([&](net::IOBuffer* buf, int buf_len,
- net::CompletionOnceCallback callback,
- const net::NetworkTrafficAnnotationTag&) {
+ .WillOnce([](net::IOBuffer* buf, int buf_len,
+ net::CompletionOnceCallback callback,
+ const net::NetworkTrafficAnnotationTag&) {
return buf_len; // Return number of bytes written
});
```
Change information
Commit message:
Expand test coverage for StreamPacketSocket
This CL expands the StreamPacketSocketTest suite to provide comprehensive
coverage for the StreamPacketSocket class. The new tests verify:
- Connection state checking (SendFailsWhenNotConnected).
- Sending failures (SendToFailsWithAddressMismatch, SendLargePacketFails).
- Sending successes via Write on the underlying socket (SendSuccess).
- Proper closure behavior and cleanup (Close).
- Setting socket options on both connected and unconnected sockets
(SetOptionInitialized, SetOptionUninitialized).
To facilitate testing without the network stack, this CL also introduces
FakeStreamPacketProcessor and MockStreamSocket.
Bug: None
Change-Id: Id9f796a7d6b9ebeac6e72a8dc41aec4e59a11e52
Cr-Commit-Position: refs/heads/main@{#1618559}
Files:
- M remoting/protocol/stream_packet_socket_unittest.cc
Change size: M
Delta: 1 file changed, 188 insertions(+), 3 deletions(-)
Branch: refs/heads/main
Submit Requirements:
Code-Review: +1 by Yuwei Huang