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: dbus/property_unittest.cc

Issue 12491014: Support D-Bus Object Manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Insufficient entrails in my offering Created 7 years, 9 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 | « dbus/object_manager_unittest.cc ('k') | dbus/test_service.h » ('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/property.h" 5 #include "dbus/property.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 28
29 struct Properties : public dbus::PropertySet { 29 struct Properties : public dbus::PropertySet {
30 dbus::Property<std::string> name; 30 dbus::Property<std::string> name;
31 dbus::Property<int16> version; 31 dbus::Property<int16> version;
32 dbus::Property<std::vector<std::string> > methods; 32 dbus::Property<std::vector<std::string> > methods;
33 dbus::Property<std::vector<dbus::ObjectPath> > objects; 33 dbus::Property<std::vector<dbus::ObjectPath> > objects;
34 34
35 Properties(dbus::ObjectProxy* object_proxy, 35 Properties(dbus::ObjectProxy* object_proxy,
36 PropertyChangedCallback property_changed_callback) 36 PropertyChangedCallback property_changed_callback)
37 : dbus::PropertySet(object_proxy, 37 : dbus::PropertySet(object_proxy,
38 "org.chromium.TestService", 38 "org.chromium.TestInterface",
39 property_changed_callback) { 39 property_changed_callback) {
40 RegisterProperty("Name", &name); 40 RegisterProperty("Name", &name);
41 RegisterProperty("Version", &version); 41 RegisterProperty("Version", &version);
42 RegisterProperty("Methods", &methods); 42 RegisterProperty("Methods", &methods);
43 RegisterProperty("Objects", &objects); 43 RegisterProperty("Objects", &objects);
44 } 44 }
45 }; 45 };
46 46
47 virtual void SetUp() { 47 virtual void SetUp() {
48 // Make the main thread not to allow IO. 48 // Make the main thread not to allow IO.
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 base::Bind(&PropertyTest::PropertyCallback, 238 base::Bind(&PropertyTest::PropertyCallback,
239 base::Unretained(this), 239 base::Unretained(this),
240 "Set")); 240 "Set"));
241 WaitForCallback("Set"); 241 WaitForCallback("Set");
242 242
243 // TestService sends a property update. 243 // TestService sends a property update.
244 WaitForUpdates(1); 244 WaitForUpdates(1);
245 245
246 EXPECT_EQ("NewService", properties_->name.value()); 246 EXPECT_EQ("NewService", properties_->name.value());
247 } 247 }
OLDNEW
« no previous file with comments | « dbus/object_manager_unittest.cc ('k') | dbus/test_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698