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

Unified Diff: ios/net/cookies/cookie_store_ios_unittest.mm

Issue 1616443003: Add FlushStore to CookieStore interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cookie_monster3
Patch Set: Fix ios Created 4 years, 11 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: ios/net/cookies/cookie_store_ios_unittest.mm
diff --git a/ios/net/cookies/cookie_store_ios_unittest.mm b/ios/net/cookies/cookie_store_ios_unittest.mm
index 7271abd6d7f08f860d62fcba2c3476adccd67db6..2180a29533d6490edc5114ee8680e1950e575c83 100644
--- a/ios/net/cookies/cookie_store_ios_unittest.mm
+++ b/ios/net/cookies/cookie_store_ios_unittest.mm
@@ -132,6 +132,11 @@ class RoundTripTestCookieStore : public net::CookieStore {
store_->DeleteSessionCookiesAsync(callback);
}
+ void FlushStore(const base::Closure& callback) override {
+ RoundTrip();
+ store_->FlushStore(callback);
+ }
+
scoped_ptr<CookieStore::CookieChangedSubscription> AddCallbackForCookie(
const GURL& url,
const std::string& name,
@@ -507,7 +512,7 @@ TEST(CookieStoreIOS, GetAllCookiesForURLAsync) {
[NSHTTPCookieStorage sharedHTTPCookieStorage];
EXPECT_EQ(0u, [[system_store cookies] count]);
// Flushing should not have any effect.
- cookie_store->Flush(base::Closure());
+ cookie_store->FlushStore(base::Closure());
// Check we can get the cookie even though cookies are disabled.
GetAllCookiesCallback callback;
cookie_store->GetAllCookiesForURLAsync(
@@ -717,7 +722,7 @@ TEST_F(CookieStoreIOSWithBackend, ManualFlush) {
EXPECT_FALSE(backend_->flushed());
// The store should be flushed even if it is not dirty.
- store_->Flush(base::Closure());
+ store_->FlushStore(base::Closure());
EXPECT_TRUE(backend_->flushed());
store_->UnSynchronize();

Powered by Google App Engine
This is Rietveld 408576698