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

Unified Diff: dbus/bus_unittest.cc

Issue 9378039: dbus: add ObjectPath type (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: add patch for cryptohome_client Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dbus/bus.cc ('k') | dbus/dbus.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/bus_unittest.cc
diff --git a/dbus/bus_unittest.cc b/dbus/bus_unittest.cc
index c21044b4c1ef959a8130ec4f5083d9f681acd00e..c66a05b4bc5d95f63a61e8d4e96e9131054cd8fa 100644
--- a/dbus/bus_unittest.cc
+++ b/dbus/bus_unittest.cc
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/threading/thread.h"
#include "dbus/exported_object.h"
+#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -30,20 +31,21 @@ TEST(BusTest, GetObjectProxy) {
dbus::ObjectProxy* object_proxy1 =
bus->GetObjectProxy("org.chromium.TestService",
- "/org/chromium/TestObject");
+ dbus::ObjectPath("/org/chromium/TestObject"));
ASSERT_TRUE(object_proxy1);
// This should return the same object.
dbus::ObjectProxy* object_proxy2 =
bus->GetObjectProxy("org.chromium.TestService",
- "/org/chromium/TestObject");
+ dbus::ObjectPath("/org/chromium/TestObject"));
ASSERT_TRUE(object_proxy2);
EXPECT_EQ(object_proxy1, object_proxy2);
// This should not.
dbus::ObjectProxy* object_proxy3 =
- bus->GetObjectProxy("org.chromium.TestService",
- "/org/chromium/DifferentTestObject");
+ bus->GetObjectProxy(
+ "org.chromium.TestService",
+ dbus::ObjectPath("/org/chromium/DifferentTestObject"));
ASSERT_TRUE(object_proxy3);
EXPECT_NE(object_proxy1, object_proxy3);
@@ -57,7 +59,7 @@ TEST(BusTest, GetObjectProxyIgnoreUnknownService) {
dbus::ObjectProxy* object_proxy1 =
bus->GetObjectProxyWithOptions(
"org.chromium.TestService",
- "/org/chromium/TestObject",
+ dbus::ObjectPath("/org/chromium/TestObject"),
dbus::ObjectProxy::IGNORE_SERVICE_UNKNOWN_ERRORS);
ASSERT_TRUE(object_proxy1);
@@ -65,7 +67,7 @@ TEST(BusTest, GetObjectProxyIgnoreUnknownService) {
dbus::ObjectProxy* object_proxy2 =
bus->GetObjectProxyWithOptions(
"org.chromium.TestService",
- "/org/chromium/TestObject",
+ dbus::ObjectPath("/org/chromium/TestObject"),
dbus::ObjectProxy::IGNORE_SERVICE_UNKNOWN_ERRORS);
ASSERT_TRUE(object_proxy2);
EXPECT_EQ(object_proxy1, object_proxy2);
@@ -74,7 +76,7 @@ TEST(BusTest, GetObjectProxyIgnoreUnknownService) {
dbus::ObjectProxy* object_proxy3 =
bus->GetObjectProxyWithOptions(
"org.chromium.TestService",
- "/org/chromium/DifferentTestObject",
+ dbus::ObjectPath("/org/chromium/DifferentTestObject"),
dbus::ObjectProxy::IGNORE_SERVICE_UNKNOWN_ERRORS);
ASSERT_TRUE(object_proxy3);
EXPECT_NE(object_proxy1, object_proxy3);
@@ -88,20 +90,21 @@ TEST(BusTest, GetExportedObject) {
dbus::ExportedObject* object_proxy1 =
bus->GetExportedObject("org.chromium.TestService",
- "/org/chromium/TestObject");
+ dbus::ObjectPath("/org/chromium/TestObject"));
ASSERT_TRUE(object_proxy1);
// This should return the same object.
dbus::ExportedObject* object_proxy2 =
bus->GetExportedObject("org.chromium.TestService",
- "/org/chromium/TestObject");
+ dbus::ObjectPath("/org/chromium/TestObject"));
ASSERT_TRUE(object_proxy2);
EXPECT_EQ(object_proxy1, object_proxy2);
// This should not.
dbus::ExportedObject* object_proxy3 =
- bus->GetExportedObject("org.chromium.TestService",
- "/org/chromium/DifferentTestObject");
+ bus->GetExportedObject(
+ "org.chromium.TestService",
+ dbus::ObjectPath("/org/chromium/DifferentTestObject"));
ASSERT_TRUE(object_proxy3);
EXPECT_NE(object_proxy1, object_proxy3);
« no previous file with comments | « dbus/bus.cc ('k') | dbus/dbus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698