OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // This invokes BrowserMain, and does the import, so must be done last. | 100 // This invokes BrowserMain, and does the import, so must be done last. |
101 InProcessBrowserTest::SetUp(); | 101 InProcessBrowserTest::SetUp(); |
102 } | 102 } |
103 | 103 |
104 void TearDown() override { | 104 void TearDown() override { |
105 EXPECT_TRUE(base::DeleteFile(prefs_file_, false)); | 105 EXPECT_TRUE(base::DeleteFile(prefs_file_, false)); |
106 InProcessBrowserTest::TearDown(); | 106 InProcessBrowserTest::TearDown(); |
107 } | 107 } |
108 | 108 |
109 void SetUpCommandLine(base::CommandLine* command_line) override { | 109 void SetUpCommandLine(base::CommandLine* command_line) override { |
110 InProcessBrowserTest::SetUpCommandLine(command_line); | |
111 command_line->AppendSwitch(switches::kForceFirstRun); | 110 command_line->AppendSwitch(switches::kForceFirstRun); |
112 EXPECT_EQ(first_run::AUTO_IMPORT_NONE, first_run::auto_import_state()); | 111 EXPECT_EQ(first_run::AUTO_IMPORT_NONE, first_run::auto_import_state()); |
113 | 112 |
114 extensions::ComponentLoader::EnableBackgroundExtensionsForTesting(); | 113 extensions::ComponentLoader::EnableBackgroundExtensionsForTesting(); |
115 } | 114 } |
116 | 115 |
117 void SetMasterPreferencesForTest(const char text[]) { | 116 void SetMasterPreferencesForTest(const char text[]) { |
118 text_.reset(new std::string(text)); | 117 text_.reset(new std::string(text)); |
119 } | 118 } |
120 | 119 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 FirstRunMasterPrefsWithTrackedPreferences, | 328 FirstRunMasterPrefsWithTrackedPreferences, |
330 testing::Values( | 329 testing::Values( |
331 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement, | 330 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement, |
332 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways, | 331 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways, |
333 chrome_prefs::internals:: | 332 chrome_prefs::internals:: |
334 kSettingsEnforcementGroupEnforceAlwaysWithDSE, | 333 kSettingsEnforcementGroupEnforceAlwaysWithDSE, |
335 chrome_prefs::internals:: | 334 chrome_prefs::internals:: |
336 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE)); | 335 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE)); |
337 | 336 |
338 #endif // !defined(OS_CHROMEOS) | 337 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |