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/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
12 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" | 12 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" |
13 #include "chrome/browser/history/history.h" | 13 #include "chrome/browser/history/history.h" |
| 14 #include "chrome/common/pref_names.h" |
| 15 #include "chrome/test/base/testing_pref_service.h" |
14 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
15 #include "net/base/cookie_monster.h" | 17 #include "net/base/cookie_monster.h" |
16 #include "net/url_request/url_request_context.h" | 18 #include "net/url_request/url_request_context.h" |
17 #include "net/url_request/url_request_context_getter.h" | 19 #include "net/url_request/url_request_context_getter.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "webkit/fileapi/file_system_context.h" | 21 #include "webkit/fileapi/file_system_context.h" |
20 #include "webkit/fileapi/file_system_file_util.h" | 22 #include "webkit/fileapi/file_system_file_util.h" |
21 #include "webkit/fileapi/file_system_operation_context.h" | 23 #include "webkit/fileapi/file_system_operation_context.h" |
22 #include "webkit/fileapi/file_system_path_manager.h" | 24 #include "webkit/fileapi/file_system_path_manager.h" |
23 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 25 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 230 |
229 class BrowsingDataRemoverTest : public testing::Test { | 231 class BrowsingDataRemoverTest : public testing::Test { |
230 public: | 232 public: |
231 BrowsingDataRemoverTest() | 233 BrowsingDataRemoverTest() |
232 : ui_thread_(BrowserThread::UI, &message_loop_), | 234 : ui_thread_(BrowserThread::UI, &message_loop_), |
233 db_thread_(BrowserThread::DB, &message_loop_), | 235 db_thread_(BrowserThread::DB, &message_loop_), |
234 webkit_thread_(BrowserThread::WEBKIT, &message_loop_), | 236 webkit_thread_(BrowserThread::WEBKIT, &message_loop_), |
235 file_thread_(BrowserThread::FILE, &message_loop_), | 237 file_thread_(BrowserThread::FILE, &message_loop_), |
236 io_thread_(BrowserThread::IO, &message_loop_), | 238 io_thread_(BrowserThread::IO, &message_loop_), |
237 profile_(new TestingProfile()) { | 239 profile_(new TestingProfile()) { |
| 240 profile_->GetPrefs()->SetBoolean(prefs::kClearPluginLSODataEnabled, false); |
238 } | 241 } |
239 | 242 |
240 virtual ~BrowsingDataRemoverTest() { | 243 virtual ~BrowsingDataRemoverTest() { |
241 } | 244 } |
242 | 245 |
243 void TearDown() { | 246 void TearDown() { |
244 // TestingProfile contains a WebKitContext. WebKitContext's destructor | 247 // TestingProfile contains a WebKitContext. WebKitContext's destructor |
245 // posts a message to the WEBKIT thread to delete some of its member | 248 // posts a message to the WEBKIT thread to delete some of its member |
246 // variables. We need to ensure that the profile is destroyed, and that | 249 // variables. We need to ensure that the profile is destroyed, and that |
247 // the message loop is cleared out, before destroying the threads and loop. | 250 // the message loop is cleared out, before destroying the threads and loop. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // Tests --------------------------------------------------------------------- | 299 // Tests --------------------------------------------------------------------- |
297 | 300 |
298 TEST_F(BrowsingDataRemoverTest, RemoveCookieForever) { | 301 TEST_F(BrowsingDataRemoverTest, RemoveCookieForever) { |
299 scoped_ptr<RemoveCookieTester> tester( | 302 scoped_ptr<RemoveCookieTester> tester( |
300 new RemoveCookieTester(GetProfile())); | 303 new RemoveCookieTester(GetProfile())); |
301 | 304 |
302 tester->AddCookie(); | 305 tester->AddCookie(); |
303 ASSERT_TRUE(tester->ContainsCookie()); | 306 ASSERT_TRUE(tester->ContainsCookie()); |
304 | 307 |
305 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 308 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
306 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 309 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
307 | 310 |
308 EXPECT_FALSE(tester->ContainsCookie()); | 311 EXPECT_FALSE(tester->ContainsCookie()); |
309 } | 312 } |
310 | 313 |
311 TEST_F(BrowsingDataRemoverTest, RemoveHistoryForever) { | 314 TEST_F(BrowsingDataRemoverTest, RemoveHistoryForever) { |
312 scoped_ptr<RemoveHistoryTester> tester( | 315 scoped_ptr<RemoveHistoryTester> tester( |
313 new RemoveHistoryTester(GetProfile())); | 316 new RemoveHistoryTester(GetProfile())); |
314 | 317 |
315 tester->AddHistory(kOrigin1, base::Time::Now()); | 318 tester->AddHistory(kOrigin1, base::Time::Now()); |
316 ASSERT_TRUE(tester->HistoryContainsURL(kOrigin1)); | 319 ASSERT_TRUE(tester->HistoryContainsURL(kOrigin1)); |
(...skipping 21 matching lines...) Expand all Loading... |
338 EXPECT_FALSE(tester->HistoryContainsURL(kOrigin1)); | 341 EXPECT_FALSE(tester->HistoryContainsURL(kOrigin1)); |
339 EXPECT_TRUE(tester->HistoryContainsURL(kOrigin2)); | 342 EXPECT_TRUE(tester->HistoryContainsURL(kOrigin2)); |
340 } | 343 } |
341 | 344 |
342 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverBoth) { | 345 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverBoth) { |
343 scoped_ptr<RemoveQuotaManagedDataTester> tester( | 346 scoped_ptr<RemoveQuotaManagedDataTester> tester( |
344 new RemoveQuotaManagedDataTester()); | 347 new RemoveQuotaManagedDataTester()); |
345 | 348 |
346 tester->PopulateTestQuotaManagedData(GetMockManager()); | 349 tester->PopulateTestQuotaManagedData(GetMockManager()); |
347 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 350 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
348 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 351 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
349 | 352 |
350 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 353 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
351 quota::kStorageTypeTemporary)); | 354 quota::kStorageTypeTemporary)); |
352 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 355 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
353 quota::kStorageTypeTemporary)); | 356 quota::kStorageTypeTemporary)); |
354 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 357 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
355 quota::kStorageTypeTemporary)); | 358 quota::kStorageTypeTemporary)); |
356 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 359 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
357 quota::kStorageTypePersistent)); | 360 quota::kStorageTypePersistent)); |
358 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 361 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
359 quota::kStorageTypePersistent)); | 362 quota::kStorageTypePersistent)); |
360 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 363 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
361 quota::kStorageTypePersistent)); | 364 quota::kStorageTypePersistent)); |
362 } | 365 } |
363 | 366 |
364 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyTemporary) { | 367 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyTemporary) { |
365 scoped_ptr<RemoveQuotaManagedDataTester> tester( | 368 scoped_ptr<RemoveQuotaManagedDataTester> tester( |
366 new RemoveQuotaManagedDataTester()); | 369 new RemoveQuotaManagedDataTester()); |
367 | 370 |
368 tester->PopulateTestQuotaManagedTemporaryData(GetMockManager()); | 371 tester->PopulateTestQuotaManagedTemporaryData(GetMockManager()); |
369 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 372 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
370 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 373 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
371 | 374 |
372 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 375 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
373 quota::kStorageTypeTemporary)); | 376 quota::kStorageTypeTemporary)); |
374 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 377 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
375 quota::kStorageTypeTemporary)); | 378 quota::kStorageTypeTemporary)); |
376 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 379 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
377 quota::kStorageTypeTemporary)); | 380 quota::kStorageTypeTemporary)); |
378 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 381 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
379 quota::kStorageTypePersistent)); | 382 quota::kStorageTypePersistent)); |
380 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 383 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
381 quota::kStorageTypePersistent)); | 384 quota::kStorageTypePersistent)); |
382 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 385 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
383 quota::kStorageTypePersistent)); | 386 quota::kStorageTypePersistent)); |
384 } | 387 } |
385 | 388 |
386 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyPersistent) { | 389 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverOnlyPersistent) { |
387 scoped_ptr<RemoveQuotaManagedDataTester> tester( | 390 scoped_ptr<RemoveQuotaManagedDataTester> tester( |
388 new RemoveQuotaManagedDataTester()); | 391 new RemoveQuotaManagedDataTester()); |
389 | 392 |
390 tester->PopulateTestQuotaManagedPersistentData(GetMockManager()); | 393 tester->PopulateTestQuotaManagedPersistentData(GetMockManager()); |
391 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 394 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
392 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 395 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
393 | 396 |
394 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 397 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
395 quota::kStorageTypeTemporary)); | 398 quota::kStorageTypeTemporary)); |
396 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 399 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
397 quota::kStorageTypeTemporary)); | 400 quota::kStorageTypeTemporary)); |
398 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 401 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
399 quota::kStorageTypeTemporary)); | 402 quota::kStorageTypeTemporary)); |
400 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 403 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
401 quota::kStorageTypePersistent)); | 404 quota::kStorageTypePersistent)); |
402 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 405 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
403 quota::kStorageTypePersistent)); | 406 quota::kStorageTypePersistent)); |
404 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 407 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
405 quota::kStorageTypePersistent)); | 408 quota::kStorageTypePersistent)); |
406 } | 409 } |
407 | 410 |
408 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverNeither) { | 411 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForeverNeither) { |
409 scoped_ptr<RemoveQuotaManagedDataTester> tester( | 412 scoped_ptr<RemoveQuotaManagedDataTester> tester( |
410 new RemoveQuotaManagedDataTester()); | 413 new RemoveQuotaManagedDataTester()); |
411 | 414 |
412 GetMockManager(); // Creates the QuotaManager instance. | 415 GetMockManager(); // Creates the QuotaManager instance. |
413 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 416 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
414 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 417 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
415 | 418 |
416 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 419 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
417 quota::kStorageTypeTemporary)); | 420 quota::kStorageTypeTemporary)); |
418 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 421 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
419 quota::kStorageTypeTemporary)); | 422 quota::kStorageTypeTemporary)); |
420 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 423 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
421 quota::kStorageTypeTemporary)); | 424 quota::kStorageTypeTemporary)); |
422 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 425 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
423 quota::kStorageTypePersistent)); | 426 quota::kStorageTypePersistent)); |
424 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 427 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
425 quota::kStorageTypePersistent)); | 428 quota::kStorageTypePersistent)); |
426 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 429 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
427 quota::kStorageTypePersistent)); | 430 quota::kStorageTypePersistent)); |
428 } | 431 } |
429 | 432 |
430 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForLastHour) { | 433 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForLastHour) { |
431 scoped_ptr<RemoveQuotaManagedDataTester> tester( | 434 scoped_ptr<RemoveQuotaManagedDataTester> tester( |
432 new RemoveQuotaManagedDataTester()); | 435 new RemoveQuotaManagedDataTester()); |
433 tester->PopulateTestQuotaManagedData(GetMockManager()); | 436 tester->PopulateTestQuotaManagedData(GetMockManager()); |
434 | 437 |
435 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::LAST_HOUR, | 438 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::LAST_HOUR, |
436 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 439 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
437 | 440 |
438 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 441 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
439 quota::kStorageTypeTemporary)); | 442 quota::kStorageTypeTemporary)); |
440 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 443 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
441 quota::kStorageTypeTemporary)); | 444 quota::kStorageTypeTemporary)); |
442 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin3, | 445 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin3, |
443 quota::kStorageTypeTemporary)); | 446 quota::kStorageTypeTemporary)); |
444 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 447 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
445 quota::kStorageTypePersistent)); | 448 quota::kStorageTypePersistent)); |
446 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin2, | 449 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin2, |
447 quota::kStorageTypePersistent)); | 450 quota::kStorageTypePersistent)); |
448 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin3, | 451 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin3, |
449 quota::kStorageTypePersistent)); | 452 quota::kStorageTypePersistent)); |
450 } | 453 } |
451 | 454 |
452 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForLastWeek) { | 455 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedDataForLastWeek) { |
453 scoped_ptr<RemoveQuotaManagedDataTester> tester( | 456 scoped_ptr<RemoveQuotaManagedDataTester> tester( |
454 new RemoveQuotaManagedDataTester()); | 457 new RemoveQuotaManagedDataTester()); |
455 tester->PopulateTestQuotaManagedData(GetMockManager()); | 458 tester->PopulateTestQuotaManagedData(GetMockManager()); |
456 | 459 |
457 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::LAST_WEEK, | 460 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::LAST_WEEK, |
458 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 461 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
459 | 462 |
460 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 463 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
461 quota::kStorageTypeTemporary)); | 464 quota::kStorageTypeTemporary)); |
462 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 465 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
463 quota::kStorageTypeTemporary)); | 466 quota::kStorageTypeTemporary)); |
464 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 467 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
465 quota::kStorageTypeTemporary)); | 468 quota::kStorageTypeTemporary)); |
466 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 469 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
467 quota::kStorageTypePersistent)); | 470 quota::kStorageTypePersistent)); |
468 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin2, | 471 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin2, |
469 quota::kStorageTypePersistent)); | 472 quota::kStorageTypePersistent)); |
470 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin3, | 473 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin3, |
471 quota::kStorageTypePersistent)); | 474 quota::kStorageTypePersistent)); |
472 } | 475 } |
473 | 476 |
474 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedUnprotectedOrigins) { | 477 TEST_F(BrowsingDataRemoverTest, RemoveQuotaManagedUnprotectedOrigins) { |
475 // Protect kOrigin1. | 478 // Protect kOrigin1. |
476 scoped_refptr<MockExtensionSpecialStoragePolicy> mock_policy = | 479 scoped_refptr<MockExtensionSpecialStoragePolicy> mock_policy = |
477 new MockExtensionSpecialStoragePolicy; | 480 new MockExtensionSpecialStoragePolicy; |
478 mock_policy->AddProtected(kOrigin1.GetOrigin()); | 481 mock_policy->AddProtected(kOrigin1.GetOrigin()); |
479 GetProfile()->SetExtensionSpecialStoragePolicy(mock_policy); | 482 GetProfile()->SetExtensionSpecialStoragePolicy(mock_policy); |
480 | 483 |
481 scoped_ptr<RemoveQuotaManagedDataTester> tester( | 484 scoped_ptr<RemoveQuotaManagedDataTester> tester( |
482 new RemoveQuotaManagedDataTester()); | 485 new RemoveQuotaManagedDataTester()); |
483 tester->PopulateTestQuotaManagedData(GetMockManager()); | 486 tester->PopulateTestQuotaManagedData(GetMockManager()); |
484 | 487 |
485 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 488 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
486 BrowsingDataRemover::REMOVE_COOKIES, tester.get()); | 489 BrowsingDataRemover::REMOVE_SITE_DATA, tester.get()); |
487 | 490 |
488 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin1, | 491 EXPECT_TRUE(GetMockManager()->OriginHasData(kOrigin1, |
489 quota::kStorageTypeTemporary)); | 492 quota::kStorageTypeTemporary)); |
490 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 493 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
491 quota::kStorageTypeTemporary)); | 494 quota::kStorageTypeTemporary)); |
492 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 495 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
493 quota::kStorageTypeTemporary)); | 496 quota::kStorageTypeTemporary)); |
494 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 497 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
495 quota::kStorageTypePersistent)); | 498 quota::kStorageTypePersistent)); |
496 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 499 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
497 quota::kStorageTypePersistent)); | 500 quota::kStorageTypePersistent)); |
498 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 501 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
499 quota::kStorageTypePersistent)); | 502 quota::kStorageTypePersistent)); |
500 } | 503 } |
501 | 504 |
502 } // namespace | 505 } // namespace |
OLD | NEW |