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

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

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 path = path.Append(FILE_PATH_LITERAL("url_request_unittest")); 1002 path = path.Append(FILE_PATH_LITERAL("url_request_unittest"));
1003 1003
1004 TestDelegate d; 1004 TestDelegate d;
1005 URLRequest req( 1005 URLRequest req(
1006 FilePathToFileURL(path), DEFAULT_PRIORITY, &d, &default_context_); 1006 FilePathToFileURL(path), DEFAULT_PRIORITY, &d, &default_context_);
1007 req.Start(); 1007 req.Start();
1008 base::RunLoop().Run(); 1008 base::RunLoop().Run();
1009 1009
1010 // Generate entry for the sentinel file. 1010 // Generate entry for the sentinel file.
1011 base::FilePath sentinel_path = path.AppendASCII(sentinel_name); 1011 base::FilePath sentinel_path = path.AppendASCII(sentinel_name);
1012 base::PlatformFileInfo info; 1012 base::File::Info info;
1013 EXPECT_TRUE(base::GetFileInfo(sentinel_path, &info)); 1013 EXPECT_TRUE(base::GetFileInfo(sentinel_path, &info));
1014 EXPECT_GT(info.size, 0); 1014 EXPECT_GT(info.size, 0);
1015 std::string sentinel_output = GetDirectoryListingEntry( 1015 std::string sentinel_output = GetDirectoryListingEntry(
1016 base::string16(sentinel_name, sentinel_name + strlen(sentinel_name)), 1016 base::string16(sentinel_name, sentinel_name + strlen(sentinel_name)),
1017 std::string(sentinel_name), 1017 std::string(sentinel_name),
1018 false /* is_dir */, 1018 false /* is_dir */,
1019 info.size, 1019 info.size,
1020 info.last_modified); 1020 info.last_modified);
1021 1021
1022 ASSERT_LT(0, d.bytes_received()); 1022 ASSERT_LT(0, d.bytes_received());
(...skipping 6458 matching lines...) Expand 10 before | Expand all | Expand 10 after
7481 7481
7482 EXPECT_FALSE(r.is_pending()); 7482 EXPECT_FALSE(r.is_pending());
7483 EXPECT_EQ(1, d->response_started_count()); 7483 EXPECT_EQ(1, d->response_started_count());
7484 EXPECT_FALSE(d->received_data_before_response()); 7484 EXPECT_FALSE(d->received_data_before_response());
7485 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7485 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7486 } 7486 }
7487 } 7487 }
7488 #endif // !defined(DISABLE_FTP_SUPPORT) 7488 #endif // !defined(DISABLE_FTP_SUPPORT)
7489 7489
7490 } // namespace net 7490 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_file_job.cc ('k') | remoting/host/pairing_registry_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698