summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chromeos/chromeos.gyp1
-rw-r--r--chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc5
-rw-r--r--dbus/dbus.gyp6
-rw-r--r--dbus/fake_bus.cc17
-rw-r--r--dbus/fake_bus.h23
5 files changed, 4 insertions, 48 deletions
diff --git a/chromeos/chromeos.gyp b/chromeos/chromeos.gyp
index 82d505e..ce3753f 100644
--- a/chromeos/chromeos.gyp
+++ b/chromeos/chromeos.gyp
@@ -378,7 +378,6 @@
'type': 'static_library',
'dependencies': [
'../build/linux/system.gyp:dbus',
- '../dbus/dbus.gyp:dbus_test_support',
'chromeos',
'power_manager_proto',
],
diff --git a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc
index 1e0e37e..1cc24cc 100644
--- a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc
+++ b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc
@@ -19,7 +19,6 @@
#include "chromeos/dbus/ibus/mock_ibus_engine_service.h"
#include "chromeos/dbus/ibus/mock_ibus_input_context_client.h"
#include "chromeos/dbus/ibus/mock_ibus_panel_service.h"
-#include "dbus/fake_bus.h"
namespace chromeos {
@@ -62,8 +61,8 @@ void MockDBusThreadManagerWithoutGMock::RemoveObserver(
void MockDBusThreadManagerWithoutGMock::InitIBusBus(
const std::string& ibus_address,
const base::Closure& closure) {
- dbus::Bus::Options options;
- ibus_bus_ = new dbus::FakeBus(options);
+ // Non-null bus address is used to ensure the connection to ibus-daemon.
+ ibus_bus_ = reinterpret_cast<dbus::Bus*>(0xdeadbeef);
}
dbus::Bus* MockDBusThreadManagerWithoutGMock::GetSystemBus() {
diff --git a/dbus/dbus.gyp b/dbus/dbus.gyp
index 3f41238..847e7d97 100644
--- a/dbus/dbus.gyp
+++ b/dbus/dbus.gyp
@@ -59,8 +59,8 @@
'includes': [ '../build/protoc.gypi' ],
},
{
- # This target contains mocks and fakes that can be used to write unit
- # tests without issuing actual D-Bus calls.
+ # This target contains mocks that can be used to write unit tests
+ # without issuing actual D-Bus calls.
'target_name': 'dbus_test_support',
'type': 'static_library',
'dependencies': [
@@ -69,8 +69,6 @@
'dbus',
],
'sources': [
- 'fake_bus.cc',
- 'fake_bus.h',
'mock_bus.cc',
'mock_bus.h',
'mock_exported_object.cc',
diff --git a/dbus/fake_bus.cc b/dbus/fake_bus.cc
deleted file mode 100644
index a93772c..0000000
--- a/dbus/fake_bus.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2013 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.
-
-#include "dbus/fake_bus.h"
-
-#include "base/location.h"
-
-namespace dbus {
-
-FakeBus::FakeBus(const Bus::Options& options) : Bus(options) {
-}
-
-FakeBus::~FakeBus() {
-}
-
-} // namespace dbus
diff --git a/dbus/fake_bus.h b/dbus/fake_bus.h
deleted file mode 100644
index 743e362..0000000
--- a/dbus/fake_bus.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2013 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.
-
-#ifndef DBUS_FAKE_BUS_H_
-#define DBUS_FAKE_BUS_H_
-
-#include "dbus/bus.h"
-
-namespace dbus {
-
-// A fake implementation of Bus, which does nothing.
-class FakeBus : public Bus {
- public:
- FakeBus(const Bus::Options& options);
-
- protected:
- virtual ~FakeBus();
-};
-
-} // namespace dbus
-
-#endif // DBUS_FAKE_BUS_H_