• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
7 
8 #include <string>
9 
10 #include "device/bluetooth/bluetooth_socket.h"
11 #include "testing/gmock/include/gmock/gmock.h"
12 
13 namespace net {
14 
15 class DrainableIOBuffer;
16 class GrowableIOBuffer;
17 
18 }  // namespace net
19 
20 namespace device {
21 
22 class MockBluetoothSocket : public BluetoothSocket {
23  public:
24   MockBluetoothSocket();
25   MOCK_METHOD1(Receive, bool(net::GrowableIOBuffer*));
26   MOCK_METHOD1(Send, bool(net::DrainableIOBuffer*));
27   MOCK_CONST_METHOD0(GetLastErrorMessage, std::string());
28 
29  protected:
30   virtual ~MockBluetoothSocket();
31 };
32 
33 }  // namespace device
34 
35 #endif  // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
36