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

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

Issue 109043002: 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
« no previous file with comments | « net/tools/dump_cache/cache_dumper.cc ('k') | skia/ext/vector_canvas_unittest.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 4708 matching lines...) Expand 10 before | Expand all | Expand 10 after
4719 4719
4720 r.Start(); 4720 r.Start();
4721 EXPECT_TRUE(r.is_pending()); 4721 EXPECT_TRUE(r.is_pending());
4722 4722
4723 base::RunLoop().Run(); 4723 base::RunLoop().Run();
4724 4724
4725 int64 size = 0; 4725 int64 size = 0;
4726 ASSERT_EQ(true, base::GetFileSize(path, &size)); 4726 ASSERT_EQ(true, base::GetFileSize(path, &size));
4727 scoped_ptr<char[]> buf(new char[size]); 4727 scoped_ptr<char[]> buf(new char[size]);
4728 4728
4729 ASSERT_EQ(size, file_util::ReadFile(path, buf.get(), size)); 4729 ASSERT_EQ(size, base::ReadFile(path, buf.get(), size));
4730 4730
4731 ASSERT_EQ(1, d.response_started_count()) 4731 ASSERT_EQ(1, d.response_started_count())
4732 << "request failed: " << r.status().status() 4732 << "request failed: " << r.status().status()
4733 << ", error: " << r.status().error(); 4733 << ", error: " << r.status().error();
4734 4734
4735 EXPECT_FALSE(d.received_data_before_response()); 4735 EXPECT_FALSE(d.received_data_before_response());
4736 4736
4737 EXPECT_EQ(size, d.bytes_received()); 4737 EXPECT_EQ(size, d.bytes_received());
4738 EXPECT_EQ(std::string(&buf[0], size), d.data_received()); 4738 EXPECT_EQ(std::string(&buf[0], size), d.data_received());
4739 } 4739 }
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after
7341 7341
7342 EXPECT_FALSE(r.is_pending()); 7342 EXPECT_FALSE(r.is_pending());
7343 EXPECT_EQ(1, d->response_started_count()); 7343 EXPECT_EQ(1, d->response_started_count());
7344 EXPECT_FALSE(d->received_data_before_response()); 7344 EXPECT_FALSE(d->received_data_before_response());
7345 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7345 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7346 } 7346 }
7347 } 7347 }
7348 #endif // !defined(DISABLE_FTP_SUPPORT) 7348 #endif // !defined(DISABLE_FTP_SUPPORT)
7349 7349
7350 } // namespace net 7350 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/dump_cache/cache_dumper.cc ('k') | skia/ext/vector_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698