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

Unified Diff: chrome/browser/policy/mock_device_management_backend.h

Issue 5219006: Refresh policies from DM server periodically (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 10 years, 1 month 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: chrome/browser/policy/mock_device_management_backend.h
diff --git a/chrome/browser/policy/mock_device_management_backend.h b/chrome/browser/policy/mock_device_management_backend.h
index 6b3258c6b34e08bb9f9791661384a28e8ef98ce0..9371dc06b03860db294574496d83f4015783a7d6 100644
--- a/chrome/browser/policy/mock_device_management_backend.h
+++ b/chrome/browser/policy/mock_device_management_backend.h
@@ -11,8 +11,8 @@
#include "base/values.h"
#include "chrome/browser/policy/device_management_backend.h"
-#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace policy {
@@ -49,6 +49,8 @@ class MockDeviceManagementBackend
void AllShouldSucceed();
void AllShouldFail();
void UnmanagedDevice();
+ void RegisterFailsOncePolicyFailsTwice();
+ void AllWorksFirstPolicyFailsLater();
void SimulateSuccessfulRegisterRequest(
const std::string& auth_token,
@@ -86,6 +88,10 @@ class MockDeviceManagementBackend
em::DevicePolicyResponse policy_response_;
em::DevicePolicySetting* policy_setting_;
+ int policy_remaining_fail_count_;
+ int register_remaining_fail_count_;
+ int policy_remaining_success_count_;
+
DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementBackend);
};
« no previous file with comments | « chrome/browser/policy/device_token_fetcher_unittest.cc ('k') | chrome/browser/policy/mock_device_management_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698