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

Side by Side Diff: net/url_request/url_request_job_factory_impl_unittest.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
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/url_request/url_request_job_factory_impl.h" 5 #include "net/url_request/url_request_job_factory_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "net/base/request_priority.h" 9 #include "net/base/request_priority.h"
10 #include "net/url_request/url_request.h" 10 #include "net/url_request/url_request.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 NotifyHeadersComplete(); 42 NotifyHeadersComplete();
43 } 43 }
44 44
45 URLRequestStatus status_; 45 URLRequestStatus status_;
46 base::WeakPtrFactory<MockURLRequestJob> weak_factory_; 46 base::WeakPtrFactory<MockURLRequestJob> weak_factory_;
47 }; 47 };
48 48
49 class DummyProtocolHandler : public URLRequestJobFactory::ProtocolHandler { 49 class DummyProtocolHandler : public URLRequestJobFactory::ProtocolHandler {
50 public: 50 public:
51 virtual URLRequestJob* MaybeCreateJob( 51 virtual URLRequestJob* MaybeCreateJob(
52 URLRequest* request, NetworkDelegate* network_delegate) const OVERRIDE { 52 URLRequest* request,
53 NetworkDelegate* network_delegate) const OVERRIDE {
53 return new MockURLRequestJob( 54 return new MockURLRequestJob(
54 request, 55 request,
55 network_delegate, 56 network_delegate,
56 URLRequestStatus(URLRequestStatus::SUCCESS, OK)); 57 URLRequestStatus(URLRequestStatus::SUCCESS, OK));
57 } 58 }
58 }; 59 };
59 60
60 TEST(URLRequestJobFactoryTest, NoProtocolHandler) { 61 TEST(URLRequestJobFactoryTest, NoProtocolHandler) {
61 TestDelegate delegate; 62 TestDelegate delegate;
62 TestURLRequestContext request_context; 63 TestURLRequestContext request_context;
(...skipping 25 matching lines...) Expand all
88 URLRequestJobFactoryImpl job_factory; 89 URLRequestJobFactoryImpl job_factory;
89 TestURLRequestContext request_context; 90 TestURLRequestContext request_context;
90 request_context.set_job_factory(&job_factory); 91 request_context.set_job_factory(&job_factory);
91 job_factory.SetProtocolHandler("foo", new DummyProtocolHandler); 92 job_factory.SetProtocolHandler("foo", new DummyProtocolHandler);
92 job_factory.SetProtocolHandler("foo", NULL); 93 job_factory.SetProtocolHandler("foo", NULL);
93 } 94 }
94 95
95 } // namespace 96 } // namespace
96 97
97 } // namespace net 98 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698