| Index: net/base/prioritized_dispatcher_unittest.cc
|
| diff --git a/net/base/prioritized_dispatcher_unittest.cc b/net/base/prioritized_dispatcher_unittest.cc
|
| index 4cdf53b53f982606eb6d95b1e0780fe65e1e3bc9..027e6a4c3675e8dbc9c27bcdae3fd050057d9ac5 100644
|
| --- a/net/base/prioritized_dispatcher_unittest.cc
|
| +++ b/net/base/prioritized_dispatcher_unittest.cc
|
| @@ -19,11 +19,10 @@ namespace {
|
|
|
| // We rely on the priority enum values being sequential having starting at 0,
|
| // and increasing for higher priorities.
|
| -COMPILE_ASSERT(MINIMUM_PRIORITY == 0u &&
|
| - MINIMUM_PRIORITY == IDLE &&
|
| - IDLE < LOWEST &&
|
| - LOWEST < HIGHEST &&
|
| - HIGHEST <= MAXIMUM_PRIORITY,
|
| +COMPILE_ASSERT(MINIMUM_PRIORITY == 0u && MINIMUM_PRIORITY == IDLE &&
|
| + IDLE < LOWEST &&
|
| + LOWEST < HIGHEST &&
|
| + HIGHEST <= MAXIMUM_PRIORITY,
|
| priority_indexes_incompatible);
|
|
|
| class PrioritizedDispatcherTest : public testing::Test {
|
| @@ -44,13 +43,9 @@ class PrioritizedDispatcherTest : public testing::Test {
|
| running_(false),
|
| log_(log) {}
|
|
|
| - bool running() const {
|
| - return running_;
|
| - }
|
| + bool running() const { return running_; }
|
|
|
| - const PrioritizedDispatcher::Handle handle() const {
|
| - return handle_;
|
| - }
|
| + const PrioritizedDispatcher::Handle handle() const { return handle_; }
|
|
|
| void Add(bool at_head) {
|
| CHECK(handle_.is_null());
|
| @@ -282,14 +277,14 @@ TEST_F(PrioritizedDispatcherTest, EnforceLimits) {
|
| limits.reserved_slots[LOW] = 1;
|
| Prepare(limits);
|
|
|
| - TestJob* job_a = AddJob('a', IDLE); // Uses unreserved slot.
|
| - TestJob* job_b = AddJob('b', IDLE); // Uses unreserved slot.
|
| - TestJob* job_c = AddJob('c', LOWEST); // Must wait.
|
| - TestJob* job_d = AddJob('d', LOW); // Uses reserved slot.
|
| - TestJob* job_e = AddJob('e', MEDIUM); // Must wait.
|
| - TestJob* job_f = AddJob('f', HIGHEST); // Uses reserved slot.
|
| - TestJob* job_g = AddJob('g', HIGHEST); // Uses reserved slot.
|
| - TestJob* job_h = AddJob('h', HIGHEST); // Must wait.
|
| + TestJob* job_a = AddJob('a', IDLE); // Uses unreserved slot.
|
| + TestJob* job_b = AddJob('b', IDLE); // Uses unreserved slot.
|
| + TestJob* job_c = AddJob('c', LOWEST); // Must wait.
|
| + TestJob* job_d = AddJob('d', LOW); // Uses reserved slot.
|
| + TestJob* job_e = AddJob('e', MEDIUM); // Must wait.
|
| + TestJob* job_f = AddJob('f', HIGHEST); // Uses reserved slot.
|
| + TestJob* job_g = AddJob('g', HIGHEST); // Uses reserved slot.
|
| + TestJob* job_h = AddJob('h', HIGHEST); // Must wait.
|
|
|
| EXPECT_EQ(5u, dispatcher_->num_running_jobs());
|
| EXPECT_EQ(3u, dispatcher_->num_queued_jobs());
|
|
|