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/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
11 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" | 11 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" |
12 #include "chrome/browser/history/history.h" | 12 #include "chrome/browser/history/history.h" |
13 #include "chrome/test/base/testing_browser_process_test.h" | |
14 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "webkit/fileapi/file_system_context.h" | 15 #include "webkit/fileapi/file_system_context.h" |
17 #include "webkit/fileapi/file_system_file_util.h" | 16 #include "webkit/fileapi/file_system_file_util.h" |
18 #include "webkit/fileapi/file_system_operation_context.h" | 17 #include "webkit/fileapi/file_system_operation_context.h" |
19 #include "webkit/fileapi/file_system_path_manager.h" | 18 #include "webkit/fileapi/file_system_path_manager.h" |
20 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 19 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
21 #include "webkit/quota/mock_quota_manager.h" | 20 #include "webkit/quota/mock_quota_manager.h" |
22 #include "webkit/quota/quota_manager.h" | 21 #include "webkit/quota/quota_manager.h" |
23 #include "webkit/quota/quota_types.h" | 22 #include "webkit/quota/quota_types.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 EXPECT_TRUE(manager->OriginHasData(kOrigin3, | 143 EXPECT_TRUE(manager->OriginHasData(kOrigin3, |
145 quota::kStorageTypeTemporary)); | 144 quota::kStorageTypeTemporary)); |
146 } | 145 } |
147 | 146 |
148 private: | 147 private: |
149 DISALLOW_COPY_AND_ASSIGN(RemoveQuotaManagedDataTester); | 148 DISALLOW_COPY_AND_ASSIGN(RemoveQuotaManagedDataTester); |
150 }; | 149 }; |
151 | 150 |
152 // Test Class ---------------------------------------------------------------- | 151 // Test Class ---------------------------------------------------------------- |
153 | 152 |
154 class BrowsingDataRemoverTest : public TestingBrowserProcessTest { | 153 class BrowsingDataRemoverTest : public testing::Test { |
155 public: | 154 public: |
156 BrowsingDataRemoverTest() | 155 BrowsingDataRemoverTest() |
157 : ui_thread_(BrowserThread::UI, &message_loop_), | 156 : ui_thread_(BrowserThread::UI, &message_loop_), |
158 db_thread_(BrowserThread::DB, &message_loop_), | 157 db_thread_(BrowserThread::DB, &message_loop_), |
159 webkit_thread_(BrowserThread::WEBKIT, &message_loop_), | 158 webkit_thread_(BrowserThread::WEBKIT, &message_loop_), |
160 file_thread_(BrowserThread::FILE, &message_loop_), | 159 file_thread_(BrowserThread::FILE, &message_loop_), |
161 io_thread_(BrowserThread::IO, &message_loop_), | 160 io_thread_(BrowserThread::IO, &message_loop_), |
162 profile_(new TestingProfile()) { | 161 profile_(new TestingProfile()) { |
163 } | 162 } |
164 | 163 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 quota::kStorageTypeTemporary)); | 404 quota::kStorageTypeTemporary)); |
406 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, | 405 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, |
407 quota::kStorageTypePersistent)); | 406 quota::kStorageTypePersistent)); |
408 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, | 407 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, |
409 quota::kStorageTypePersistent)); | 408 quota::kStorageTypePersistent)); |
410 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, | 409 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, |
411 quota::kStorageTypePersistent)); | 410 quota::kStorageTypePersistent)); |
412 } | 411 } |
413 | 412 |
414 } // namespace | 413 } // namespace |
OLD | NEW |