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

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

Issue 868253005: AffiliationBackend: Implement the better part of on-demand fetching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tidy up NULL time related issues. Created 5 years, 11 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 | « components/password_manager/core/browser/mock_affiliation_consumer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/mock_affiliation_consumer.cc
diff --git a/components/password_manager/core/browser/mock_affiliation_consumer.cc b/components/password_manager/core/browser/mock_affiliation_consumer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6f1d102d66eb2c15d8b6b4f4dcd07aba369da422
--- /dev/null
+++ b/components/password_manager/core/browser/mock_affiliation_consumer.cc
@@ -0,0 +1,37 @@
+// Copyright 2015 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.
+
+#include "components/password_manager/core/browser/mock_affiliation_consumer.h"
+
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+
+namespace password_manager {
+
+MockAffiliationConsumer::MockAffiliationConsumer() {
+ EXPECT_CALL(*this, OnResultCallback(testing::_, testing::_)).Times(0);
+}
+
+MockAffiliationConsumer::~MockAffiliationConsumer() {
+}
+
+void MockAffiliationConsumer::ExpectSuccessWithResult(
+ const AffiliatedFacets& expected_result) {
+ EXPECT_CALL(*this, OnResultCallback(
+ testing::UnorderedElementsAreArray(expected_result),
+ true)).Times(1);
+}
+
+void MockAffiliationConsumer::ExpectFailure() {
+ EXPECT_CALL(*this, OnResultCallback(testing::UnorderedElementsAre(), false))
+ .Times(1);
+}
+
+AffiliationService::ResultCallback
+MockAffiliationConsumer::GetResultCallback() {
+ return base::Bind(&MockAffiliationConsumer::OnResultCallback,
+ base::Unretained(this));
+}
+
+} // namespace password_manager
« no previous file with comments | « components/password_manager/core/browser/mock_affiliation_consumer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698