Index: components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc |
diff --git a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc |
index 63149fced6d7eab0274d956bb1c88d1f98e73e7c..d0f86714cd8c8f65b02a13ce3943f99963111672 100644 |
--- a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc |
+++ b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc |
@@ -193,19 +193,11 @@ TEST_F(CloudPolicyRefreshSchedulerTest, Unregistered) { |
EXPECT_TRUE(task_runner_->GetPendingTasks().empty()); |
} |
-TEST_F(CloudPolicyRefreshSchedulerTest, RefreshSoonRateLimit) { |
+TEST_F(CloudPolicyRefreshSchedulerTest, RefreshSoon) { |
scoped_ptr<CloudPolicyRefreshScheduler> scheduler(CreateRefreshScheduler()); |
- // Max out the request rate. |
- for (int i = 0; i < 5; ++i) { |
- EXPECT_CALL(client_, FetchPolicy()).Times(1); |
- scheduler->RefreshSoon(); |
- task_runner_->RunUntilIdle(); |
- Mock::VerifyAndClearExpectations(&client_); |
- } |
- // The next refresh is throttled. |
- EXPECT_CALL(client_, FetchPolicy()).Times(0); |
+ EXPECT_CALL(client_, FetchPolicy()).Times(1); |
scheduler->RefreshSoon(); |
- task_runner_->RunPendingTasks(); |
+ task_runner_->RunUntilIdle(); |
Mock::VerifyAndClearExpectations(&client_); |
} |