| OLD | NEW |
| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "sql/connection.h" | 8 #include "sql/connection.h" |
| 9 #include "sql/meta_table.h" | 9 #include "sql/meta_table.h" |
| 10 #include "sql/statement.h" | 10 #include "sql/statement.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 } | 412 } |
| 413 #endif | 413 #endif |
| 414 | 414 |
| 415 TEST_F(SQLConnectionTest, Delete) { | 415 TEST_F(SQLConnectionTest, Delete) { |
| 416 EXPECT_TRUE(db().Execute("CREATE TABLE x (x)")); | 416 EXPECT_TRUE(db().Execute("CREATE TABLE x (x)")); |
| 417 db().Close(); | 417 db().Close(); |
| 418 | 418 |
| 419 // Should have both a main database file and a journal file because | 419 // Should have both a main database file and a journal file because |
| 420 // of journal_mode PERSIST. | 420 // of journal_mode PERSIST. |
| 421 base::FilePath journal(db_path().value() + FILE_PATH_LITERAL("-journal")); | 421 base::FilePath journal(db_path().value() + FILE_PATH_LITERAL("-journal")); |
| 422 ASSERT_TRUE(file_util::PathExists(db_path())); | 422 ASSERT_TRUE(base::PathExists(db_path())); |
| 423 ASSERT_TRUE(file_util::PathExists(journal)); | 423 ASSERT_TRUE(base::PathExists(journal)); |
| 424 | 424 |
| 425 sql::Connection::Delete(db_path()); | 425 sql::Connection::Delete(db_path()); |
| 426 EXPECT_FALSE(file_util::PathExists(db_path())); | 426 EXPECT_FALSE(base::PathExists(db_path())); |
| 427 EXPECT_FALSE(file_util::PathExists(journal)); | 427 EXPECT_FALSE(base::PathExists(journal)); |
| 428 } | 428 } |
| OLD | NEW |