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

Side by Side Diff: webkit/browser/quota/quota_database_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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 21 matching lines...) Expand all
32 typedef QuotaDatabase::QuotaTableEntry QuotaTableEntry; 32 typedef QuotaDatabase::QuotaTableEntry QuotaTableEntry;
33 typedef QuotaDatabase::QuotaTableCallback QuotaTableCallback; 33 typedef QuotaDatabase::QuotaTableCallback QuotaTableCallback;
34 typedef QuotaDatabase::OriginInfoTableCallback 34 typedef QuotaDatabase::OriginInfoTableCallback
35 OriginInfoTableCallback; 35 OriginInfoTableCallback;
36 36
37 void LazyOpen(const base::FilePath& kDbFile) { 37 void LazyOpen(const base::FilePath& kDbFile) {
38 QuotaDatabase db(kDbFile); 38 QuotaDatabase db(kDbFile);
39 EXPECT_FALSE(db.LazyOpen(false)); 39 EXPECT_FALSE(db.LazyOpen(false));
40 ASSERT_TRUE(db.LazyOpen(true)); 40 ASSERT_TRUE(db.LazyOpen(true));
41 EXPECT_TRUE(db.db_.get()); 41 EXPECT_TRUE(db.db_.get());
42 EXPECT_TRUE(kDbFile.empty() || file_util::PathExists(kDbFile)); 42 EXPECT_TRUE(kDbFile.empty() || base::PathExists(kDbFile));
43 } 43 }
44 44
45 void UpgradeSchemaV2toV3(const base::FilePath& kDbFile) { 45 void UpgradeSchemaV2toV3(const base::FilePath& kDbFile) {
46 const QuotaTableEntry entries[] = { 46 const QuotaTableEntry entries[] = {
47 QuotaTableEntry("a", kStorageTypeTemporary, 1), 47 QuotaTableEntry("a", kStorageTypeTemporary, 1),
48 QuotaTableEntry("b", kStorageTypeTemporary, 2), 48 QuotaTableEntry("b", kStorageTypeTemporary, 2),
49 QuotaTableEntry("c", kStorageTypePersistent, 3), 49 QuotaTableEntry("c", kStorageTypePersistent, 3),
50 }; 50 };
51 51
52 CreateV2Database(kDbFile, entries, ARRAYSIZE_UNSAFE(entries)); 52 CreateV2Database(kDbFile, entries, ARRAYSIZE_UNSAFE(entries));
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 } 558 }
559 559
560 TEST_F(QuotaDatabaseTest, DumpOriginInfoTable) { 560 TEST_F(QuotaDatabaseTest, DumpOriginInfoTable) {
561 base::ScopedTempDir data_dir; 561 base::ScopedTempDir data_dir;
562 ASSERT_TRUE(data_dir.CreateUniqueTempDir()); 562 ASSERT_TRUE(data_dir.CreateUniqueTempDir());
563 const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db") ; 563 const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db") ;
564 DumpOriginInfoTable(kDbFile); 564 DumpOriginInfoTable(kDbFile);
565 DumpOriginInfoTable(base::FilePath()); 565 DumpOriginInfoTable(base::FilePath());
566 } 566 }
567 } // namespace quota 567 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/browser/quota/quota_database.cc ('k') | webkit/common/blob/shareable_file_reference_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698