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

Side by Side Diff: components/policy/core/common/cloud/rate_limiter_unittest.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/policy/cloud/rate_limiter.h" 5 #include "components/policy/core/common/cloud/rate_limiter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/test/simple_test_tick_clock.h" 9 #include "base/test/simple_test_tick_clock.h"
10 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
11 #include "base/time/tick_clock.h" 11 #include "base/time/tick_clock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace policy { 14 namespace policy {
15 15
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // Now advance time beyond the initial duration. It will immediately execute 113 // Now advance time beyond the initial duration. It will immediately execute
114 // the callback. 114 // the callback.
115 EXPECT_EQ(max_requests_, callbacks_); 115 EXPECT_EQ(max_requests_, callbacks_);
116 task_runner_->RunPendingTasks(); 116 task_runner_->RunPendingTasks();
117 EXPECT_TRUE(task_runner_->GetPendingTasks().empty()); 117 EXPECT_TRUE(task_runner_->GetPendingTasks().empty());
118 EXPECT_EQ(max_requests_ + 1, callbacks_); 118 EXPECT_EQ(max_requests_ + 1, callbacks_);
119 } 119 }
120 120
121 } // namespace policy 121 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/cloud/rate_limiter.cc ('k') | components/policy/core/common/cloud/resource_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698