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

Side by Side Diff: ios/net/cookies/cookie_store_ios_unittest.mm

Issue 1615773005: Rename first-party-only cookies to same-site cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a few. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/net/cookies/cookie_store_ios.h" 5 #include "ios/net/cookies/cookie_store_ios.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Some canonical cookies cannot be converted into System cookies, for 216 // Some canonical cookies cannot be converted into System cookies, for
217 // example if value is not valid utf8. Such cookies are ignored. 217 // example if value is not valid utf8. Such cookies are ignored.
218 net::CanonicalCookie* bad_canonical_cookie = new net::CanonicalCookie( 218 net::CanonicalCookie* bad_canonical_cookie = new net::CanonicalCookie(
219 kTestCookieURL, "name", "\x81r\xe4\xbd\xa0\xe5\xa5\xbd", "domain", 219 kTestCookieURL, "name", "\x81r\xe4\xbd\xa0\xe5\xa5\xbd", "domain",
220 "path/", 220 "path/",
221 base::Time(), // creation 221 base::Time(), // creation
222 base::Time(), // expires 222 base::Time(), // expires
223 base::Time(), // last_access 223 base::Time(), // last_access
224 false, // secure 224 false, // secure
225 false, // httponly 225 false, // httponly
226 false, // first_party_only 226 false, // samesite
mmenke 2016/01/25 18:47:10 same_site
Mike West 2016/01/26 11:05:45 Done.
227 net::COOKIE_PRIORITY_DEFAULT); 227 net::COOKIE_PRIORITY_DEFAULT);
228 cookies.push_back(bad_canonical_cookie); 228 cookies.push_back(bad_canonical_cookie);
229 loaded_callback_.Run(cookies); 229 loaded_callback_.Run(cookies);
230 } 230 }
231 231
232 bool flushed() { return flushed_; } 232 bool flushed() { return flushed_; }
233 233
234 private: 234 private:
235 // net::CookieMonster::PersistentCookieStore implementation: 235 // net::CookieMonster::PersistentCookieStore implementation:
236 void Load(const LoadedCallback& loaded_callback) override { 236 void Load(const LoadedCallback& loaded_callback) override {
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 EXPECT_EQ(2U, cookies.size()); 949 EXPECT_EQ(2U, cookies.size());
950 // this deletes the callback 950 // this deletes the callback
951 handle.reset(); 951 handle.reset();
952 SetSystemCookie(kTestCookieURL, "abc", "jkl"); 952 SetSystemCookie(kTestCookieURL, "abc", "jkl");
953 EXPECT_EQ(2U, cookies.size()); 953 EXPECT_EQ(2U, cookies.size());
954 DeleteSystemCookie(kTestCookieURL, "abc"); 954 DeleteSystemCookie(kTestCookieURL, "abc");
955 store_->UnSynchronize(); 955 store_->UnSynchronize();
956 } 956 }
957 957
958 } // namespace net 958 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698