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

Side by Side Diff: chrome/browser/first_run/first_run_browsertest.cc

Issue 18120005: Remove Google Toolbar importer (aka google.com/bookmarks importer). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: -explicit Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 private: 131 private:
132 DISALLOW_COPY_AND_ASSIGN(FirstRunMasterPrefsBrowserTestT); 132 DISALLOW_COPY_AND_ASSIGN(FirstRunMasterPrefsBrowserTestT);
133 }; 133 };
134 134
135 // Returns the true expected import state, derived from the original 135 // Returns the true expected import state, derived from the original
136 // |expected_import_state|, for the current test machine's configuration. Some 136 // |expected_import_state|, for the current test machine's configuration. Some
137 // bot configurations do not have another profile (browser) to import from and 137 // bot configurations do not have another profile (browser) to import from and
138 // thus the import must not be expected to have occurred. 138 // thus the import must not be expected to have occurred.
139 int MaskExpectedImportState(int expected_import_state) { 139 int MaskExpectedImportState(int expected_import_state) {
140 scoped_refptr<ImporterList> importer_list(new ImporterList(NULL)); 140 scoped_refptr<ImporterList> importer_list(new ImporterList());
141 importer_list->DetectSourceProfilesHack( 141 importer_list->DetectSourceProfilesHack(
142 g_browser_process->GetApplicationLocale()); 142 g_browser_process->GetApplicationLocale());
143 int source_profile_count = importer_list->count(); 143 int source_profile_count = importer_list->count();
144 #if defined(OS_WIN) 144 #if defined(OS_WIN)
145 // On Windows, the importer's DetectIEProfiles() will always add to the count. 145 // On Windows, the importer's DetectIEProfiles() will always add to the count.
146 // Internet Explorer always exists and always has something to import. 146 // Internet Explorer always exists and always has something to import.
147 EXPECT_GT(source_profile_count, 0); 147 EXPECT_GT(source_profile_count, 0);
148 #endif 148 #endif
149 if (source_profile_count == 0) 149 if (source_profile_count == 0)
150 return expected_import_state & ~first_run::AUTO_IMPORT_PROFILE_IMPORTED; 150 return expected_import_state & ~first_run::AUTO_IMPORT_PROFILE_IMPORTED;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 ImportNothingAndShowNewTabPage) { 204 ImportNothingAndShowNewTabPage) {
205 EXPECT_EQ(first_run::AUTO_IMPORT_CALLED, first_run::auto_import_state()); 205 EXPECT_EQ(first_run::AUTO_IMPORT_CALLED, first_run::auto_import_state());
206 ui_test_utils::NavigateToURLWithDisposition( 206 ui_test_utils::NavigateToURLWithDisposition(
207 browser(), GURL(chrome::kChromeUINewTabURL), CURRENT_TAB, 207 browser(), GURL(chrome::kChromeUINewTabURL), CURRENT_TAB,
208 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 208 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
209 content::WebContents* tab = browser()->tab_strip_model()->GetWebContentsAt(0); 209 content::WebContents* tab = browser()->tab_strip_model()->GetWebContentsAt(0);
210 EXPECT_EQ(1, tab->GetMaxPageID()); 210 EXPECT_EQ(1, tab->GetMaxPageID());
211 } 211 }
212 212
213 #endif // !defined(OS_CHROMEOS) 213 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/importer/external_process_importer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698