Index: sql/connection_unittest.cc |
diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc |
index 58dedbc8b1bd6fd9cecfd215c4db77f066c9276d..09a47fb47fddca6f0954608a1a9d95ff52f11711 100644 |
--- a/sql/connection_unittest.cc |
+++ b/sql/connection_unittest.cc |
@@ -425,7 +425,7 @@ TEST_F(SQLConnectionTest, RazeEmptyDB) { |
db().Close(); |
{ |
- file_util::ScopedFILE file(file_util::OpenFile(db_path(), "r+")); |
+ file_util::ScopedFILE file(file_util::OpenFile(db_path(), "rb+")); |
ASSERT_TRUE(file.get() != NULL); |
ASSERT_EQ(0, fseek(file.get(), 0, SEEK_SET)); |
ASSERT_TRUE(file_util::TruncateFile(file.get())); |
@@ -443,7 +443,7 @@ TEST_F(SQLConnectionTest, RazeNOTADB) { |
ASSERT_FALSE(base::PathExists(db_path())); |
{ |
- file_util::ScopedFILE file(file_util::OpenFile(db_path(), "w")); |
+ file_util::ScopedFILE file(file_util::OpenFile(db_path(), "wb")); |
ASSERT_TRUE(file.get() != NULL); |
const char* kJunk = "This is the hour of our discontent."; |
@@ -476,7 +476,7 @@ TEST_F(SQLConnectionTest, RazeNOTADB2) { |
db().Close(); |
{ |
- file_util::ScopedFILE file(file_util::OpenFile(db_path(), "r+")); |
+ file_util::ScopedFILE file(file_util::OpenFile(db_path(), "rb+")); |
ASSERT_TRUE(file.get() != NULL); |
ASSERT_EQ(0, fseek(file.get(), 0, SEEK_SET)); |
@@ -526,7 +526,7 @@ TEST_F(SQLConnectionTest, RazeCallbackReopen) { |
// Trim a single page from the end of the file. |
{ |
- file_util::ScopedFILE file(file_util::OpenFile(db_path(), "r+")); |
+ file_util::ScopedFILE file(file_util::OpenFile(db_path(), "rb+")); |
ASSERT_TRUE(file.get() != NULL); |
ASSERT_EQ(0, fseek(file.get(), -page_size, SEEK_END)); |
ASSERT_TRUE(file_util::TruncateFile(file.get())); |