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

Side by Side Diff: ipc/ipc_message_utils_unittest.cc

Issue 12286003: ipc: Wrap unit test into IPC namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | no next file » | 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 "ipc/ipc_message_utils.h"
6
5 #include "base/file_path.h" 7 #include "base/file_path.h"
6 #include "ipc/ipc_message.h" 8 #include "ipc/ipc_message.h"
7 #include "ipc/ipc_message_utils.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 10
10 using namespace IPC; 11 namespace IPC {
11
12 namespace { 12 namespace {
13 13
14 // Tests nesting of messages as parameters to other messages. 14 // Tests nesting of messages as parameters to other messages.
15 TEST(IPCMessageUtilsTest, NestedMessages) { 15 TEST(IPCMessageUtilsTest, NestedMessages) {
16 int32 nested_routing = 12; 16 int32 nested_routing = 12;
17 uint32 nested_type = 78; 17 uint32 nested_type = 78;
18 int nested_content = 456789; 18 int nested_content = 456789;
19 Message::PriorityValue nested_priority = Message::PRIORITY_HIGH; 19 Message::PriorityValue nested_priority = Message::PRIORITY_HIGH;
20 Message nested_msg(nested_routing, nested_type, nested_priority); 20 Message nested_msg(nested_routing, nested_type, nested_priority);
21 nested_msg.set_sync(); 21 nested_msg.set_sync();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ParamTraits<base::FilePath::StringType>::Write(&message, bad_string); 64 ParamTraits<base::FilePath::StringType>::Write(&message, bad_string);
65 65
66 PickleIterator iter(message); 66 PickleIterator iter(message);
67 base::FilePath ok_path; 67 base::FilePath ok_path;
68 base::FilePath bad_path; 68 base::FilePath bad_path;
69 ASSERT_TRUE(ParamTraits<base::FilePath>::Read(&message, &iter, &ok_path)); 69 ASSERT_TRUE(ParamTraits<base::FilePath>::Read(&message, &iter, &ok_path));
70 ASSERT_FALSE(ParamTraits<base::FilePath>::Read(&message, &iter, &bad_path)); 70 ASSERT_FALSE(ParamTraits<base::FilePath>::Read(&message, &iter, &bad_path));
71 } 71 }
72 72
73 } // namespace 73 } // namespace
74 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698