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

Side by Side Diff: chrome/browser/extensions/app_data_migrator_unittest.cc

Issue 2930183002: Let IndexedDBContextImpl create its own task runner (Closed)
Patch Set: rebased Created 3 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void SetUp() override { 46 void SetUp() override {
47 profile_ = GetTestingProfile(); 47 profile_ = GetTestingProfile();
48 registry_ = ExtensionRegistry::Get(profile_.get()); 48 registry_ = ExtensionRegistry::Get(profile_.get());
49 migrator_ = std::unique_ptr<AppDataMigrator>( 49 migrator_ = std::unique_ptr<AppDataMigrator>(
50 new AppDataMigrator(profile_.get(), registry_)); 50 new AppDataMigrator(profile_.get(), registry_));
51 51
52 default_partition_ = 52 default_partition_ =
53 content::BrowserContext::GetDefaultStoragePartition(profile_.get()); 53 content::BrowserContext::GetDefaultStoragePartition(profile_.get());
54 54
55 idb_context_ = default_partition_->GetIndexedDBContext(); 55 idb_context_ = default_partition_->GetIndexedDBContext();
56 idb_context_->SetTaskRunnerForTesting(
57 base::ThreadTaskRunnerHandle::Get().get());
58 56
59 default_fs_context_ = default_partition_->GetFileSystemContext(); 57 default_fs_context_ = default_partition_->GetFileSystemContext();
60 58
61 url_request_context_ = std::unique_ptr<content::MockBlobURLRequestContext>( 59 url_request_context_ = std::unique_ptr<content::MockBlobURLRequestContext>(
62 new content::MockBlobURLRequestContext(default_fs_context_)); 60 new content::MockBlobURLRequestContext(default_fs_context_));
63 } 61 }
64 62
65 void TearDown() override {} 63 void TearDown() override {}
66 64
67 protected: 65 protected:
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 content::StoragePartition* new_partition = 276 content::StoragePartition* new_partition =
279 content::BrowserContext::GetStoragePartitionForSite(profile_.get(), 277 content::BrowserContext::GetStoragePartitionForSite(profile_.get(),
280 extension_url); 278 extension_url);
281 279
282 ASSERT_NE(new_partition->GetPath(), default_partition_->GetPath()); 280 ASSERT_NE(new_partition->GetPath(), default_partition_->GetPath());
283 281
284 VerifyTestFilesMigrated(new_partition, new_ext.get()); 282 VerifyTestFilesMigrated(new_partition, new_ext.get());
285 } 283 }
286 284
287 } // namespace extensions 285 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698