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

Unified Diff: webkit/fileapi/local_file_stream_writer_unittest.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/local_file_stream_writer.cc ('k') | webkit/fileapi/local_file_system_operation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/local_file_stream_writer_unittest.cc
diff --git a/webkit/fileapi/local_file_stream_writer_unittest.cc b/webkit/fileapi/local_file_stream_writer_unittest.cc
index 3fda6d62324a2027a032bb68739a44d2eca83860..d67a7daba9636779313d830431a612cddddee8cd 100644
--- a/webkit/fileapi/local_file_stream_writer_unittest.cc
+++ b/webkit/fileapi/local_file_stream_writer_unittest.cc
@@ -29,7 +29,7 @@ class LocalFileStreamWriterTest : public testing::Test {
}
protected:
- FilePath Path(const std::string& name) {
+ base::FilePath Path(const std::string& name) {
return temp_dir_.path().AppendASCII(name);
}
@@ -52,15 +52,15 @@ class LocalFileStreamWriterTest : public testing::Test {
return net::OK;
}
- std::string GetFileContent(const FilePath& path) {
+ std::string GetFileContent(const base::FilePath& path) {
std::string content;
file_util::ReadFileToString(path, &content);
return content;
}
- FilePath CreateFileWithContent(const std::string& name,
+ base::FilePath CreateFileWithContent(const std::string& name,
const std::string& data) {
- FilePath path = Path(name);
+ base::FilePath path = Path(name);
file_util::WriteFile(path, data.c_str(), data.size());
return path;
}
@@ -77,7 +77,7 @@ void NeverCalled(int unused) {
} // namespace
TEST_F(LocalFileStreamWriterTest, Write) {
- FilePath path = CreateFileWithContent("file_a", "");
+ base::FilePath path = CreateFileWithContent("file_a", "");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "bar"));
@@ -88,7 +88,7 @@ TEST_F(LocalFileStreamWriterTest, Write) {
}
TEST_F(LocalFileStreamWriterTest, WriteMiddle) {
- FilePath path = CreateFileWithContent("file_a", "foobar");
+ base::FilePath path = CreateFileWithContent("file_a", "foobar");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 2));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
@@ -98,7 +98,7 @@ TEST_F(LocalFileStreamWriterTest, WriteMiddle) {
}
TEST_F(LocalFileStreamWriterTest, WriteEnd) {
- FilePath path = CreateFileWithContent("file_a", "foobar");
+ base::FilePath path = CreateFileWithContent("file_a", "foobar");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 6));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
@@ -108,7 +108,7 @@ TEST_F(LocalFileStreamWriterTest, WriteEnd) {
}
TEST_F(LocalFileStreamWriterTest, WriteFailForNonexistingFile) {
- FilePath path = Path("file_a");
+ base::FilePath path = Path("file_a");
ASSERT_FALSE(file_util::PathExists(path));
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::ERR_FILE_NOT_FOUND, WriteStringToWriter(writer.get(), "foo"));
@@ -118,7 +118,7 @@ TEST_F(LocalFileStreamWriterTest, WriteFailForNonexistingFile) {
}
TEST_F(LocalFileStreamWriterTest, CancelBeforeOperation) {
- FilePath path = Path("file_a");
+ base::FilePath path = Path("file_a");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
// Cancel immediately fails when there's no in-flight operation.
int cancel_result = writer->Cancel(base::Bind(&NeverCalled));
@@ -126,7 +126,7 @@ TEST_F(LocalFileStreamWriterTest, CancelBeforeOperation) {
}
TEST_F(LocalFileStreamWriterTest, CancelAfterFinishedOperation) {
- FilePath path = CreateFileWithContent("file_a", "");
+ base::FilePath path = CreateFileWithContent("file_a", "");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
@@ -142,7 +142,7 @@ TEST_F(LocalFileStreamWriterTest, CancelAfterFinishedOperation) {
}
TEST_F(LocalFileStreamWriterTest, CancelWrite) {
- FilePath path = CreateFileWithContent("file_a", "foobar");
+ base::FilePath path = CreateFileWithContent("file_a", "foobar");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
scoped_refptr<net::StringIOBuffer> buffer(new net::StringIOBuffer("xxx"));
« no previous file with comments | « webkit/fileapi/local_file_stream_writer.cc ('k') | webkit/fileapi/local_file_system_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698