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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_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 (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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 host_.CancelRequestsForProcess(second_filter->child_id()); 1830 host_.CancelRequestsForProcess(second_filter->child_id());
1831 1831
1832 // Flush all the pending requests. 1832 // Flush all the pending requests.
1833 while (net::URLRequestTestJob::ProcessOnePendingMessage()) {} 1833 while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
1834 } 1834 }
1835 1835
1836 // Test the private helper method "CalculateApproximateMemoryCost()". 1836 // Test the private helper method "CalculateApproximateMemoryCost()".
1837 TEST_F(ResourceDispatcherHostTest, CalculateApproximateMemoryCost) { 1837 TEST_F(ResourceDispatcherHostTest, CalculateApproximateMemoryCost) {
1838 net::URLRequestContext context; 1838 net::URLRequestContext context;
1839 scoped_ptr<net::URLRequest> req(context.CreateRequest( 1839 scoped_ptr<net::URLRequest> req(context.CreateRequest(
1840 GURL("http://www.google.com"), net::DEFAULT_PRIORITY, NULL, NULL)); 1840 GURL("http://www.google.com"), net::DEFAULT_PRIORITY, NULL));
1841 EXPECT_EQ( 1841 EXPECT_EQ(
1842 4427, 1842 4427,
1843 ResourceDispatcherHostImpl::CalculateApproximateMemoryCost(req.get())); 1843 ResourceDispatcherHostImpl::CalculateApproximateMemoryCost(req.get()));
1844 1844
1845 // Add 9 bytes of referrer. 1845 // Add 9 bytes of referrer.
1846 req->SetReferrer("123456789"); 1846 req->SetReferrer("123456789");
1847 EXPECT_EQ( 1847 EXPECT_EQ(
1848 4436, 1848 4436,
1849 ResourceDispatcherHostImpl::CalculateApproximateMemoryCost(req.get())); 1849 ResourceDispatcherHostImpl::CalculateApproximateMemoryCost(req.get()));
1850 1850
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
3242 return nullptr; 3242 return nullptr;
3243 } 3243 }
3244 3244
3245 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( 3245 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse(
3246 net::URLRequest* request, 3246 net::URLRequest* request,
3247 net::NetworkDelegate* network_delegate) const { 3247 net::NetworkDelegate* network_delegate) const {
3248 return nullptr; 3248 return nullptr;
3249 } 3249 }
3250 3250
3251 } // namespace content 3251 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698