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

Side by Side Diff: dbus/message_unittest.cc

Issue 11366229: Move eintr_wrapper.h from base to base/posix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « content/zygote/zygote_main_linux.cc ('k') | ipc/file_descriptor_set_posix.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 "dbus/message.h" 5 #include "dbus/message.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/eintr_wrapper.h"
9 #include "base/logging.h" 8 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/posix/eintr_wrapper.h"
11 #include "dbus/object_path.h" 11 #include "dbus/object_path.h"
12 #include "dbus/test_proto.pb.h" 12 #include "dbus/test_proto.pb.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 // Test that a byte can be properly written and read. We only have this 15 // Test that a byte can be properly written and read. We only have this
16 // test for byte, as repeating this for other basic types is too redundant. 16 // test for byte, as repeating this for other basic types is too redundant.
17 TEST(MessageTest, AppendAndPopByte) { 17 TEST(MessageTest, AppendAndPopByte) {
18 scoped_ptr<dbus::Response> message(dbus::Response::CreateEmpty()); 18 scoped_ptr<dbus::Response> message(dbus::Response::CreateEmpty());
19 dbus::MessageWriter writer(message.get()); 19 dbus::MessageWriter writer(message.get());
20 writer.AppendByte(123); // The input is 123. 20 writer.AppendByte(123); // The input is 123.
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 dbus::MessageWriter writer(message.get()); 621 dbus::MessageWriter writer(message.get());
622 writer.AppendString(kLongString); 622 writer.AppendString(kLongString);
623 623
624 ASSERT_EQ("message_type: MESSAGE_METHOD_RETURN\n" 624 ASSERT_EQ("message_type: MESSAGE_METHOD_RETURN\n"
625 "signature: s\n\n" 625 "signature: s\n\n"
626 "string \"oooooooooooooooooooooooooooooooooooooooooooooooo" 626 "string \"oooooooooooooooooooooooooooooooooooooooooooooooo"
627 "oooooooooooooooooooooooooooooooooooooooooooooooooooo... " 627 "oooooooooooooooooooooooooooooooooooooooooooooooooooo... "
628 "(1000 bytes in total)\"\n", 628 "(1000 bytes in total)\"\n",
629 message->ToString()); 629 message->ToString());
630 } 630 }
OLDNEW
« no previous file with comments | « content/zygote/zygote_main_linux.cc ('k') | ipc/file_descriptor_set_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698