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

Side by Side Diff: net/socket/tcp_listen_socket_unittest.cc

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/dns/address_sorter_posix.cc ('k') | net/socket/tcp_socket_libevent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/tcp_listen_socket_unittest.h" 5 #include "net/socket/tcp_listen_socket_unittest.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #endif 66 #endif
67 67
68 NextAction(); 68 NextAction();
69 ASSERT_EQ(ACTION_ACCEPT, last_action_.type()); 69 ASSERT_EQ(ACTION_ACCEPT, last_action_.type());
70 } 70 }
71 71
72 void TCPListenSocketTester::TearDown() { 72 void TCPListenSocketTester::TearDown() {
73 #if defined(OS_WIN) 73 #if defined(OS_WIN)
74 ASSERT_EQ(0, closesocket(test_socket_)); 74 ASSERT_EQ(0, closesocket(test_socket_));
75 #elif defined(OS_POSIX) 75 #elif defined(OS_POSIX)
76 ASSERT_EQ(0, HANDLE_EINTR(close(test_socket_))); 76 ASSERT_EQ(0, IGNORE_EINTR(close(test_socket_)));
77 #endif 77 #endif
78 NextAction(); 78 NextAction();
79 ASSERT_EQ(ACTION_CLOSE, last_action_.type()); 79 ASSERT_EQ(ACTION_CLOSE, last_action_.type());
80 80
81 loop_->PostTask(FROM_HERE, base::Bind( 81 loop_->PostTask(FROM_HERE, base::Bind(
82 &TCPListenSocketTester::Shutdown, this)); 82 &TCPListenSocketTester::Shutdown, this));
83 NextAction(); 83 NextAction();
84 ASSERT_EQ(ACTION_SHUTDOWN, last_action_.type()); 84 ASSERT_EQ(ACTION_SHUTDOWN, last_action_.type());
85 85
86 thread_.reset(); 86 thread_.reset();
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 TEST_F(TCPListenSocketTest, ServerSend) { 301 TEST_F(TCPListenSocketTest, ServerSend) {
302 tester_->TestServerSend(); 302 tester_->TestServerSend();
303 } 303 }
304 304
305 TEST_F(TCPListenSocketTest, ServerSendMultiple) { 305 TEST_F(TCPListenSocketTest, ServerSendMultiple) {
306 tester_->TestServerSendMultiple(); 306 tester_->TestServerSendMultiple();
307 } 307 }
308 308
309 } // namespace net 309 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/address_sorter_posix.cc ('k') | net/socket/tcp_socket_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698