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

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

Issue 2785523002: Reduce/remove usage of BrowserThread in content/browser/loader. (Closed)
Patch Set: Remove DCHECK Created 3 years, 8 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/DEPS ('k') | content/browser/loader/resource_dispatcher_host_impl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/async_resource_handler.h" 5 #include "content/browser/loader/async_resource_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 public: 94 public:
95 RecordingResourceMessageFilter(ResourceContext* resource_context, 95 RecordingResourceMessageFilter(ResourceContext* resource_context,
96 net::URLRequestContext* request_context) 96 net::URLRequestContext* request_context)
97 : ResourceMessageFilter( 97 : ResourceMessageFilter(
98 0, 98 0,
99 nullptr, 99 nullptr,
100 nullptr, 100 nullptr,
101 nullptr, 101 nullptr,
102 nullptr, 102 nullptr,
103 base::Bind(&RecordingResourceMessageFilter::GetContexts, 103 base::Bind(&RecordingResourceMessageFilter::GetContexts,
104 base::Unretained(this))), 104 base::Unretained(this)),
105 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)),
105 resource_context_(resource_context), 106 resource_context_(resource_context),
106 request_context_(request_context) { 107 request_context_(request_context) {
107 InitializeForTest(); 108 InitializeForTest();
108 set_peer_process_for_testing(base::Process::Current()); 109 set_peer_process_for_testing(base::Process::Current());
109 } 110 }
110 111
111 const std::vector<std::unique_ptr<IPC::Message>>& messages() const { 112 const std::vector<std::unique_ptr<IPC::Message>>& messages() const {
112 return messages_; 113 return messages_;
113 } 114 }
114 115
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 ResourceRequestCompletionStatus completion_status = 298 ResourceRequestCompletionStatus completion_status =
298 std::get<1>(completion_params); 299 std::get<1>(completion_params);
299 EXPECT_EQ(TotalReceivedBytes(kDataSize), 300 EXPECT_EQ(TotalReceivedBytes(kDataSize),
300 completion_status.encoded_data_length); 301 completion_status.encoded_data_length);
301 EXPECT_EQ(kDataSize, completion_status.encoded_body_length); 302 EXPECT_EQ(kDataSize, completion_status.encoded_body_length);
302 } 303 }
303 304
304 } // namespace 305 } // namespace
305 306
306 } // namespace content 307 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698