OLD | NEW |
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.h" | 5 #include "net/cookies/cookie_monster.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 struct CookieMonsterTestTraits { | 102 struct CookieMonsterTestTraits { |
103 static std::unique_ptr<CookieStore> Create() { | 103 static std::unique_ptr<CookieStore> Create() { |
104 return base::MakeUnique<CookieMonster>(nullptr, nullptr); | 104 return base::MakeUnique<CookieMonster>(nullptr, nullptr); |
105 } | 105 } |
106 | 106 |
107 static const bool supports_http_only = true; | 107 static const bool supports_http_only = true; |
108 static const bool supports_non_dotted_domains = true; | 108 static const bool supports_non_dotted_domains = true; |
109 static const bool preserves_trailing_dots = true; | 109 static const bool preserves_trailing_dots = true; |
110 static const bool filters_schemes = true; | 110 static const bool filters_schemes = true; |
111 static const bool has_path_prefix_bug = false; | 111 static const bool has_path_prefix_bug = false; |
| 112 static const bool forbids_setting_empty_name = false; |
112 static const int creation_time_granularity_in_ms = 0; | 113 static const int creation_time_granularity_in_ms = 0; |
113 }; | 114 }; |
114 | 115 |
115 INSTANTIATE_TYPED_TEST_CASE_P(CookieMonster, | 116 INSTANTIATE_TYPED_TEST_CASE_P(CookieMonster, |
116 CookieStoreTest, | 117 CookieStoreTest, |
117 CookieMonsterTestTraits); | 118 CookieMonsterTestTraits); |
118 | 119 |
119 template <typename T> | 120 template <typename T> |
120 class CookieMonsterTestBase : public CookieStoreTest<T> { | 121 class CookieMonsterTestBase : public CookieStoreTest<T> { |
121 public: | 122 public: |
(...skipping 3294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3416 monster()->AddCallbackForCookie( | 3417 monster()->AddCallbackForCookie( |
3417 test_url_, "abc", | 3418 test_url_, "abc", |
3418 base::Bind(&RecordCookieChanges, &cookies1, nullptr))); | 3419 base::Bind(&RecordCookieChanges, &cookies1, nullptr))); |
3419 SetCookie(monster(), test_url_, "abc=def"); | 3420 SetCookie(monster(), test_url_, "abc=def"); |
3420 base::RunLoop().RunUntilIdle(); | 3421 base::RunLoop().RunUntilIdle(); |
3421 EXPECT_EQ(1U, cookies0.size()); | 3422 EXPECT_EQ(1U, cookies0.size()); |
3422 EXPECT_EQ(1U, cookies0.size()); | 3423 EXPECT_EQ(1U, cookies0.size()); |
3423 } | 3424 } |
3424 | 3425 |
3425 } // namespace net | 3426 } // namespace net |
OLD | NEW |