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

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

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/buffered_resource_handler.h" 5 #include "content/browser/loader/buffered_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/browser/loader/resource_dispatcher_host_impl.h" 10 #include "content/browser/loader/resource_dispatcher_host_impl.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 TestBrowserThreadBundle thread_bundle_; 170 TestBrowserThreadBundle thread_bundle_;
171 }; 171 };
172 172
173 bool BufferedResourceHandlerTest::TestStreamIsIntercepted( 173 bool BufferedResourceHandlerTest::TestStreamIsIntercepted(
174 bool allow_download, 174 bool allow_download,
175 bool must_download, 175 bool must_download,
176 ResourceType request_resource_type) { 176 ResourceType request_resource_type) {
177 net::URLRequestContext context; 177 net::URLRequestContext context;
178 scoped_ptr<net::URLRequest> request(context.CreateRequest( 178 scoped_ptr<net::URLRequest> request(context.CreateRequest(
179 GURL("http://www.google.com"), net::DEFAULT_PRIORITY, nullptr, nullptr)); 179 GURL("http://www.google.com"), net::DEFAULT_PRIORITY, nullptr));
180 bool is_main_frame = request_resource_type == RESOURCE_TYPE_MAIN_FRAME; 180 bool is_main_frame = request_resource_type == RESOURCE_TYPE_MAIN_FRAME;
181 ResourceRequestInfo::AllocateForTesting( 181 ResourceRequestInfo::AllocateForTesting(
182 request.get(), 182 request.get(),
183 request_resource_type, 183 request_resource_type,
184 nullptr, // context 184 nullptr, // context
185 0, // render_process_id 185 0, // render_process_id
186 0, // render_view_id 186 0, // render_view_id
187 0, // render_frame_id 187 0, // render_frame_id
188 is_main_frame, // is_main_frame 188 is_main_frame, // is_main_frame
189 false, // parent_is_main_frame 189 false, // parent_is_main_frame
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 allow_download = true; 277 allow_download = true;
278 must_download = false; 278 must_download = false;
279 resource_type = RESOURCE_TYPE_MAIN_FRAME; 279 resource_type = RESOURCE_TYPE_MAIN_FRAME;
280 EXPECT_FALSE( 280 EXPECT_FALSE(
281 TestStreamIsIntercepted(allow_download, must_download, resource_type)); 281 TestStreamIsIntercepted(allow_download, must_download, resource_type));
282 } 282 }
283 283
284 } // namespace 284 } // namespace
285 285
286 } // namespace content 286 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/loader/navigation_url_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698