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

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

Issue 1409243003: Revert of Implement $Secure- cookie prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « content/browser/frame_host/render_frame_message_filter.cc ('k') | net/cookies/cookie_monster.h » ('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 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 24 matching lines...) Expand all
35 return store; 35 return store;
36 } 36 }
37 37
38 static const bool is_cookie_monster = false; 38 static const bool is_cookie_monster = false;
39 static const bool supports_http_only = false; 39 static const bool supports_http_only = false;
40 static const bool supports_non_dotted_domains = false; 40 static const bool supports_non_dotted_domains = false;
41 static const bool preserves_trailing_dots = false; 41 static const bool preserves_trailing_dots = false;
42 static const bool filters_schemes = false; 42 static const bool filters_schemes = false;
43 static const bool has_path_prefix_bug = true; 43 static const bool has_path_prefix_bug = true;
44 static const int creation_time_granularity_in_ms = 1000; 44 static const int creation_time_granularity_in_ms = 1000;
45 static const int enforces_prefixes = true;
46 45
47 base::MessageLoop loop_; 46 base::MessageLoop loop_;
48 }; 47 };
49 48
50 struct InactiveCookieStoreIOSTestTraits { 49 struct InactiveCookieStoreIOSTestTraits {
51 static scoped_refptr<net::CookieStore> Create() { 50 static scoped_refptr<net::CookieStore> Create() {
52 return new CookieStoreIOS(nullptr); 51 return new CookieStoreIOS(nullptr);
53 } 52 }
54 53
55 static const bool is_cookie_monster = false; 54 static const bool is_cookie_monster = false;
56 static const bool supports_http_only = false; 55 static const bool supports_http_only = false;
57 static const bool supports_non_dotted_domains = true; 56 static const bool supports_non_dotted_domains = true;
58 static const bool preserves_trailing_dots = true; 57 static const bool preserves_trailing_dots = true;
59 static const bool filters_schemes = false; 58 static const bool filters_schemes = false;
60 static const bool has_path_prefix_bug = false; 59 static const bool has_path_prefix_bug = false;
61 static const int creation_time_granularity_in_ms = 0; 60 static const int creation_time_granularity_in_ms = 0;
62 static const int enforces_prefixes = true;
63 61
64 base::MessageLoop loop_; 62 base::MessageLoop loop_;
65 }; 63 };
66 64
67 // RoundTripTestCookieStore is un-synchronized and re-synchronized after all 65 // RoundTripTestCookieStore is un-synchronized and re-synchronized after all
68 // cookie operations. This means all system cookies are converted to Chrome 66 // cookie operations. This means all system cookies are converted to Chrome
69 // cookies and converted back. 67 // cookies and converted back.
70 // The purpose of this class is to test that cookie conversions do not break the 68 // The purpose of this class is to test that cookie conversions do not break the
71 // cookie store. 69 // cookie store.
72 class RoundTripTestCookieStore : public net::CookieStore { 70 class RoundTripTestCookieStore : public net::CookieStore {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return new RoundTripTestCookieStore(); 161 return new RoundTripTestCookieStore();
164 } 162 }
165 163
166 static const bool is_cookie_monster = false; 164 static const bool is_cookie_monster = false;
167 static const bool supports_http_only = false; 165 static const bool supports_http_only = false;
168 static const bool supports_non_dotted_domains = false; 166 static const bool supports_non_dotted_domains = false;
169 static const bool preserves_trailing_dots = false; 167 static const bool preserves_trailing_dots = false;
170 static const bool filters_schemes = false; 168 static const bool filters_schemes = false;
171 static const bool has_path_prefix_bug = true; 169 static const bool has_path_prefix_bug = true;
172 static const int creation_time_granularity_in_ms = 1000; 170 static const int creation_time_granularity_in_ms = 1000;
173 static const int enforces_prefixes = true;
174 }; 171 };
175 172
176 } // namespace net 173 } // namespace net
177 174
178 namespace net { 175 namespace net {
179 176
180 INSTANTIATE_TYPED_TEST_CASE_P(CookieStoreIOS, 177 INSTANTIATE_TYPED_TEST_CASE_P(CookieStoreIOS,
181 CookieStoreTest, 178 CookieStoreTest,
182 CookieStoreIOSTestTraits); 179 CookieStoreIOSTestTraits);
183 180
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 EXPECT_EQ(2U, cookies.size()); 941 EXPECT_EQ(2U, cookies.size());
945 // this deletes the callback 942 // this deletes the callback
946 handle.reset(); 943 handle.reset();
947 SetSystemCookie(kTestCookieURL, "abc", "jkl"); 944 SetSystemCookie(kTestCookieURL, "abc", "jkl");
948 EXPECT_EQ(2U, cookies.size()); 945 EXPECT_EQ(2U, cookies.size());
949 DeleteSystemCookie(kTestCookieURL, "abc"); 946 DeleteSystemCookie(kTestCookieURL, "abc");
950 store_->UnSynchronize(); 947 store_->UnSynchronize();
951 } 948 }
952 949
953 } // namespace net 950 } // namespace net
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_message_filter.cc ('k') | net/cookies/cookie_monster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698