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

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

Issue 177923007: Move AppendFile and *CurrentDirectory to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « gin/shell/gin_main.cc ('k') | tools/gn/filesystem_utils.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 "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 4717 matching lines...) Expand 10 before | Expand all | Expand 10 after
4728 ASSERT_TRUE(test_server_.Start()); 4728 ASSERT_TRUE(test_server_.Start());
4729 4729
4730 TestDelegate d; 4730 TestDelegate d;
4731 { 4731 {
4732 URLRequest r( 4732 URLRequest r(
4733 test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_); 4733 test_server_.GetURL("echo"), DEFAULT_PRIORITY, &d, &default_context_);
4734 r.set_method("POST"); 4734 r.set_method("POST");
4735 4735
4736 base::FilePath dir; 4736 base::FilePath dir;
4737 PathService::Get(base::DIR_EXE, &dir); 4737 PathService::Get(base::DIR_EXE, &dir);
4738 file_util::SetCurrentDirectory(dir); 4738 base::SetCurrentDirectory(dir);
4739 4739
4740 ScopedVector<UploadElementReader> element_readers; 4740 ScopedVector<UploadElementReader> element_readers;
4741 4741
4742 base::FilePath path; 4742 base::FilePath path;
4743 PathService::Get(base::DIR_SOURCE_ROOT, &path); 4743 PathService::Get(base::DIR_SOURCE_ROOT, &path);
4744 path = path.Append(FILE_PATH_LITERAL("net")); 4744 path = path.Append(FILE_PATH_LITERAL("net"));
4745 path = path.Append(FILE_PATH_LITERAL("data")); 4745 path = path.Append(FILE_PATH_LITERAL("data"));
4746 path = path.Append(FILE_PATH_LITERAL("url_request_unittest")); 4746 path = path.Append(FILE_PATH_LITERAL("url_request_unittest"));
4747 path = path.Append(FILE_PATH_LITERAL("with-headers.html")); 4747 path = path.Append(FILE_PATH_LITERAL("with-headers.html"));
4748 element_readers.push_back( 4748 element_readers.push_back(
(...skipping 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after
7593 7593
7594 EXPECT_FALSE(r.is_pending()); 7594 EXPECT_FALSE(r.is_pending());
7595 EXPECT_EQ(1, d->response_started_count()); 7595 EXPECT_EQ(1, d->response_started_count());
7596 EXPECT_FALSE(d->received_data_before_response()); 7596 EXPECT_FALSE(d->received_data_before_response());
7597 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7597 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7598 } 7598 }
7599 } 7599 }
7600 #endif // !defined(DISABLE_FTP_SUPPORT) 7600 #endif // !defined(DISABLE_FTP_SUPPORT)
7601 7601
7602 } // namespace net 7602 } // namespace net
OLDNEW
« no previous file with comments | « gin/shell/gin_main.cc ('k') | tools/gn/filesystem_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698