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

Unified Diff: webkit/dom_storage/dom_storage_context_unittest.cc

Issue 10447117: Unwire the clear on exit preference from the storage systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 7 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
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 da6a2ad970d0aa14608be1cd5cd54cf03ec6c38c..41a2654165f0cd6bb96e0e185ece151a7ac3162c 100644
--- a/webkit/dom_storage/dom_storage_context_unittest.cc
+++ b/webkit/dom_storage/dom_storage_context_unittest.cc
@@ -142,26 +142,7 @@ TEST_F(DomStorageContextTest, SessionOnly) {
VerifySingleOriginRemains(kOrigin);
}
-TEST_F(DomStorageContextTest, ClearLocalState) {
- const GURL kProtectedOrigin("http://www.protected.com/");
- storage_policy_->AddProtected(kProtectedOrigin);
-
- // Store data for a normal and a protected origin, setup shutdown options
- // to clear normal local state, then shutdown and let things flush.
- NullableString16 old_value;
- EXPECT_TRUE(context_->GetStorageNamespace(kLocalStorageNamespaceId)->
- OpenStorageArea(kOrigin)->SetItem(kKey, kValue, &old_value));
- EXPECT_TRUE(context_->GetStorageNamespace(kLocalStorageNamespaceId)->
- OpenStorageArea(kProtectedOrigin)->SetItem(kKey, kValue, &old_value));
- context_->SetClearLocalState(true);
- context_->Shutdown();
- context_ = NULL;
- MessageLoop::current()->RunAllPending();
-
- VerifySingleOriginRemains(kProtectedOrigin);
-}
-
-TEST_F(DomStorageContextTest, SaveSessionState) {
+TEST_F(DomStorageContextTest, SetForceKeepSessionState) {
const GURL kSessionOnlyOrigin("http://www.sessiononly.com/");
storage_policy_->AddSessionOnly(kSessionOnlyOrigin);
@@ -170,8 +151,7 @@ TEST_F(DomStorageContextTest, SaveSessionState) {
NullableString16 old_value;
EXPECT_TRUE(context_->GetStorageNamespace(kLocalStorageNamespaceId)->
OpenStorageArea(kSessionOnlyOrigin)->SetItem(kKey, kValue, &old_value));
- context_->SetClearLocalState(true);
- context_->SaveSessionState(); // Should override clear behavior.
+ context_->SetForceKeepSessionState(); // Should override clear behavior.
context_->Shutdown();
context_ = NULL;
MessageLoop::current()->RunAllPending();

Powered by Google App Engine
This is Rietveld 408576698