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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui_uitest.cc

Issue 2854050: Mark tests FLAKY: HomePageLink and NTPHasThumbnails (Closed)
Patch Set: Created 10 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
« 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/chrome_thread.h" 9 #include "chrome/browser/chrome_thread.h"
10 #include "chrome/browser/dom_ui/new_tab_ui.h" 10 #include "chrome/browser/dom_ui/new_tab_ui.h"
(...skipping 12 matching lines...) Expand all
23 // Set home page to the empty string so that we can set the home page using 23 // Set home page to the empty string so that we can set the home page using
24 // preferences. 24 // preferences.
25 homepage_ = L""; 25 homepage_ = L"";
26 26
27 // Setup the DEFAULT_THEME profile (has fake history entries). 27 // Setup the DEFAULT_THEME profile (has fake history entries).
28 set_template_user_data(UITest::ComputeTypicalUserDataSource( 28 set_template_user_data(UITest::ComputeTypicalUserDataSource(
29 UITest::DEFAULT_THEME)); 29 UITest::DEFAULT_THEME));
30 } 30 }
31 }; 31 };
32 32
33 TEST_F(NewTabUITest, NTPHasThumbnails) { 33 // Failing about 90% on XP. http://crbug.com/49389
34 TEST_F(NewTabUITest, FLAKY_NTPHasThumbnails) {
34 // Switch to the "new tab" tab, which should be any new tab after the 35 // Switch to the "new tab" tab, which should be any new tab after the
35 // first (the first is about:blank). 36 // first (the first is about:blank).
36 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); 37 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
37 ASSERT_TRUE(window.get()); 38 ASSERT_TRUE(window.get());
38 39
39 // Bring up a new tab page. 40 // Bring up a new tab page.
40 ASSERT_TRUE(window->RunCommand(IDC_NEW_TAB)); 41 ASSERT_TRUE(window->RunCommand(IDC_NEW_TAB));
41 int load_time; 42 int load_time;
42 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); 43 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
43 44
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 92
92 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); 93 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get());
93 ASSERT_TRUE(migrated); 94 ASSERT_TRUE(migrated);
94 ASSERT_EQ(NewTabUI::current_pref_version(), 95 ASSERT_EQ(NewTabUI::current_pref_version(),
95 prefs->GetInteger(prefs::kNTPPrefVersion)); 96 prefs->GetInteger(prefs::kNTPPrefVersion));
96 97
97 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); 98 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get());
98 ASSERT_FALSE(migrated); 99 ASSERT_FALSE(migrated);
99 } 100 }
100 101
101 TEST_F(NewTabUITest, HomePageLink) { 102 // Failing about 90% on XP. http://crbug.com/49389
103 TEST_F(NewTabUITest, FLAKY_HomePageLink) {
102 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 104 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
103 ASSERT_TRUE(browser.get()); 105 ASSERT_TRUE(browser.get());
104 106
105 ASSERT_TRUE( 107 ASSERT_TRUE(
106 browser->SetBooleanPreference(prefs::kHomePageIsNewTabPage, false)); 108 browser->SetBooleanPreference(prefs::kHomePageIsNewTabPage, false));
107 109
108 // Bring up a new tab page. 110 // Bring up a new tab page.
109 ASSERT_TRUE(browser->RunCommand(IDC_NEW_TAB)); 111 ASSERT_TRUE(browser->RunCommand(IDC_NEW_TAB));
110 int load_time; 112 int load_time;
111 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); 113 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 L"})()" 159 L"})()"
158 L")", 160 L")",
159 &has_class)); 161 &has_class));
160 ASSERT_TRUE(has_class); 162 ASSERT_TRUE(has_class);
161 163
162 bool is_home_page; 164 bool is_home_page;
163 ASSERT_TRUE(browser->GetBooleanPreference(prefs::kHomePageIsNewTabPage, 165 ASSERT_TRUE(browser->GetBooleanPreference(prefs::kHomePageIsNewTabPage,
164 &is_home_page)); 166 &is_home_page));
165 ASSERT_TRUE(is_home_page); 167 ASSERT_TRUE(is_home_page);
166 } 168 }
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