Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: base/sync_socket_unittest.cc

Issue 1356743003: Revert of Check for CloseHandle failures even when not debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/kill_win.cc ('k') | base/sync_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sync_socket_unittest.cc
diff --git a/base/sync_socket_unittest.cc b/base/sync_socket_unittest.cc
index b3aac6b54743123098e9cd5d1f6c92b1eb19257e..ff9b8bc8c2f0c7a932d034da2080335e19a7481c 100644
--- a/base/sync_socket_unittest.cc
+++ b/base/sync_socket_unittest.cc
@@ -89,14 +89,32 @@
SendReceivePeek(&socket_a, &socket_b);
}
+template <class SocketType>
+void ClonedSendReceivePeek() {
+ SocketType socket_a, socket_b;
+ ASSERT_TRUE(SocketType::CreatePair(&socket_a, &socket_b));
+
+ // Create new SyncSockets from the paired handles.
+ SocketType socket_c(socket_a.handle()), socket_d(socket_b.handle());
+ SendReceivePeek(&socket_c, &socket_d);
+}
+
} // namespace
TEST(SyncSocket, NormalSendReceivePeek) {
NormalSendReceivePeek<base::SyncSocket>();
}
+TEST(SyncSocket, ClonedSendReceivePeek) {
+ ClonedSendReceivePeek<base::SyncSocket>();
+}
+
TEST(CancelableSyncSocket, NormalSendReceivePeek) {
NormalSendReceivePeek<base::CancelableSyncSocket>();
+}
+
+TEST(CancelableSyncSocket, ClonedSendReceivePeek) {
+ ClonedSendReceivePeek<base::CancelableSyncSocket>();
}
TEST(CancelableSyncSocket, CancelReceiveShutdown) {
« no previous file with comments | « base/process/kill_win.cc ('k') | base/sync_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698