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

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

Issue 10068021: Fix file access on Chrome for ChromeOS on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang problem Created 8 years, 8 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #endif 10 #endif
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 // Inherit PlatformTest since we require the autorelease pool on Mac OS X.f 406 // Inherit PlatformTest since we require the autorelease pool on Mac OS X.f
407 class URLRequestTest : public PlatformTest { 407 class URLRequestTest : public PlatformTest {
408 public: 408 public:
409 URLRequestTest() : default_context_(new TestURLRequestContext(true)) { 409 URLRequestTest() : default_context_(new TestURLRequestContext(true)) {
410 default_context_->set_network_delegate(&default_network_delegate_); 410 default_context_->set_network_delegate(&default_network_delegate_);
411 default_context_->Init(); 411 default_context_->Init();
412 } 412 }
413 413
414 static void SetUpTestCase() { 414 static void SetUpTestCase() {
415 URLRequest::AllowFileAccess(); 415 URLRequest::AllowAccessToAllFiles();
416 } 416 }
417 417
418 // Adds the TestJobInterceptor to the default context. 418 // Adds the TestJobInterceptor to the default context.
419 TestJobInterceptor* AddTestInterceptor() { 419 TestJobInterceptor* AddTestInterceptor() {
420 TestJobInterceptor* interceptor = new TestJobInterceptor(); 420 TestJobInterceptor* interceptor = new TestJobInterceptor();
421 default_context_->set_job_factory(&job_factory_); 421 default_context_->set_job_factory(&job_factory_);
422 job_factory_.AddInterceptor(interceptor); 422 job_factory_.AddInterceptor(interceptor);
423 return interceptor; 423 return interceptor;
424 } 424 }
425 425
(...skipping 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4562 req.SetExtraRequestHeaders(headers); 4562 req.SetExtraRequestHeaders(headers);
4563 req.Start(); 4563 req.Start();
4564 MessageLoop::current()->Run(); 4564 MessageLoop::current()->Run();
4565 // If the net tests are being run with ChromeFrame then we need to allow for 4565 // If the net tests are being run with ChromeFrame then we need to allow for
4566 // the 'chromeframe' suffix which is added to the user agent before the 4566 // the 'chromeframe' suffix which is added to the user agent before the
4567 // closing parentheses. 4567 // closing parentheses.
4568 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true)); 4568 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true));
4569 } 4569 }
4570 4570
4571 } // namespace net 4571 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698