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

Side by Side Diff: net/cookies/cookie_monster_store_test.cc

Issue 1615773005: Rename first-party-only cookies to same-site cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests. 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
« no previous file with comments | « net/cookies/cookie_monster.cc ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "net/cookies/cookie_monster_store_test.h" 5 #include "net/cookies/cookie_monster_store_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // functions. Would be nice to export them, and re-use here. 113 // functions. Would be nice to export them, and re-use here.
114 EXPECT_FALSE(pc.HasMaxAge()); 114 EXPECT_FALSE(pc.HasMaxAge());
115 EXPECT_TRUE(pc.HasPath()); 115 EXPECT_TRUE(pc.HasPath());
116 base::Time cookie_expires = pc.HasExpires() 116 base::Time cookie_expires = pc.HasExpires()
117 ? cookie_util::ParseCookieTime(pc.Expires()) 117 ? cookie_util::ParseCookieTime(pc.Expires())
118 : base::Time(); 118 : base::Time();
119 std::string cookie_path = pc.Path(); 119 std::string cookie_path = pc.Path();
120 120
121 return CanonicalCookie(GURL(), pc.Name(), pc.Value(), key, cookie_path, 121 return CanonicalCookie(GURL(), pc.Name(), pc.Value(), key, cookie_path,
122 creation_time, cookie_expires, creation_time, 122 creation_time, cookie_expires, creation_time,
123 pc.IsSecure(), pc.IsHttpOnly(), pc.IsFirstPartyOnly(), 123 pc.IsSecure(), pc.IsHttpOnly(), pc.IsSameSite(),
124 pc.Priority()); 124 pc.Priority());
125 } 125 }
126 126
127 void AddCookieToList(const std::string& key, 127 void AddCookieToList(const std::string& key,
128 const std::string& cookie_line, 128 const std::string& cookie_line,
129 const base::Time& creation_time, 129 const base::Time& creation_time,
130 std::vector<CanonicalCookie*>* out_list) { 130 std::vector<CanonicalCookie*>* out_list) {
131 scoped_ptr<CanonicalCookie> cookie(new CanonicalCookie( 131 scoped_ptr<CanonicalCookie> cookie(new CanonicalCookie(
132 BuildCanonicalCookie(key, cookie_line, creation_time))); 132 BuildCanonicalCookie(key, cookie_line, creation_time)));
133 133
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 store->AddCookie(cc); 234 store->AddCookie(cc);
235 } 235 }
236 236
237 return new CookieMonster(store.get(), NULL); 237 return new CookieMonster(store.get(), NULL);
238 } 238 }
239 239
240 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() { 240 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() {
241 } 241 }
242 242
243 } // namespace net 243 } // namespace net
OLDNEW
« no previous file with comments | « net/cookies/cookie_monster.cc ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698