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/base/cookie_store_unittest.h" | 5 #include "net/cookies/cookie_store_unittest.h" |
6 | 6 |
7 #include <time.h> | 7 #include <time.h> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
17 #include "base/string_tokenizer.h" | 17 #include "base/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/base/cookie_monster.h" | 21 #include "net/cookies/cookie_monster.h" |
22 #include "net/base/cookie_monster_store_test.h" // For CookieStore mock | 22 #include "net/cookies/cookie_monster_store_test.h" // For CookieStore mock |
23 #include "net/base/cookie_util.h" | 23 #include "net/cookies/cookie_util.h" |
24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 | 26 |
27 namespace net { | 27 namespace net { |
28 | 28 |
29 using base::Time; | 29 using base::Time; |
30 using base::TimeDelta; | 30 using base::TimeDelta; |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
(...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2678 EXPECT_EQ(CookieStoreCommand::ADD, store->commands()[4].type); | 2678 EXPECT_EQ(CookieStoreCommand::ADD, store->commands()[4].type); |
2679 | 2679 |
2680 // Create some non-persistent cookies and check that they don't go to the | 2680 // Create some non-persistent cookies and check that they don't go to the |
2681 // persistent storage. | 2681 // persistent storage. |
2682 EXPECT_TRUE(SetCookie(cm, url_google_, "B=Bar")); | 2682 EXPECT_TRUE(SetCookie(cm, url_google_, "B=Bar")); |
2683 this->MatchCookieLines("A=Foo; B=Bar", GetCookies(cm, url_google_)); | 2683 this->MatchCookieLines("A=Foo; B=Bar", GetCookies(cm, url_google_)); |
2684 EXPECT_EQ(5u, store->commands().size()); | 2684 EXPECT_EQ(5u, store->commands().size()); |
2685 } | 2685 } |
2686 | 2686 |
2687 } // namespace net | 2687 } // namespace net |
OLD | NEW |