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

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

Issue 2164113002: Remove ResourceHandler::OnBeforeNetworkStart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oops Created 4 years, 5 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 bool OnWillStart(const GURL& url, bool* defer) override { 345 bool OnWillStart(const GURL& url, bool* defer) override {
346 EXPECT_TRUE(start_url_.is_empty()); 346 EXPECT_TRUE(start_url_.is_empty());
347 start_url_ = url; 347 start_url_ = url;
348 if (defer_request_on_will_start_) { 348 if (defer_request_on_will_start_) {
349 *defer = true; 349 *defer = true;
350 deferred_run_loop_.Quit(); 350 deferred_run_loop_.Quit();
351 } 351 }
352 return true; 352 return true;
353 } 353 }
354 354
355 bool OnBeforeNetworkStart(const GURL& url, bool* defer) override {
356 return true;
357 }
358
359 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, 355 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
360 int* buf_size, 356 int* buf_size,
361 int min_size) override { 357 int min_size) override {
362 EXPECT_TRUE(expect_reads_); 358 EXPECT_TRUE(expect_reads_);
363 EXPECT_FALSE(received_on_will_read_); 359 EXPECT_FALSE(received_on_will_read_);
364 EXPECT_FALSE(received_eof_); 360 EXPECT_FALSE(received_eof_);
365 EXPECT_FALSE(received_response_completed_); 361 EXPECT_FALSE(received_response_completed_);
366 362
367 *buf = read_buffer_; 363 *buf = read_buffer_;
368 *buf_size = kReadBufSize; 364 *buf_size = kReadBufSize;
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 1228
1233 // Tests that the effective connection type is not set on non-main frame 1229 // Tests that the effective connection type is not set on non-main frame
1234 // requests. 1230 // requests.
1235 TEST_F(EffectiveConnectionTypeResourceLoaderTest, NotAMainFrame) { 1231 TEST_F(EffectiveConnectionTypeResourceLoaderTest, NotAMainFrame) {
1236 VerifyEffectiveConnectionType( 1232 VerifyEffectiveConnectionType(
1237 false, net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G, 1233 false, net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G,
1238 net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_UNKNOWN); 1234 net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_UNKNOWN);
1239 } 1235 }
1240 1236
1241 } // namespace content 1237 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_handler.h ('k') | content/browser/loader/stream_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698