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

Side by Side Diff: ipc/ipc_channel_posix_unittest.cc

Issue 11865015: Move IPC tests into anonymous namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ipc/ipc_channel_unittest.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 // These tests are POSIX only. 5 // These tests are POSIX only.
6 6
7 #include "ipc/ipc_channel_posix.h" 7 #include "ipc/ipc_channel_posix.h"
8 8
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 private: 87 private:
88 // The current status of the listener. 88 // The current status of the listener.
89 STATUS status_; 89 STATUS status_;
90 // If |quit_only_on_message_| then the listener will only break out of 90 // If |quit_only_on_message_| then the listener will only break out of
91 // the run loop when kQuitMessage is received. 91 // the run loop when kQuitMessage is received.
92 bool quit_only_on_message_; 92 bool quit_only_on_message_;
93 }; 93 };
94 94
95 } // namespace
96
97 class IPCChannelPosixTest : public base::MultiProcessTest { 95 class IPCChannelPosixTest : public base::MultiProcessTest {
98 public: 96 public:
99 static void SetUpSocket(IPC::ChannelHandle *handle, 97 static void SetUpSocket(IPC::ChannelHandle *handle,
100 IPC::Channel::Mode mode); 98 IPC::Channel::Mode mode);
101 static void SpinRunLoop(base::TimeDelta delay); 99 static void SpinRunLoop(base::TimeDelta delay);
102 static const std::string GetConnectionSocketName(); 100 static const std::string GetConnectionSocketName();
103 static const std::string GetChannelDirName(); 101 static const std::string GetChannelDirName();
104 102
105 protected: 103 protected:
106 virtual void SetUp(); 104 virtual void SetUp();
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // it. 416 // it.
419 bool connected = channel.Connect(); 417 bool connected = channel.Connect();
420 if (connected) { 418 if (connected) {
421 IPCChannelPosixTest::SpinRunLoop(TestTimeouts::action_max_timeout()); 419 IPCChannelPosixTest::SpinRunLoop(TestTimeouts::action_max_timeout());
422 EXPECT_EQ(IPCChannelPosixTestListener::CHANNEL_ERROR, listener.status()); 420 EXPECT_EQ(IPCChannelPosixTestListener::CHANNEL_ERROR, listener.status());
423 } else { 421 } else {
424 EXPECT_EQ(IPCChannelPosixTestListener::DISCONNECTED, listener.status()); 422 EXPECT_EQ(IPCChannelPosixTestListener::DISCONNECTED, listener.status());
425 } 423 }
426 return 0; 424 return 0;
427 } 425 }
426
427 } // namespace
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698