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 "chrome/browser/browsing_data/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 : ui_thread_(BrowserThread::UI, &message_loop_), | 479 : ui_thread_(BrowserThread::UI, &message_loop_), |
480 db_thread_(BrowserThread::DB, &message_loop_), | 480 db_thread_(BrowserThread::DB, &message_loop_), |
481 webkit_thread_(BrowserThread::WEBKIT_DEPRECATED, &message_loop_), | 481 webkit_thread_(BrowserThread::WEBKIT_DEPRECATED, &message_loop_), |
482 file_thread_(BrowserThread::FILE, &message_loop_), | 482 file_thread_(BrowserThread::FILE, &message_loop_), |
483 file_user_blocking_thread_( | 483 file_user_blocking_thread_( |
484 BrowserThread::FILE_USER_BLOCKING, &message_loop_), | 484 BrowserThread::FILE_USER_BLOCKING, &message_loop_), |
485 io_thread_(BrowserThread::IO, &message_loop_), | 485 io_thread_(BrowserThread::IO, &message_loop_), |
486 profile_(new TestingProfile()) { | 486 profile_(new TestingProfile()) { |
487 registrar_.Add(this, chrome::NOTIFICATION_BROWSING_DATA_REMOVED, | 487 registrar_.Add(this, chrome::NOTIFICATION_BROWSING_DATA_REMOVED, |
488 content::Source<Profile>(profile_.get())); | 488 content::Source<Profile>(profile_.get())); |
| 489 profile_->CreateSkeletonIODataForTesting(); |
489 } | 490 } |
490 | 491 |
491 virtual ~BrowsingDataRemoverTest() { | 492 virtual ~BrowsingDataRemoverTest() { |
492 } | 493 } |
493 | 494 |
494 void TearDown() { | 495 void TearDown() { |
495 // TestingProfile contains a DOMStorageContext. BrowserContext's destructor | 496 // TestingProfile contains a DOMStorageContext. BrowserContext's destructor |
496 // posts a message to the WEBKIT thread to delete some of its member | 497 // posts a message to the WEBKIT thread to delete some of its member |
497 // variables. We need to ensure that the profile is destroyed, and that | 498 // variables. We need to ensure that the profile is destroyed, and that |
498 // the message loop is cleared out, before destroying the threads and loop. | 499 // the message loop is cleared out, before destroying the threads and loop. |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1217 ASSERT_TRUE(tester.HasProfile()); | 1218 ASSERT_TRUE(tester.HasProfile()); |
1218 | 1219 |
1219 BlockUntilBrowsingDataRemoved( | 1220 BlockUntilBrowsingDataRemoved( |
1220 BrowsingDataRemover::EVERYTHING, | 1221 BrowsingDataRemover::EVERYTHING, |
1221 BrowsingDataRemover::REMOVE_FORM_DATA, false); | 1222 BrowsingDataRemover::REMOVE_FORM_DATA, false); |
1222 | 1223 |
1223 EXPECT_EQ(BrowsingDataRemover::REMOVE_FORM_DATA, GetRemovalMask()); | 1224 EXPECT_EQ(BrowsingDataRemover::REMOVE_FORM_DATA, GetRemovalMask()); |
1224 EXPECT_EQ(BrowsingDataHelper::UNPROTECTED_WEB, GetOriginSetMask()); | 1225 EXPECT_EQ(BrowsingDataHelper::UNPROTECTED_WEB, GetOriginSetMask()); |
1225 ASSERT_FALSE(tester.HasProfile()); | 1226 ASSERT_FALSE(tester.HasProfile()); |
1226 } | 1227 } |
OLD | NEW |