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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 379293002: Add AssertNoURLRequests() to URLRequestContext subclass destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to two omitted subclasses of subclasses of URLRequestContext. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/public/test/mock_blob_url_request_context.cc ('k') | net/spdy/spdy_test_util_common.cc » ('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 (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 "net/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 network_session.get(), HttpCache::DefaultBackend::InMemory(0))); 78 network_session.get(), HttpCache::DefaultBackend::InMemory(0)));
79 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); 79 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl();
80 #if !defined(DISABLE_FILE_SUPPORT) 80 #if !defined(DISABLE_FILE_SUPPORT)
81 job_factory->SetProtocolHandler( 81 job_factory->SetProtocolHandler(
82 "file", new FileProtocolHandler(base::MessageLoopProxy::current())); 82 "file", new FileProtocolHandler(base::MessageLoopProxy::current()));
83 #endif 83 #endif
84 storage_.set_job_factory(job_factory); 84 storage_.set_job_factory(job_factory);
85 } 85 }
86 86
87 virtual ~RequestContext() { 87 virtual ~RequestContext() {
88 AssertNoURLRequests();
88 } 89 }
89 90
90 private: 91 private:
91 URLRequestContextStorage storage_; 92 URLRequestContextStorage storage_;
92 }; 93 };
93 94
94 #if !defined(DISABLE_FILE_SUPPORT) 95 #if !defined(DISABLE_FILE_SUPPORT)
95 // Get a file:// url relative to net/data/proxy/proxy_script_fetcher_unittest. 96 // Get a file:// url relative to net/data/proxy/proxy_script_fetcher_unittest.
96 GURL GetTestFileUrl(const std::string& relpath) { 97 GURL GetTestFileUrl(const std::string& relpath) {
97 base::FilePath path; 98 base::FilePath path;
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 { 484 {
484 GURL url(kEncodedUrlBroken); 485 GURL url(kEncodedUrlBroken);
485 base::string16 text; 486 base::string16 text;
486 TestCompletionCallback callback; 487 TestCompletionCallback callback;
487 int result = pac_fetcher.Fetch(url, &text, callback.callback()); 488 int result = pac_fetcher.Fetch(url, &text, callback.callback());
488 EXPECT_EQ(ERR_FAILED, result); 489 EXPECT_EQ(ERR_FAILED, result);
489 } 490 }
490 } 491 }
491 492
492 } // namespace net 493 } // namespace net
OLDNEW
« no previous file with comments | « content/public/test/mock_blob_url_request_context.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698