| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data_remover.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 // Tests --------------------------------------------------------------------- | 301 // Tests --------------------------------------------------------------------- |
| 302 | 302 |
| 303 TEST_F(BrowsingDataRemoverTest, RemoveCookieForever) { | 303 TEST_F(BrowsingDataRemoverTest, RemoveCookieForever) { |
| 304 scoped_ptr<RemoveCookieTester> tester( | 304 scoped_ptr<RemoveCookieTester> tester( |
| 305 new RemoveCookieTester(GetProfile())); | 305 new RemoveCookieTester(GetProfile())); |
| 306 | 306 |
| 307 tester->AddCookie(); | 307 tester->AddCookie(); |
| 308 ASSERT_TRUE(tester->ContainsCookie()); | 308 ASSERT_TRUE(tester->ContainsCookie()); |
| 309 | 309 |
| 310 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 310 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
| 311 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); | 311 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); |
| 312 | 312 |
| 313 EXPECT_FALSE(tester->ContainsCookie()); | 313 EXPECT_FALSE(tester->ContainsCookie()); |
| 314 } | 314 } |
| 315 | 315 |
| 316 TEST_F(BrowsingDataRemoverTest, RemoveHistoryForever) { | 316 TEST_F(BrowsingDataRemoverTest, RemoveHistoryForever) { |
| 317 scoped_ptr<RemoveHistoryTester> tester( | 317 scoped_ptr<RemoveHistoryTester> tester( |
| 318 new RemoveHistoryTester(GetProfile())); | 318 new RemoveHistoryTester(GetProfile())); |
| 319 | 319 |
| 320 tester->AddHistory(kOrigin1, base::Time::Now()); | 320 tester->AddHistory(kOrigin1, base::Time::Now()); |
| 321 ASSERT_TRUE(tester->HistoryContainsURL(kOrigin1)); | 321 ASSERT_TRUE(tester->HistoryContainsURL(kOrigin1)); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 quota::kStorageTypeTemporary)); | 498 quota::kStorageTypeTemporary)); |
| 499 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 499 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
| 500 quota::kStorageTypePersistent)); | 500 quota::kStorageTypePersistent)); |
| 501 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 501 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
| 502 quota::kStorageTypePersistent)); | 502 quota::kStorageTypePersistent)); |
| 503 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 503 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
| 504 quota::kStorageTypePersistent)); | 504 quota::kStorageTypePersistent)); |
| 505 } | 505 } |
| 506 | 506 |
| 507 } // namespace | 507 } // namespace |
| OLD | NEW |