| 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..4b92d3000bcc4ff452f1d040327fa56c9f49c456 100644
|
| --- a/chrome/browser/first_run/first_run_browsertest.cc
|
| +++ b/chrome/browser/first_run/first_run_browsertest.cc
|
| @@ -165,7 +165,7 @@ int MaskExpectedImportState(int expected_import_state) {
|
|
|
| } // namespace
|
|
|
| -extern const char kImportDefault[] =
|
| +extern constexpr char kImportDefault[] =
|
| "{\n"
|
| "}\n";
|
| typedef FirstRunMasterPrefsBrowserTestT<kImportDefault>
|
| @@ -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 constexpr char kImportAll[] =
|
| + "{\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);
|
| @@ -185,7 +209,7 @@ IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportDefault, MAYBE_ImportDefault) {
|
|
|
| // The bookmarks file doesn't actually need to exist for this integration test
|
| // to trigger the interaction being tested.
|
| -extern const char kImportBookmarksFile[] =
|
| +extern constexpr char kImportBookmarksFile[] =
|
| "{\n"
|
| " \"distribution\": {\n"
|
| " \"import_bookmarks_from_file\": \"/foo/doesntexists.wtv\"\n"
|
| @@ -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);
|
| }
|
| @@ -212,7 +235,7 @@ IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportBookmarksFile,
|
| // Test an import with all import options disabled. This is a regression test
|
| // for http://crbug.com/169984 where this would cause the import process to
|
| // stay running, and the NTP to be loaded with no apps.
|
| -extern const char kImportNothing[] =
|
| +extern constexpr char kImportNothing[] =
|
| "{\n"
|
| " \"distribution\": {\n"
|
| " \"import_bookmarks\": false,\n"
|
| @@ -239,7 +262,7 @@ IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportNothing,
|
| }
|
|
|
| // Test first run with some tracked preferences.
|
| -extern const char kWithTrackedPrefs[] =
|
| +extern constexpr char kWithTrackedPrefs[] =
|
| "{\n"
|
| " \"homepage\": \"example.com\",\n"
|
| " \"homepage_is_newtabpage\": false\n"
|
|
|