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

Unified Diff: sql/connection_unittest.cc

Issue 20022006: [sql] Use recover virtual table in sql::Recovery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « no previous file | sql/recovery.cc » ('j') | sql/recovery_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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+"));
Scott Hess - ex-Googler 2013/07/23 22:32:05 I had a case in SQLRecoveryTest where reading a bl
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()));
« no previous file with comments | « no previous file | sql/recovery.cc » ('j') | sql/recovery_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698