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

Unified Diff: webkit/dom_storage/dom_storage_context_unittest.cc

Issue 9999021: Don't hardcode the "Local Storage" directory name in DomStorageContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased better. Created 8 years, 8 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 | « webkit/dom_storage/dom_storage_context.cc ('k') | webkit/tools/test_shell/simple_dom_storage_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_context_unittest.cc
diff --git a/webkit/dom_storage/dom_storage_context_unittest.cc b/webkit/dom_storage/dom_storage_context_unittest.cc
index d83dbde79538734f2911d059087c5191fc79a670..da6a2ad970d0aa14608be1cd5cd54cf03ec6c38c 100644
--- a/webkit/dom_storage/dom_storage_context_unittest.cc
+++ b/webkit/dom_storage/dom_storage_context_unittest.cc
@@ -42,6 +42,7 @@ class DomStorageContextTest : public testing::Test {
task_runner_ = new MockDomStorageTaskRunner(
base::MessageLoopProxy::current());
context_ = new DomStorageContext(temp_dir_.path(),
+ FilePath(),
storage_policy_,
task_runner_);
}
@@ -53,7 +54,7 @@ class DomStorageContextTest : public testing::Test {
void VerifySingleOriginRemains(const GURL& origin) {
// Use a new instance to examine the contexts of temp_dir_.
scoped_refptr<DomStorageContext> context =
- new DomStorageContext(temp_dir_.path(), NULL, NULL);
+ new DomStorageContext(temp_dir_.path(), FilePath(), NULL, NULL);
std::vector<DomStorageContext::UsageInfo> infos;
context->GetUsageInfo(&infos, kDontIncludeFileInfo);
EXPECT_EQ(1u, infos.size());
@@ -72,7 +73,8 @@ TEST_F(DomStorageContextTest, Basics) {
// This test doesn't do much, checks that the constructor
// initializes members properly and that invoking methods
// on a newly created object w/o any data on disk do no harm.
- EXPECT_EQ(temp_dir_.path(), context_->directory());
+ EXPECT_EQ(temp_dir_.path(), context_->localstorage_directory());
+ EXPECT_EQ(FilePath(), context_->sessionstorage_directory());
EXPECT_EQ(storage_policy_.get(), context_->special_storage_policy_.get());
context_->PurgeMemory();
context_->DeleteOrigin(GURL("http://chromium.org/"));
@@ -106,7 +108,7 @@ TEST_F(DomStorageContextTest, UsageInfo) {
// Create a new context that points to the same directory, see that
// it knows about the origin that we stored data for.
- context_ = new DomStorageContext(temp_dir_.path(), NULL, NULL);
+ context_ = new DomStorageContext(temp_dir_.path(), FilePath(), NULL, NULL);
context_->GetUsageInfo(&infos, kDontIncludeFileInfo);
EXPECT_EQ(1u, infos.size());
EXPECT_EQ(kOrigin, infos[0].origin);
@@ -178,4 +180,3 @@ TEST_F(DomStorageContextTest, SaveSessionState) {
}
} // namespace dom_storage
-
« no previous file with comments | « webkit/dom_storage/dom_storage_context.cc ('k') | webkit/tools/test_shell/simple_dom_storage_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698