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

Side by Side Diff: content/browser/loader/resource_scheduler_unittest.cc

Issue 12701011: [Net] Propagate priority changes from URLRequest to HttpTransaction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leaks Created 7 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/browser/loader/resource_scheduler.cc ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "content/browser/browser_thread_impl.h" 8 #include "content/browser/browser_thread_impl.h"
9 #include "content/browser/loader/resource_dispatcher_host_impl.h" 9 #include "content/browser/loader/resource_dispatcher_host_impl.h"
10 #include "content/browser/loader/resource_request_info_impl.h" 10 #include "content/browser/loader/resource_request_info_impl.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 virtual ~ResourceSchedulerTest() { 86 virtual ~ResourceSchedulerTest() {
87 scheduler_.OnClientDeleted(kChildId, kRouteId); 87 scheduler_.OnClientDeleted(kChildId, kRouteId);
88 } 88 }
89 89
90 scoped_ptr<net::URLRequest> NewURLRequest(const char* url, 90 scoped_ptr<net::URLRequest> NewURLRequest(const char* url,
91 net::RequestPriority priority, 91 net::RequestPriority priority,
92 int route_id = kRouteId) { 92 int route_id = kRouteId) {
93 scoped_ptr<net::URLRequest> url_request( 93 scoped_ptr<net::URLRequest> url_request(
94 context_.CreateRequest(GURL(url), NULL)); 94 context_.CreateRequest(GURL(url), NULL));
95 url_request->set_priority(priority); 95 url_request->SetPriority(priority);
96 ResourceRequestInfo::AllocateForTesting( 96 ResourceRequestInfo::AllocateForTesting(
97 url_request.get(), ResourceType::SUB_RESOURCE, NULL, kChildId, 97 url_request.get(), ResourceType::SUB_RESOURCE, NULL, kChildId,
98 route_id); 98 route_id);
99 return url_request.Pass(); 99 return url_request.Pass();
100 } 100 }
101 101
102 TestRequest* NewRequest(const char* url, net::RequestPriority priority, 102 TestRequest* NewRequest(const char* url, net::RequestPriority priority,
103 int route_id = kRouteId) { 103 int route_id = kRouteId) {
104 scoped_ptr<net::URLRequest> url_request( 104 scoped_ptr<net::URLRequest> url_request(
105 NewURLRequest(url, priority, route_id)); 105 NewURLRequest(url, priority, route_id));
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 EXPECT_FALSE(low2->started()); 189 EXPECT_FALSE(low2->started());
190 high.reset(); 190 high.reset();
191 EXPECT_TRUE(low1->started()); 191 EXPECT_TRUE(low1->started());
192 EXPECT_TRUE(low2->started()); 192 EXPECT_TRUE(low2->started());
193 EXPECT_TRUE(low4->started()); 193 EXPECT_TRUE(low4->started());
194 } 194 }
195 195
196 } // unnamed namespace 196 } // unnamed namespace
197 197
198 } // namespace content 198 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_scheduler.cc ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698