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

Side by Side Diff: sql/connection_unittest.cc

Issue 18286004: Move PathExists to base namespace. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sql/connection.cc ('k') | third_party/leveldatabase/env_chromium.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 "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
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 }
OLDNEW
« no previous file with comments | « sql/connection.cc ('k') | third_party/leveldatabase/env_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698