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

Unified Diff: components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc

Issue 2472133004: Creating class for processing of keypress events. (Closed)
Patch Set: fix Created 4 years 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/password_manager/core/browser/password_reuse_detection_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc b/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6ea8fb96ac2eada793d9240faddfb5c0ef3511fc
--- /dev/null
+++ b/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc
@@ -0,0 +1,45 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
vabr (Chromium) 2016/12/23 17:14:11 I don't think you are compiling this test.
dvadym 2016/12/23 17:45:20 Sorry, this test should be removed for now. I didn
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/password_manager/core/browser/password_reuse_detection_manager.h"
+
+#include <memory>
vabr (Chromium) 2016/12/23 17:14:11 all three unused?
+#include <string>
+#include <vector>
+
+#include "base/strings/utf_string_conversions.h"
vabr (Chromium) 2016/12/23 17:14:11 unused
+#include "components/autofill/core/common/password_form.h"
vabr (Chromium) 2016/12/23 17:14:11 unused
+#include "components/password_manager/core/browser/stub_password_manager_client.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using autofill::PasswordForm;
vabr (Chromium) 2016/12/23 17:14:11 unused
+using base::ASCIIToUTF16;
+using testing::_;
+
+namespace password_manager {
+
+namespace {
+
+class MockPasswordManagerClient : public StubPasswordManagerClient {
+ public:
+ MockPasswordManagerClient() = default;
+ ~MockPasswordManagerClient() override = default;
+
+ MOCK_METHOD1(AddInputEventObserver, void(InputEventObserver*));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockPasswordManagerClient);
+};
+
+TEST(PasswordReuseDetectionManagerTest, NavigationFrame) {
+ MockPasswordManagerClient client;
+ PasswordReuseDetectionManager manager(&client);
+ EXPECT_CALL(client, AddInputEventObserver(&manager));
vabr (Chromium) 2016/12/23 17:14:11 This method does not exist in PasswordManagerClien
+ manager.DidNavigateMainFrame();
+}
+
+} // namespace
+
+} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698