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

Unified Diff: chromeos/components/tether/mock_tether_host_response_recorder.h

Issue 2844973002: [CrOS Tether] Create TetherHostResponseRecorder, which records ConnectTetheringResponses and Tether… (Closed)
Patch Set: Changed "Connectable" wording to "Connected". Created 3 years, 8 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: chromeos/components/tether/mock_tether_host_response_recorder.h
diff --git a/chromeos/components/tether/mock_tether_host_response_recorder.h b/chromeos/components/tether/mock_tether_host_response_recorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..1293a1e649628c55db967ce61f0220bc9af18ce1
--- /dev/null
+++ b/chromeos/components/tether/mock_tether_host_response_recorder.h
@@ -0,0 +1,40 @@
+// Copyright 2017 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 CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_
+#define CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "chromeos/components/tether/tether_host_response_recorder.h"
+#include "components/cryptauth/remote_device.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace chromeos {
+
+namespace tether {
+
+// Test double for TetherHostResponseRecorder.
+class MockTetherHostResponseRecorder : public TetherHostResponseRecorder {
+ public:
+ MockTetherHostResponseRecorder();
+ ~MockTetherHostResponseRecorder() override;
+
+ MOCK_METHOD1(RecordSuccessfulTetherAvailabilityResponse,
+ void(const cryptauth::RemoteDevice&));
+ MOCK_METHOD1(RecordSuccessfulConnectTetheringResponse,
+ void(const cryptauth::RemoteDevice&));
+ MOCK_CONST_METHOD0(GetPreviouslyAvailableHostIds, std::vector<std::string>());
+ MOCK_CONST_METHOD0(GetPreviouslyConnectedHostIds, std::vector<std::string>());
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockTetherHostResponseRecorder);
+};
+
+} // namespace tether
+
+} // namespace chromeos
+
+#endif // CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_

Powered by Google App Engine
This is Rietveld 408576698