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

Unified Diff: ash/login/mock_lock_screen_client.h

Issue 2894193002: cros: Pull TestLockScreenClient into a separate MockLockScreenClient file. (Closed)
Patch Set: Rebase (remove parent dep) Created 3 years, 7 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
« no previous file with comments | « ash/login/lock_screen_controller_unittest.cc ('k') | ash/login/mock_lock_screen_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/login/mock_lock_screen_client.h
diff --git a/ash/login/mock_lock_screen_client.h b/ash/login/mock_lock_screen_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..52874b3530e3c4feff543d5ac897d8c0ee41b644
--- /dev/null
+++ b/ash/login/mock_lock_screen_client.h
@@ -0,0 +1,38 @@
+// 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 ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
+#define ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
+
+#include "ash/public/interfaces/lock_screen.mojom.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace ash {
+
+class MockLockScreenClient : public mojom::LockScreenClient {
+ public:
+ MockLockScreenClient();
+ ~MockLockScreenClient() override;
+
+ mojom::LockScreenClientPtr CreateInterfacePtrAndBind();
+
+ // mojom::LockScreenClient:
+ MOCK_METHOD3(AuthenticateUser,
+ void(const AccountId& account_id,
+ const std::string& password,
+ bool authenticated_by_pin));
+
+ private:
+ mojo::Binding<ash::mojom::LockScreenClient> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient);
+};
+
+// Helper method to bind a lock screen client so it receives all mojo calls.
+std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient();
+
+} // namespace ash
+
+#endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_
« no previous file with comments | « ash/login/lock_screen_controller_unittest.cc ('k') | ash/login/mock_lock_screen_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698