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

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

Issue 54643009: Disable Failing Imports related tests on official bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moo
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return expected_import_state; 152 return expected_import_state;
153 } 153 }
154 154
155 } // namespace 155 } // namespace
156 156
157 extern const char kImportDefault[] = 157 extern const char kImportDefault[] =
158 "{\n" 158 "{\n"
159 "}\n"; 159 "}\n";
160 typedef FirstRunMasterPrefsBrowserTestT<kImportDefault> 160 typedef FirstRunMasterPrefsBrowserTestT<kImportDefault>
161 FirstRunMasterPrefsImportDefault; 161 FirstRunMasterPrefsImportDefault;
162 IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportDefault, ImportDefault) { 162 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
163 // Fails on Mac and Linux official builds. See http://crbug.com/314221
cpu_(ooo_6.6-7.5) 2013/11/01 22:49:04 shouldn't the comment be "fails on Windows officia
gab 2013/11/04 14:34:58 The bug seems the suggest the problem is Mac.. ifd
164 #define MAYBE_ImportDefault DISABLED_ImportDefault
165 #else
166 #define MAYBE_ImportDefault ImportDefault
167 #endif
168 IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportDefault, MAYBE_ImportDefault) {
163 int auto_import_state = first_run::auto_import_state(); 169 int auto_import_state = first_run::auto_import_state();
164 EXPECT_EQ(MaskExpectedImportState(first_run::AUTO_IMPORT_CALLED | 170 EXPECT_EQ(MaskExpectedImportState(first_run::AUTO_IMPORT_CALLED |
165 first_run::AUTO_IMPORT_PROFILE_IMPORTED), 171 first_run::AUTO_IMPORT_PROFILE_IMPORTED),
166 auto_import_state); 172 auto_import_state);
167 } 173 }
168 174
169 // The bookmarks file doesn't actually need to exist for this integration test 175 // The bookmarks file doesn't actually need to exist for this integration test
170 // to trigger the interaction being tested. 176 // to trigger the interaction being tested.
171 extern const char kImportBookmarksFile[] = 177 extern const char kImportBookmarksFile[] =
172 "{\n" 178 "{\n"
173 " \"distribution\": {\n" 179 " \"distribution\": {\n"
174 " \"import_bookmarks_from_file\": \"/foo/doesntexists.wtv\"\n" 180 " \"import_bookmarks_from_file\": \"/foo/doesntexists.wtv\"\n"
175 " }\n" 181 " }\n"
176 "}\n"; 182 "}\n";
177 typedef FirstRunMasterPrefsBrowserTestT<kImportBookmarksFile> 183 typedef FirstRunMasterPrefsBrowserTestT<kImportBookmarksFile>
178 FirstRunMasterPrefsImportBookmarksFile; 184 FirstRunMasterPrefsImportBookmarksFile;
185 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
186 // Fails on Mac and Linux official builds. See http://crbug.com/314221
187 #define MAYBE_ImportBookmarksFile DISABLED_ImportBookmarksFile
188 #else
189 #define MAYBE_ImportBookmarksFile ImportBookmarksFile
190 #endif
179 IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportBookmarksFile, 191 IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportBookmarksFile,
180 ImportBookmarksFile) { 192 MAYBE_ImportBookmarksFile) {
181 int auto_import_state = first_run::auto_import_state(); 193 int auto_import_state = first_run::auto_import_state();
182 EXPECT_EQ( 194 EXPECT_EQ(
183 MaskExpectedImportState(first_run::AUTO_IMPORT_CALLED | 195 MaskExpectedImportState(first_run::AUTO_IMPORT_CALLED |
184 first_run::AUTO_IMPORT_PROFILE_IMPORTED | 196 first_run::AUTO_IMPORT_PROFILE_IMPORTED |
185 first_run::AUTO_IMPORT_BOOKMARKS_FILE_IMPORTED), 197 first_run::AUTO_IMPORT_BOOKMARKS_FILE_IMPORTED),
186 auto_import_state); 198 auto_import_state);
187 } 199 }
188 200
189 // Test an import with all import options disabled. This is a regression test 201 // Test an import with all import options disabled. This is a regression test
190 // for http://crbug.com/169984 where this would cause the import process to 202 // for http://crbug.com/169984 where this would cause the import process to
191 // stay running, and the NTP to be loaded with no apps. 203 // stay running, and the NTP to be loaded with no apps.
192 extern const char kImportNothing[] = 204 extern const char kImportNothing[] =
193 "{\n" 205 "{\n"
194 " \"distribution\": {\n" 206 " \"distribution\": {\n"
195 " \"import_bookmarks\": false,\n" 207 " \"import_bookmarks\": false,\n"
196 " \"import_history\": false,\n" 208 " \"import_history\": false,\n"
197 " \"import_home_page\": false,\n" 209 " \"import_home_page\": false,\n"
198 " \"import_search_engine\": false\n" 210 " \"import_search_engine\": false\n"
199 " }\n" 211 " }\n"
200 "}\n"; 212 "}\n";
201 typedef FirstRunMasterPrefsBrowserTestT<kImportNothing> 213 typedef FirstRunMasterPrefsBrowserTestT<kImportNothing>
202 FirstRunMasterPrefsImportNothing; 214 FirstRunMasterPrefsImportNothing;
215 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
216 // Fails on Mac and Linux official builds. See http://crbug.com/314221
217 #define MAYBE_ImportNothingAndShowNewTabPage \
218 DISABLED_ImportNothingAndShowNewTabPage
219 #else
220 #define MAYBE_ImportNothingAndShowNewTabPage ImportNothingAndShowNewTabPage
221 #endif
203 IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportNothing, 222 IN_PROC_BROWSER_TEST_F(FirstRunMasterPrefsImportNothing,
204 ImportNothingAndShowNewTabPage) { 223 MAYBE_ImportNothingAndShowNewTabPage) {
205 EXPECT_EQ(first_run::AUTO_IMPORT_CALLED, first_run::auto_import_state()); 224 EXPECT_EQ(first_run::AUTO_IMPORT_CALLED, first_run::auto_import_state());
206 ui_test_utils::NavigateToURLWithDisposition( 225 ui_test_utils::NavigateToURLWithDisposition(
207 browser(), GURL(chrome::kChromeUINewTabURL), CURRENT_TAB, 226 browser(), GURL(chrome::kChromeUINewTabURL), CURRENT_TAB,
208 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 227 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
209 content::WebContents* tab = browser()->tab_strip_model()->GetWebContentsAt(0); 228 content::WebContents* tab = browser()->tab_strip_model()->GetWebContentsAt(0);
210 EXPECT_EQ(1, tab->GetMaxPageID()); 229 EXPECT_EQ(1, tab->GetMaxPageID());
211 } 230 }
212 231
213 #endif // !defined(OS_CHROMEOS) 232 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698