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

Unified Diff: chrome/browser/policy/cloud_policy_controller_unittest.cc

Issue 7810025: Pass user_affiliation request parameter on user cloud policy requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
Index: chrome/browser/policy/cloud_policy_controller_unittest.cc
diff --git a/chrome/browser/policy/cloud_policy_controller_unittest.cc b/chrome/browser/policy/cloud_policy_controller_unittest.cc
index f1be2a9b2766f847c3a85d66cf506fdc788e4733..9e9af557b78e7fe0f5011fe128c0a4706733dfe2 100644
--- a/chrome/browser/policy/cloud_policy_controller_unittest.cc
+++ b/chrome/browser/policy/cloud_policy_controller_unittest.cc
@@ -20,12 +20,12 @@
namespace policy {
-using ::testing::_;
using ::testing::AnyNumber;
using ::testing::AtLeast;
using ::testing::InSequence;
using ::testing::Mock;
using ::testing::Return;
+using ::testing::_;
class MockDeviceTokenFetcher : public DeviceTokenFetcher {
public:
@@ -104,7 +104,7 @@ class CloudPolicyControllerTest : public testing::Test {
TEST_F(CloudPolicyControllerTest, StartupWithDeviceToken) {
data_store_->SetupForTesting("fake_device_token", "device_id", "", "",
true);
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(DoAll(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(DoAll(
InvokeWithoutArgs(this, &CloudPolicyControllerTest::StopMessageLoop),
MockDeviceManagementBackendSucceedSpdyCloudPolicy()));
CreateNewController();
@@ -140,9 +140,9 @@ TEST_F(CloudPolicyControllerTest, RefreshAfterSuccessfulPolicy) {
"auth_token", true);
{
InSequence s;
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(
MockDeviceManagementBackendSucceedSpdyCloudPolicy());
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(DoAll(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(DoAll(
InvokeWithoutArgs(this, &CloudPolicyControllerTest::StopMessageLoop),
MockDeviceManagementBackendFailPolicy(
DeviceManagementBackend::kErrorRequestFailed)));
@@ -159,10 +159,10 @@ TEST_F(CloudPolicyControllerTest, RefreshAfterError) {
"auth_token", true);
{
InSequence s;
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(
MockDeviceManagementBackendFailPolicy(
DeviceManagementBackend::kErrorRequestFailed));
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(DoAll(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(DoAll(
InvokeWithoutArgs(this,
&CloudPolicyControllerTest::StopMessageLoop),
MockDeviceManagementBackendSucceedSpdyCloudPolicy()));
@@ -177,7 +177,7 @@ TEST_F(CloudPolicyControllerTest, RefreshAfterError) {
TEST_F(CloudPolicyControllerTest, InvalidToken) {
data_store_->SetupForTesting("device_token", "device_id",
"standup@ten.am", "auth", true);
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(
MockDeviceManagementBackendFailPolicy(
DeviceManagementBackend::kErrorServiceManagementTokenInvalid));
EXPECT_CALL(*token_fetcher_.get(), FetchToken()).Times(1);
@@ -190,7 +190,7 @@ TEST_F(CloudPolicyControllerTest, InvalidToken) {
TEST_F(CloudPolicyControllerTest, DeviceNotFound) {
data_store_->SetupForTesting("device_token", "device_id",
"me@you.com", "auth", true);
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(
MockDeviceManagementBackendFailPolicy(
DeviceManagementBackend::kErrorServiceDeviceNotFound));
EXPECT_CALL(*token_fetcher_.get(), FetchToken()).Times(1);
@@ -204,7 +204,7 @@ TEST_F(CloudPolicyControllerTest, DeviceNotFound) {
TEST_F(CloudPolicyControllerTest, NoLongerManaged) {
data_store_->SetupForTesting("device_token", "device_id",
"who@what.com", "auth", true);
- EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _)).WillOnce(
+ EXPECT_CALL(backend_, ProcessPolicyRequest(_, _, _, _, _)).WillOnce(
MockDeviceManagementBackendFailPolicy(
DeviceManagementBackend::kErrorServiceManagementNotSupported));
EXPECT_CALL(*token_fetcher_.get(), SetUnmanagedState()).Times(1);

Powered by Google App Engine
This is Rietveld 408576698