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

Side by Side Diff: ipc/ipc_channel_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 | « ipc/ipc_channel_posix_unittest.cc ('k') | ipc/ipc_fuzzing_tests.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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 16 matching lines...) Expand all
27 #include "ipc/ipc_descriptors.h" 27 #include "ipc/ipc_descriptors.h"
28 #include "ipc/ipc_channel.h" 28 #include "ipc/ipc_channel.h"
29 #include "ipc/ipc_channel_proxy.h" 29 #include "ipc/ipc_channel_proxy.h"
30 #include "ipc/ipc_message_utils.h" 30 #include "ipc/ipc_message_utils.h"
31 #include "ipc/ipc_multiprocess_test.h" 31 #include "ipc/ipc_multiprocess_test.h"
32 #include "ipc/ipc_sender.h" 32 #include "ipc/ipc_sender.h"
33 #include "ipc/ipc_switches.h" 33 #include "ipc/ipc_switches.h"
34 #include "ipc/ipc_test_base.h" 34 #include "ipc/ipc_test_base.h"
35 #include "testing/multiprocess_func_list.h" 35 #include "testing/multiprocess_func_list.h"
36 36
37 namespace {
38
37 const size_t kLongMessageStringNumBytes = 50000; 39 const size_t kLongMessageStringNumBytes = 50000;
38 40
39 class IPCChannelTest : public IPCTestBase { 41 class IPCChannelTest : public IPCTestBase {
40 }; 42 };
41 43
42 TEST_F(IPCChannelTest, BasicMessageTest) { 44 TEST_F(IPCChannelTest, BasicMessageTest) {
43 int v1 = 10; 45 int v1 = 10;
44 std::string v2("foobar"); 46 std::string v2("foobar");
45 std::wstring v3(L"hello world"); 47 std::wstring v3(L"hello world");
46 48
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // setup IPC channel 329 // setup IPC channel
328 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_CLIENT, 330 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_CLIENT,
329 &channel_listener); 331 &channel_listener);
330 CHECK(chan.Connect()); 332 CHECK(chan.Connect());
331 channel_listener.Init(&chan); 333 channel_listener.Init(&chan);
332 Send(&chan, "hello from child"); 334 Send(&chan, "hello from child");
333 // run message loop 335 // run message loop
334 MessageLoop::current()->Run(); 336 MessageLoop::current()->Run();
335 return 0; 337 return 0;
336 } 338 }
339
340 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix_unittest.cc ('k') | ipc/ipc_fuzzing_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698