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

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

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void ChangeRequestPriority(TestRequest* request, 191 void ChangeRequestPriority(TestRequest* request,
192 net::RequestPriority new_priority, 192 net::RequestPriority new_priority,
193 int intra_priority = 0) { 193 int intra_priority = 0) {
194 scoped_refptr<FakeResourceMessageFilter> filter( 194 scoped_refptr<FakeResourceMessageFilter> filter(
195 new FakeResourceMessageFilter(kChildId)); 195 new FakeResourceMessageFilter(kChildId));
196 const ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest( 196 const ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(
197 request->url_request()); 197 request->url_request());
198 const GlobalRequestID& id = info->GetGlobalRequestID(); 198 const GlobalRequestID& id = info->GetGlobalRequestID();
199 ResourceHostMsg_DidChangePriority msg(id.request_id, new_priority, 199 ResourceHostMsg_DidChangePriority msg(id.request_id, new_priority,
200 intra_priority); 200 intra_priority);
201 bool ok = false; 201 rdh_.OnMessageReceived(msg, filter.get());
202 rdh_.OnMessageReceived(msg, filter.get(), &ok);
203 EXPECT_TRUE(ok);
204 } 202 }
205 203
206 int next_request_id_; 204 int next_request_id_;
207 base::MessageLoopForIO message_loop_; 205 base::MessageLoopForIO message_loop_;
208 BrowserThreadImpl ui_thread_; 206 BrowserThreadImpl ui_thread_;
209 BrowserThreadImpl io_thread_; 207 BrowserThreadImpl io_thread_;
210 ResourceDispatcherHostImpl rdh_; 208 ResourceDispatcherHostImpl rdh_;
211 ResourceScheduler scheduler_; 209 ResourceScheduler scheduler_;
212 net::HttpServerPropertiesImpl http_server_properties_; 210 net::HttpServerPropertiesImpl http_server_properties_;
213 net::TestURLRequestContext context_; 211 net::TestURLRequestContext context_;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 http_server_properties_.SetSupportsSpdy( 527 http_server_properties_.SetSupportsSpdy(
530 net::HostPortPair("spdyhost2", 8080), true); 528 net::HostPortPair("spdyhost2", 8080), true);
531 ChangeRequestPriority(low2_spdy.get(), net::LOWEST); 529 ChangeRequestPriority(low2_spdy.get(), net::LOWEST);
532 scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST)); 530 scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
533 EXPECT_TRUE(low2->started()); 531 EXPECT_TRUE(low2->started());
534 } 532 }
535 533
536 } // unnamed namespace 534 } // unnamed namespace
537 535
538 } // namespace content 536 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_scheduler_filter.cc ('k') | content/browser/media/android/browser_demuxer_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698