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

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

Issue 7827033: Introduce net::HttpServerPropertiesManager to manage server-specific properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 private: 247 private:
248 mutable URLRequestJob* main_intercept_job_; 248 mutable URLRequestJob* main_intercept_job_;
249 }; 249 };
250 250
251 // Inherit PlatformTest since we require the autorelease pool on Mac OS X.f 251 // Inherit PlatformTest since we require the autorelease pool on Mac OS X.f
252 class URLRequestTest : public PlatformTest { 252 class URLRequestTest : public PlatformTest {
253 public: 253 public:
254 URLRequestTest() : default_context_(new TestURLRequestContext(true)) { 254 URLRequestTest() : default_context_(new TestURLRequestContext(true)) {
255 default_context_->set_network_delegate(&default_network_delegate_); 255 default_context_->set_network_delegate(&default_network_delegate_);
256 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for
willchan no longer on Chromium 2011/10/07 19:15:46 This TODO doesn't make sense, since net/ has no co
ramant (doing other things) 2011/10/08 21:51:40 Done.
257 // the system URLRequestContext too. There's no reason this should be tied
258 // to a profile.
256 default_context_->Init(); 259 default_context_->Init();
257 } 260 }
258 261
259 static void SetUpTestCase() { 262 static void SetUpTestCase() {
260 URLRequest::AllowFileAccess(); 263 URLRequest::AllowFileAccess();
261 } 264 }
262 265
263 // Adds the TestJobInterceptor to the default context. 266 // Adds the TestJobInterceptor to the default context.
264 TestJobInterceptor* AddTestInterceptor() { 267 TestJobInterceptor* AddTestInterceptor() {
265 TestJobInterceptor* interceptor = new TestJobInterceptor(); 268 TestJobInterceptor* interceptor = new TestJobInterceptor();
(...skipping 3306 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 req.SetExtraRequestHeaders(headers); 3575 req.SetExtraRequestHeaders(headers);
3573 req.Start(); 3576 req.Start();
3574 MessageLoop::current()->Run(); 3577 MessageLoop::current()->Run();
3575 // If the net tests are being run with ChromeFrame then we need to allow for 3578 // If the net tests are being run with ChromeFrame then we need to allow for
3576 // the 'chromeframe' suffix which is added to the user agent before the 3579 // the 'chromeframe' suffix which is added to the user agent before the
3577 // closing parentheses. 3580 // closing parentheses.
3578 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true)); 3581 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true));
3579 } 3582 }
3580 3583
3581 } // namespace net 3584 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698