summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authoryoungki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 21:56:45 +0000
committeryoungki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 21:56:45 +0000
commitc52f63ac9233ffa5591b18734638924d316f4d98 (patch)
tree19321d427d71f8a5f23e695ba6f6023a90af4fd8 /device
parent0457b750e0029599ef7bf8c470e120dda025fec2 (diff)
downloadchromium_src-c52f63ac9233ffa5591b18734638924d316f4d98.zip
chromium_src-c52f63ac9233ffa5591b18734638924d316f4d98.tar.gz
chromium_src-c52f63ac9233ffa5591b18734638924d316f4d98.tar.bz2
Added MockBluetoothSocket.
BUG= Review URL: https://chromiumcodereview.appspot.com/11358220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device')
-rw-r--r--device/bluetooth/test/mock_bluetooth_socket.cc12
-rw-r--r--device/bluetooth/test/mock_bluetooth_socket.h24
-rw-r--r--device/device.gyp2
3 files changed, 38 insertions, 0 deletions
diff --git a/device/bluetooth/test/mock_bluetooth_socket.cc b/device/bluetooth/test/mock_bluetooth_socket.cc
new file mode 100644
index 0000000..3c11518
--- /dev/null
+++ b/device/bluetooth/test/mock_bluetooth_socket.cc
@@ -0,0 +1,12 @@
+// 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.
+
+#include "device/bluetooth/test/mock_bluetooth_socket.h"
+
+namespace device {
+
+MockBluetoothSocket::MockBluetoothSocket() {}
+MockBluetoothSocket::~MockBluetoothSocket() {}
+
+} // namespace device
diff --git a/device/bluetooth/test/mock_bluetooth_socket.h b/device/bluetooth/test/mock_bluetooth_socket.h
new file mode 100644
index 0000000..a2a287f
--- /dev/null
+++ b/device/bluetooth/test/mock_bluetooth_socket.h
@@ -0,0 +1,24 @@
+// 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.
+
+#ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
+#define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
+
+#include "device/bluetooth/bluetooth_socket.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace device {
+
+class MockBluetoothSocket : public BluetoothSocket {
+ public:
+ MockBluetoothSocket();
+ MOCK_CONST_METHOD0(fd, int());
+
+ protected:
+ virtual ~MockBluetoothSocket();
+};
+
+} // namespace device
+
+#endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
diff --git a/device/device.gyp b/device/device.gyp
index bcf73d5..5678835 100644
--- a/device/device.gyp
+++ b/device/device.gyp
@@ -63,6 +63,8 @@
'bluetooth/test/mock_bluetooth_adapter.h',
'bluetooth/test/mock_bluetooth_device.cc',
'bluetooth/test/mock_bluetooth_device.h',
+ 'bluetooth/test/mock_bluetooth_socket.cc',
+ 'bluetooth/test/mock_bluetooth_socket.h',
],
'include_dirs': [
'..',