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

Side by Side Diff: net/dbus/dbus_unittest.cc

Issue 7413004: Uploading for backup... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 9 years, 5 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
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "base/scoped_ptr.h"
7 #include "net/dbus/dbus.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace net {
11
12 TEST(DBusTest, Test) {
13 dbus::Bus bus(dbus::Bus::SESSION);
14 scoped_ptr<dbus::ObjectProxy> proxy(bus.GetObjectProxy(
15 "com.example.SampleService",
16 "/SomeObject"));
17 dbus::MethodCall method_call;
18 dbus::MessageBuilder builder(&method_call);
19 builder.AppendString("hello");
20 dbus::Response response;
21 CHECK(proxy->CallMethodSync("com.example.SampleInterface",
22 "HelloWorld",
23 &method_call,
24 &response));
25 dbus::MessageReader reader(&response);
26 dbus::MessageReader sub_reader(&response);
27 CHECK(reader.PopArray(&sub_reader));
28 std::string string_value;
29 CHECK(sub_reader.PopString(&string_value));
30 LOG(ERROR) << string_value;
31 CHECK(sub_reader.PopString(&string_value));
32 LOG(ERROR) << string_value;
33 }
34
35 } // namespace net
OLDNEW
« net/dbus/dbus.cc ('K') | « net/dbus/dbus.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698