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

Unified Diff: components/proximity_auth/ble/proximity_auth_ble_system_unittest.cc

Issue 1316543003: Refactor ProximityAuthUIDelegate functions to ProximityAuthClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: components/proximity_auth/ble/proximity_auth_ble_system_unittest.cc
diff --git a/components/proximity_auth/ble/proximity_auth_ble_system_unittest.cc b/components/proximity_auth/ble/proximity_auth_ble_system_unittest.cc
index 79fd6ef8f10b11c97486c66babf22e243b4cd930..c86797649a5c8b5f63b3da3804391cc8137224a2 100644
--- a/components/proximity_auth/ble/proximity_auth_ble_system_unittest.cc
+++ b/components/proximity_auth/ble/proximity_auth_ble_system_unittest.cc
@@ -12,7 +12,7 @@
#include "components/proximity_auth/ble/bluetooth_low_energy_device_whitelist.h"
#include "components/proximity_auth/connection_finder.h"
#include "components/proximity_auth/cryptauth/mock_cryptauth_client.h"
-#include "components/proximity_auth/proximity_auth_client.h"
+#include "components/proximity_auth/mock_proximity_auth_client.h"
#include "components/proximity_auth/screenlock_bridge.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -61,25 +61,6 @@ class MockLockHandler : public ScreenlockBridge::LockHandler {
DISALLOW_COPY_AND_ASSIGN(MockLockHandler);
};
-const char kTestUser[] = "example@gmail.com";
-
-class MockProximityAuthClient : public ProximityAuthClient {
- public:
- MockProximityAuthClient() {}
- ~MockProximityAuthClient() override {}
-
- // ProximityAuthClient:
- std::string GetAuthenticatedUsername() const override { return kTestUser; }
-
- MOCK_METHOD1(UpdateScreenlockState,
- void(proximity_auth::ScreenlockState state));
- MOCK_METHOD1(FinalizeUnlock, void(bool success));
- MOCK_METHOD1(FinalizeSignin, void(const std::string& secret));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockProximityAuthClient);
-};
-
} // namespace
class ProximityAuthBleSystemTestable : public ProximityAuthBleSystem {

Powered by Google App Engine
This is Rietveld 408576698