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

Unified Diff: chrome/browser/profiles/profile_destroyer_unittest.cc

Issue 2842333004: attempt to revive profile_destroyer_unittest.cc
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_destroyer_unittest.cc
diff --git a/chrome/browser/profiles/profile_destroyer_unittest.cc b/chrome/browser/profiles/profile_destroyer_unittest.cc
index ac0cba5695d11ff2efed32fd11ac7c60cdc26a59..7e5e4160e2df17246370c2f90f2626a575014e62 100644
--- a/chrome/browser/profiles/profile_destroyer_unittest.cc
+++ b/chrome/browser/profiles/profile_destroyer_unittest.cc
@@ -6,8 +6,11 @@
#include "base/macros.h"
#include "base/run_loop.h"
+#include "chrome/browser/extensions/extension_special_storage_policy.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/policy/core/common/policy_service.h"
+#include "components/sync_preferences/pref_service_syncable.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/site_instance.h"
@@ -17,12 +20,18 @@ class TestingOffTheRecordDestructionProfile : public TestingProfile {
: TestingProfile(
base::FilePath(),
NULL,
- scoped_refptr<ExtensionSpecialStoragePolicy>()
- std::unique_ptr<sync_preferences::PrefServiceSyncable>(),
- true,
- TestingFactories()),
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+ scoped_refptr<ExtensionSpecialStoragePolicy>(),
+#endif
+ std::unique_ptr<sync_preferences::PrefServiceSyncable>(),
+ /*parent=*/NULL,
+ /*guest_session=*/true,
+ /*supervised_user_id=*/"",
+ std::unique_ptr<policy::PolicyService>(),
+ TestingFactories(),
+ /*profile_name=*/""),
destroyed_otr_profile_(false) {
- set_incognito(true);
+ ForceIncognito(true);
}
void DestroyOffTheRecordProfile() override {
destroyed_otr_profile_ = true;
@@ -109,13 +118,14 @@ TEST_F(ProfileDestroyerTest, DelayOriginalProfileDestruction) {
TestingOriginalDestructionProfile* original_profile =
new TestingOriginalDestructionProfile;
- TestingOffTheRecordDestructionProfile* off_the_record_profile =
- new TestingOffTheRecordDestructionProfile;
+ std::unique_ptr<TestingOffTheRecordDestructionProfile>
+ off_the_record_profile(new TestingOffTheRecordDestructionProfile);
+
- original_profile->SetOffTheRecordProfile(off_the_record_profile);
+ original_profile->SetOffTheRecordProfile(std::move(off_the_record_profile));
- scoped_refptr<content::SiteInstance> instance1(
- content::SiteInstance::Create(off_the_record_profile));
+ scoped_refptr<content::SiteInstance> instance1(content::SiteInstance::Create(
+ original_profile->GetOffTheRecordProfile()));
std::unique_ptr<content::RenderProcessHost> render_process_host1;
render_process_host1.reset(instance1->GetProcess());
ASSERT_TRUE(render_process_host1.get() != NULL);
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698