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 <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/metrics/histogram_samples.h" | 17 #include "base/metrics/histogram_samples.h" |
18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
19 #include "base/strings/string_piece.h" | 19 #include "base/strings/string_piece.h" |
20 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
21 #include "base/strings/string_tokenizer.h" | 21 #include "base/strings/string_tokenizer.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/threading/thread.h" | 23 #include "base/threading/thread.h" |
24 #include "base/time.h" | 24 #include "base/time/time.h" |
25 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" |
26 #include "net/cookies/canonical_cookie.h" | 26 #include "net/cookies/canonical_cookie.h" |
27 #include "net/cookies/cookie_constants.h" | 27 #include "net/cookies/cookie_constants.h" |
28 #include "net/cookies/cookie_monster.h" | 28 #include "net/cookies/cookie_monster.h" |
29 #include "net/cookies/cookie_monster_store_test.h" // For CookieStore mock | 29 #include "net/cookies/cookie_monster_store_test.h" // For CookieStore mock |
30 #include "net/cookies/cookie_util.h" | 30 #include "net/cookies/cookie_util.h" |
31 #include "net/cookies/parsed_cookie.h" | 31 #include "net/cookies/parsed_cookie.h" |
32 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 | 34 |
(...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 EXPECT_EQ(CookieStoreCommand::ADD, store->commands()[4].type); | 2611 EXPECT_EQ(CookieStoreCommand::ADD, store->commands()[4].type); |
2612 | 2612 |
2613 // Create some non-persistent cookies and check that they don't go to the | 2613 // Create some non-persistent cookies and check that they don't go to the |
2614 // persistent storage. | 2614 // persistent storage. |
2615 EXPECT_TRUE(SetCookie(cm.get(), url_google_, "B=Bar")); | 2615 EXPECT_TRUE(SetCookie(cm.get(), url_google_, "B=Bar")); |
2616 this->MatchCookieLines("A=Foo; B=Bar", GetCookies(cm.get(), url_google_)); | 2616 this->MatchCookieLines("A=Foo; B=Bar", GetCookies(cm.get(), url_google_)); |
2617 EXPECT_EQ(5u, store->commands().size()); | 2617 EXPECT_EQ(5u, store->commands().size()); |
2618 } | 2618 } |
2619 | 2619 |
2620 } // namespace net | 2620 } // namespace net |
OLD | NEW |