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

Unified Diff: chrome/browser/first_run/first_run_browsertest.cc

Issue 2705113005: Update AutoImport to import nothing by default (in absence of policy and master_prefs). (Closed)
Patch Set: Created 3 years, 10 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
Index: chrome/browser/first_run/first_run_browsertest.cc
diff --git a/chrome/browser/first_run/first_run_browsertest.cc b/chrome/browser/first_run/first_run_browsertest.cc
index 90250a41410f4ce33a66c37b99516486bf32d411..321d37a4d189ba104889a66df4cfc7864490e26d 100644
--- a/chrome/browser/first_run/first_run_browsertest.cc
+++ b/chrome/browser/first_run/first_run_browsertest.cc
@@ -176,8 +176,32 @@ typedef FirstRunMasterPrefsBrowserTestT<kImportDefault>
#else
#define MAYBE_ImportDefault ImportDefault
#endif
+// No items are imported by default.
IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportDefault, MAYBE_ImportDefault) {
int auto_import_state = first_run::auto_import_state();
+ EXPECT_EQ(MaskExpectedImportState(first_run::AUTO_IMPORT_CALLED),
+ auto_import_state);
+}
+
+extern const char kImportAll[] =
grt (UTC plus 2) 2017/02/23 14:05:48 why do these all have external linkage? why not ju
gab 2017/02/23 20:37:40 I forget, IIRC it was required for the template ma
+ "{\n"
+ " \"distribution\": {\n"
+ " \"import_bookmarks\": true,\n"
+ " \"import_history\": true,\n"
+ " \"import_home_page\": true,\n"
+ " \"import_search_engine\": true\n"
+ " }\n"
+ "}\n";
+typedef FirstRunMasterPrefsBrowserTestT<kImportAll>
+ FirstRunMasterPrefsImportAll;
+// http://crbug.com/314221
+#if defined(OS_MACOSX) || (defined(GOOGLE_CHROME_BUILD) && defined(OS_LINUX))
+#define MAYBE_ImportAll DISABLED_ImportAll
+#else
+#define MAYBE_ImportAll ImportAll
+#endif
+IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportAll, MAYBE_ImportAll) {
+ int auto_import_state = first_run::auto_import_state();
EXPECT_EQ(MaskExpectedImportState(first_run::AUTO_IMPORT_CALLED |
first_run::AUTO_IMPORT_PROFILE_IMPORTED),
auto_import_state);
@@ -204,7 +228,6 @@ IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportBookmarksFile,
int auto_import_state = first_run::auto_import_state();
EXPECT_EQ(
MaskExpectedImportState(first_run::AUTO_IMPORT_CALLED |
- first_run::AUTO_IMPORT_PROFILE_IMPORTED |
first_run::AUTO_IMPORT_BOOKMARKS_FILE_IMPORTED),
auto_import_state);
}

Powered by Google App Engine
This is Rietveld 408576698