| OLD | NEW | 
|---|
| 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 "base/sync_socket.h" | 5 #include "base/sync_socket.h" | 
| 6 | 6 | 
| 7 #include <stdio.h> | 7 #include <stdio.h> | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <sstream> | 9 #include <sstream> | 
| 10 | 10 | 
| 11 #include "base/bind.h" | 11 #include "base/bind.h" | 
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop/message_loop.h" | 
| 13 #include "base/process_util.h" | 13 #include "base/process_util.h" | 
| 14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" | 
| 15 #include "ipc/ipc_test_base.h" | 15 #include "ipc/ipc_test_base.h" | 
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" | 
| 17 | 17 | 
| 18 #if defined(OS_POSIX) | 18 #if defined(OS_POSIX) | 
| 19 #include "base/file_descriptor_posix.h" | 19 #include "base/file_descriptor_posix.h" | 
| 20 #endif | 20 #endif | 
| 21 | 21 | 
| 22 // IPC messages for testing ---------------------------------------------------- | 22 // IPC messages for testing ---------------------------------------------------- | 
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 300 | 300 | 
| 301   // Read from another socket to free some space for a new write. | 301   // Read from another socket to free some space for a new write. | 
| 302   char hello[kHelloStringLength] = {0}; | 302   char hello[kHelloStringLength] = {0}; | 
| 303   pair[1].Receive(&hello[0], sizeof(hello)); | 303   pair[1].Receive(&hello[0], sizeof(hello)); | 
| 304 | 304 | 
| 305   // Should be able to write more data to the buffer now. | 305   // Should be able to write more data to the buffer now. | 
| 306   EXPECT_EQ(kHelloStringLength, pair[0].Send(kHelloString, kHelloStringLength)); | 306   EXPECT_EQ(kHelloStringLength, pair[0].Send(kHelloString, kHelloStringLength)); | 
| 307 } | 307 } | 
| 308 | 308 | 
| 309 }  // namespace | 309 }  // namespace | 
| OLD | NEW | 
|---|