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

Unified Diff: content/browser/geolocation/wifi_data_provider_linux_unittest.cc

Issue 9378039: dbus: add ObjectPath type (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: make dbus::ObjectPath harder to use :) 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
Index: content/browser/geolocation/wifi_data_provider_linux_unittest.cc
diff --git a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
index e5a39b96a3196ed2c7408fe5db795c8b788d70e8..20805d06cb284195315b3f76f18475a8ee106a2c 100644
--- a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,6 +11,7 @@
#include "dbus/message.h"
#include "dbus/mock_bus.h"
#include "dbus/mock_object_proxy.h"
+#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -71,18 +72,18 @@ class GeolocationWifiDataProviderLinuxTest : public testing::Test {
// mock_network_manager_proxy_.
EXPECT_CALL(*mock_bus_, GetObjectProxy(
"org.freedesktop.NetworkManager",
- "/org/freedesktop/NetworkManager"))
+ dbus::ObjectPath("/org/freedesktop/NetworkManager")))
.WillOnce(Return(mock_network_manager_proxy_.get()));
// Likewise, set an expectation for mock_device_proxy_.
EXPECT_CALL(*mock_bus_, GetObjectProxy(
"org.freedesktop.NetworkManager",
- "/org/freedesktop/NetworkManager/Devices/0"))
+ dbus::ObjectPath("/org/freedesktop/NetworkManager/Devices/0")))
.WillOnce(Return(mock_device_proxy_.get()))
.WillOnce(Return(mock_device_proxy_.get()));
// Likewise, set an expectation for mock_access_point_proxy_.
EXPECT_CALL(*mock_bus_, GetObjectProxy(
"org.freedesktop.NetworkManager",
- "/org/freedesktop/NetworkManager/AccessPoint/0"))
+ dbus::ObjectPath("/org/freedesktop/NetworkManager/AccessPoint/0")))
.WillOnce(Return(mock_access_point_proxy_.get()));
// ShutdownAndBlock() should be called.
@@ -115,7 +116,7 @@ class GeolocationWifiDataProviderLinuxTest : public testing::Test {
if (method_call->GetInterface() == "org.freedesktop.NetworkManager" &&
method_call->GetMember() == "GetDevices") {
// The list of devices is asked. Return the object path.
- std::vector<std::string> object_paths;
+ std::vector<dbus::ObjectPath> object_paths;
object_paths.push_back("/org/freedesktop/NetworkManager/Devices/0");
dbus::Response* response = dbus::Response::CreateEmpty();
@@ -152,7 +153,7 @@ class GeolocationWifiDataProviderLinuxTest : public testing::Test {
// The list of access points is asked. Return the object path.
dbus::Response* response = dbus::Response::CreateEmpty();
dbus::MessageWriter writer(response);
- std::vector<std::string> object_paths;
+ std::vector<dbus::ObjectPath> object_paths;
object_paths.push_back("/org/freedesktop/NetworkManager/AccessPoint/0");
writer.AppendArrayOfObjectPaths(object_paths);
return response;

Powered by Google App Engine
This is Rietveld 408576698