OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/loader/resource_scheduler.h" | 5 #include "content/browser/loader/resource_scheduler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 net::URLRequestContext* GetRequestContext() override { return NULL; } | 124 net::URLRequestContext* GetRequestContext() override { return NULL; } |
125 }; | 125 }; |
126 | 126 |
127 class ResourceSchedulerTest : public testing::Test { | 127 class ResourceSchedulerTest : public testing::Test { |
128 protected: | 128 protected: |
129 ResourceSchedulerTest() | 129 ResourceSchedulerTest() |
130 : ui_thread_(BrowserThread::UI, &message_loop_), | 130 : ui_thread_(BrowserThread::UI, &message_loop_), |
131 io_thread_(BrowserThread::IO, &message_loop_), | 131 io_thread_(BrowserThread::IO, &message_loop_), |
132 field_trial_list_(new base::MockEntropyProvider()) { | 132 field_trial_list_(new base::MockEntropyProvider()) { |
133 InitializeScheduler(); | 133 InitializeScheduler(); |
134 context_.set_http_server_properties(http_server_properties_.GetWeakPtr()); | 134 context_.set_http_server_properties(&http_server_properties_); |
135 } | 135 } |
136 | 136 |
137 ~ResourceSchedulerTest() override { | 137 ~ResourceSchedulerTest() override { |
138 CleanupScheduler(); | 138 CleanupScheduler(); |
139 } | 139 } |
140 | 140 |
141 // Done separately from construction to allow for modification of command | 141 // Done separately from construction to allow for modification of command |
142 // line flags in tests. | 142 // line flags in tests. |
143 void InitializeScheduler() { | 143 void InitializeScheduler() { |
144 CleanupScheduler(); | 144 CleanupScheduler(); |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 scheduler_->OnClientDeleted(kChildId2, kRouteId2); | 805 scheduler_->OnClientDeleted(kChildId2, kRouteId2); |
806 high.reset(); | 806 high.reset(); |
807 delayable_requests.clear(); | 807 delayable_requests.clear(); |
808 base::RunLoop().RunUntilIdle(); | 808 base::RunLoop().RunUntilIdle(); |
809 EXPECT_TRUE(lowest->started()); | 809 EXPECT_TRUE(lowest->started()); |
810 } | 810 } |
811 | 811 |
812 } // unnamed namespace | 812 } // unnamed namespace |
813 | 813 |
814 } // namespace content | 814 } // namespace content |
OLD | NEW |