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_store_unittest.h" | 5 #include "net/cookies/cookie_store_unittest.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/metrics/histogram_samples.h" | 15 #include "base/metrics/histogram_samples.h" |
16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
17 #include "base/string_tokenizer.h" | 17 #include "base/strings/string_tokenizer.h" |
18 #include "base/threading/thread.h" | 18 #include "base/threading/thread.h" |
19 #include "base/time.h" | 19 #include "base/time.h" |
20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
21 #include "net/cookies/canonical_cookie.h" | 21 #include "net/cookies/canonical_cookie.h" |
22 #include "net/cookies/cookie_monster.h" | 22 #include "net/cookies/cookie_monster.h" |
23 #include "net/cookies/cookie_monster_store_test.h" // For CookieStore mock | 23 #include "net/cookies/cookie_monster_store_test.h" // For CookieStore mock |
24 #include "net/cookies/cookie_util.h" | 24 #include "net/cookies/cookie_util.h" |
25 #include "net/cookies/parsed_cookie.h" | 25 #include "net/cookies/parsed_cookie.h" |
26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2257 EXPECT_EQ(CookieStoreCommand::ADD, store->commands()[4].type); | 2257 EXPECT_EQ(CookieStoreCommand::ADD, store->commands()[4].type); |
2258 | 2258 |
2259 // Create some non-persistent cookies and check that they don't go to the | 2259 // Create some non-persistent cookies and check that they don't go to the |
2260 // persistent storage. | 2260 // persistent storage. |
2261 EXPECT_TRUE(SetCookie(cm, url_google_, "B=Bar")); | 2261 EXPECT_TRUE(SetCookie(cm, url_google_, "B=Bar")); |
2262 this->MatchCookieLines("A=Foo; B=Bar", GetCookies(cm, url_google_)); | 2262 this->MatchCookieLines("A=Foo; B=Bar", GetCookies(cm, url_google_)); |
2263 EXPECT_EQ(5u, store->commands().size()); | 2263 EXPECT_EQ(5u, store->commands().size()); |
2264 } | 2264 } |
2265 | 2265 |
2266 } // namespace net | 2266 } // namespace net |
OLD | NEW |