Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: chrome/browser/browsing_data_remover_unittest.cc

Issue 7465041: GTTF: Use a fresh TestingBrowserProcess for each test, part #4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "chrome/test/testing_browser_process_test.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 #include "webkit/fileapi/file_system_context.h" 16 #include "webkit/fileapi/file_system_context.h"
16 #include "webkit/fileapi/file_system_file_util.h" 17 #include "webkit/fileapi/file_system_file_util.h"
17 #include "webkit/fileapi/file_system_operation_context.h" 18 #include "webkit/fileapi/file_system_operation_context.h"
18 #include "webkit/fileapi/file_system_path_manager.h" 19 #include "webkit/fileapi/file_system_path_manager.h"
19 #include "webkit/fileapi/sandbox_mount_point_provider.h" 20 #include "webkit/fileapi/sandbox_mount_point_provider.h"
20 #include "webkit/quota/mock_quota_manager.h" 21 #include "webkit/quota/mock_quota_manager.h"
21 #include "webkit/quota/quota_manager.h" 22 #include "webkit/quota/quota_manager.h"
22 #include "webkit/quota/quota_types.h" 23 #include "webkit/quota/quota_types.h"
23 24
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 EXPECT_TRUE(manager->OriginHasData(kOrigin3, 144 EXPECT_TRUE(manager->OriginHasData(kOrigin3,
144 quota::kStorageTypeTemporary)); 145 quota::kStorageTypeTemporary));
145 } 146 }
146 147
147 private: 148 private:
148 DISALLOW_COPY_AND_ASSIGN(RemoveQuotaManagedDataTester); 149 DISALLOW_COPY_AND_ASSIGN(RemoveQuotaManagedDataTester);
149 }; 150 };
150 151
151 // Test Class ---------------------------------------------------------------- 152 // Test Class ----------------------------------------------------------------
152 153
153 class BrowsingDataRemoverTest : public testing::Test { 154 class BrowsingDataRemoverTest : public TestingBrowserProcessTest {
154 public: 155 public:
155 BrowsingDataRemoverTest() 156 BrowsingDataRemoverTest()
156 : ui_thread_(BrowserThread::UI, &message_loop_), 157 : ui_thread_(BrowserThread::UI, &message_loop_),
157 db_thread_(BrowserThread::DB, &message_loop_), 158 db_thread_(BrowserThread::DB, &message_loop_),
158 webkit_thread_(BrowserThread::WEBKIT, &message_loop_), 159 webkit_thread_(BrowserThread::WEBKIT, &message_loop_),
159 file_thread_(BrowserThread::FILE, &message_loop_), 160 file_thread_(BrowserThread::FILE, &message_loop_),
160 io_thread_(BrowserThread::IO, &message_loop_), 161 io_thread_(BrowserThread::IO, &message_loop_),
161 profile_(new TestingProfile()) { 162 profile_(new TestingProfile()) {
162 } 163 }
163 164
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 quota::kStorageTypeTemporary)); 405 quota::kStorageTypeTemporary));
405 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1, 406 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin1,
406 quota::kStorageTypePersistent)); 407 quota::kStorageTypePersistent));
407 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2, 408 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin2,
408 quota::kStorageTypePersistent)); 409 quota::kStorageTypePersistent));
409 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3, 410 EXPECT_FALSE(GetMockManager()->OriginHasData(kOrigin3,
410 quota::kStorageTypePersistent)); 411 quota::kStorageTypePersistent));
411 } 412 }
412 413
413 } // namespace 414 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698