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

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

Issue 105293002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 1001
1002 TestDelegate d; 1002 TestDelegate d;
1003 URLRequest req( 1003 URLRequest req(
1004 FilePathToFileURL(path), DEFAULT_PRIORITY, &d, &default_context_); 1004 FilePathToFileURL(path), DEFAULT_PRIORITY, &d, &default_context_);
1005 req.Start(); 1005 req.Start();
1006 base::RunLoop().Run(); 1006 base::RunLoop().Run();
1007 1007
1008 // Generate entry for the sentinel file. 1008 // Generate entry for the sentinel file.
1009 base::FilePath sentinel_path = path.AppendASCII(sentinel_name); 1009 base::FilePath sentinel_path = path.AppendASCII(sentinel_name);
1010 base::PlatformFileInfo info; 1010 base::PlatformFileInfo info;
1011 EXPECT_TRUE(file_util::GetFileInfo(sentinel_path, &info)); 1011 EXPECT_TRUE(base::GetFileInfo(sentinel_path, &info));
1012 EXPECT_GT(info.size, 0); 1012 EXPECT_GT(info.size, 0);
1013 std::string sentinel_output = GetDirectoryListingEntry( 1013 std::string sentinel_output = GetDirectoryListingEntry(
1014 base::string16(sentinel_name, sentinel_name + strlen(sentinel_name)), 1014 base::string16(sentinel_name, sentinel_name + strlen(sentinel_name)),
1015 std::string(sentinel_name), 1015 std::string(sentinel_name),
1016 false /* is_dir */, 1016 false /* is_dir */,
1017 info.size, 1017 info.size,
1018 info.last_modified); 1018 info.last_modified);
1019 1019
1020 ASSERT_LT(0, d.bytes_received()); 1020 ASSERT_LT(0, d.bytes_received());
1021 ASSERT_FALSE(d.request_failed()); 1021 ASSERT_FALSE(d.request_failed());
(...skipping 6322 matching lines...) Expand 10 before | Expand all | Expand 10 after
7344 7344
7345 EXPECT_FALSE(r.is_pending()); 7345 EXPECT_FALSE(r.is_pending());
7346 EXPECT_EQ(1, d->response_started_count()); 7346 EXPECT_EQ(1, d->response_started_count());
7347 EXPECT_FALSE(d->received_data_before_response()); 7347 EXPECT_FALSE(d->received_data_before_response());
7348 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7348 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7349 } 7349 }
7350 } 7350 }
7351 #endif // !defined(DISABLE_FTP_SUPPORT) 7351 #endif // !defined(DISABLE_FTP_SUPPORT)
7352 7352
7353 } // namespace net 7353 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_file_job.cc ('k') | remoting/host/policy_hack/policy_watcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698