FirstRunMasterPrefsBrowserTestBase() {}
protected:
- virtual void SetUp() OVERRIDE {
+ void SetUp() override {
// All users of this test class need to call SetMasterPreferencesForTest()
// before this class' SetUp() is invoked.
ASSERT_TRUE(text_.get());
ASSERT_TRUE(base::CreateTemporaryFile(&prefs_file_));
- EXPECT_TRUE(file_util::WriteFile(prefs_file_, text_->c_str(),
- text_->size()));
+ EXPECT_TRUE(base::WriteFile(prefs_file_, text_->c_str(), text_->size()));
first_run::SetMasterPrefsPathForTesting(prefs_file_);
// This invokes BrowserMain, and does the import, so must be done last.
InProcessBrowserTest::SetUp();
}
- virtual void TearDown() OVERRIDE {
+ void TearDown() override {
EXPECT_TRUE(base::DeleteFile(prefs_file_, false));
InProcessBrowserTest::TearDown();
}
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ void SetUpCommandLine(CommandLine* command_line) override {
InProcessBrowserTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kForceFirstRun);
EXPECT_EQ(first_run::AUTO_IMPORT_NONE, first_run::auto_import_state());
FirstRunMasterPrefsBrowserTestT() {}
protected:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
SetMasterPreferencesForTest(Text);
FirstRunMasterPrefsBrowserTestBase::SetUp();
}
// bot configurations do not have another profile (browser) to import from and
// thus the import must not be expected to have occurred.
int MaskExpectedImportState(int expected_import_state) {
- scoped_refptr<ImporterList> importer_list(new ImporterList());
- importer_list->DetectSourceProfilesHack(
- g_browser_process->GetApplicationLocale(), false);
+ scoped_ptr<ImporterList> importer_list(new ImporterList());
+ base::RunLoop run_loop;
+ importer_list->DetectSourceProfiles(
+ g_browser_process->GetApplicationLocale(),
+ false, // include_interactive_profiles?
+ run_loop.QuitClosure());
+ run_loop.Run();
int source_profile_count = importer_list->count();
#if defined(OS_WIN)
// On Windows, the importer's DetectIEProfiles() will always add to the count.
#endif
if (source_profile_count == 0)
return expected_import_state & ~first_run::AUTO_IMPORT_PROFILE_IMPORTED;
-
return expected_import_state;
}
: public FirstRunMasterPrefsBrowserTestT<kWithTrackedPrefs>,
public testing::WithParamInterface<std::string> {
public:
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ void SetUpCommandLine(CommandLine* command_line) override {
FirstRunMasterPrefsBrowserTestT::SetUpCommandLine(command_line);
command_line->AppendSwitchASCII(
switches::kForceFieldTrials,
FirstRunMasterPrefsWithTrackedPreferences,
testing::Values(
chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement,
- chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload,
- chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways));
-
+ chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways,
+ chrome_prefs::internals::
+ kSettingsEnforcementGroupEnforceAlwaysWithDSE,
+ chrome_prefs::internals::
+ kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE));
#endif // !defined(OS_CHROMEOS)