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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
13 #include "base/test/thread_test_helper.h" | 13 #include "base/test/thread_test_helper.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "chrome/browser/net/clear_on_exit_policy.h" | 15 #include "chrome/browser/net/clear_on_exit_policy.h" |
16 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" | 16 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" |
17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
18 #include "content/test/test_browser_thread.h" | 18 #include "content/public/test/test_browser_thread.h" |
19 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
20 #include "sql/connection.h" | 20 #include "sql/connection.h" |
21 #include "sql/meta_table.h" | 21 #include "sql/meta_table.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "webkit/quota/mock_special_storage_policy.h" | 23 #include "webkit/quota/mock_special_storage_policy.h" |
24 | 24 |
25 using content::BrowserThread; | 25 using content::BrowserThread; |
26 | 26 |
27 class SQLitePersistentCookieStoreTest : public testing::Test { | 27 class SQLitePersistentCookieStoreTest : public testing::Test { |
28 public: | 28 public: |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 clear_policy.get()); | 526 clear_policy.get()); |
527 Load(&cookies); | 527 Load(&cookies); |
528 | 528 |
529 EXPECT_EQ(3U, cookies.size()); | 529 EXPECT_EQ(3U, cookies.size()); |
530 EXPECT_TRUE(IsCookiePresent(&cookies, protected_origin, "A", "1", false)); | 530 EXPECT_TRUE(IsCookiePresent(&cookies, protected_origin, "A", "1", false)); |
531 EXPECT_TRUE(IsCookiePresent(&cookies, other_origin, "C", "3", false)); | 531 EXPECT_TRUE(IsCookiePresent(&cookies, other_origin, "C", "3", false)); |
532 EXPECT_TRUE(IsCookiePresent(&cookies, session_origin, "D", "4", true)); | 532 EXPECT_TRUE(IsCookiePresent(&cookies, session_origin, "D", "4", true)); |
533 | 533 |
534 DestroyStore(); | 534 DestroyStore(); |
535 } | 535 } |
OLD | NEW |