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

Unified Diff: chrome/browser/chromeos/login/mock_signed_settings_helper.h

Issue 7345010: Tests for cloud policy UMA metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed, rebased Created 9 years, 5 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 | « no previous file | chrome/browser/chromeos/login/mock_signed_settings_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/mock_signed_settings_helper.h
diff --git a/chrome/browser/chromeos/login/mock_signed_settings_helper.h b/chrome/browser/chromeos/login/mock_signed_settings_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..5376818e62e6e655d638f8f7f354cd6a0ae29085
--- /dev/null
+++ b/chrome/browser/chromeos/login/mock_signed_settings_helper.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "chrome/browser/chromeos/login/signed_settings_helper.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace chromeos {
+
+class MockSignedSettingsHelper : public chromeos::SignedSettingsHelper {
+ public:
+ MockSignedSettingsHelper();
+ virtual ~MockSignedSettingsHelper();
+
+ MOCK_METHOD2(StartCheckWhitelistOp,
+ void(const std::string& email, Callback*));
+ MOCK_METHOD3(StartWhitelistOp,
+ void(const std::string&, bool, Callback*));
+ MOCK_METHOD3(StartStorePropertyOp,
+ void(const std::string&, const std::string&, Callback*));
+ MOCK_METHOD2(StartRetrieveProperty,
+ void(const std::string&, Callback*));
+ MOCK_METHOD2(StartStorePolicyOp,
+ void(const em::PolicyFetchResponse&, Callback*));
+ MOCK_METHOD1(StartRetrievePolicyOp, void(Callback* callback));
+ MOCK_METHOD1(CancelCallback, void(Callback*));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockSignedSettingsHelper);
+};
+
+ACTION_P(MockSignedSettingsHelperStorePolicy, status_code) {
+ arg1->OnStorePolicyCompleted(status_code);
+}
+
+ACTION_P2(MockSignedSettingsHelperRetrievePolicy, status_code, policy) {
+ arg0->OnRetrievePolicyCompleted(status_code, policy);
+}
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_signed_settings_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698