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

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

Issue 2856044: Revert "Mark tests FLAKY: HomePageLink and NTPHasThumbnails" (Closed) Base URL: http://src.chromium.org/git/chromium.git
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 // Failing about 90% on XP. http://crbug.com/49389 33 TEST_F(NewTabUITest, NTPHasThumbnails) {
34 TEST_F(NewTabUITest, FLAKY_NTPHasThumbnails) {
35 // Switch to the "new tab" tab, which should be any new tab after the 34 // Switch to the "new tab" tab, which should be any new tab after the
36 // first (the first is about:blank). 35 // first (the first is about:blank).
37 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); 36 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
38 ASSERT_TRUE(window.get()); 37 ASSERT_TRUE(window.get());
39 38
40 // Bring up a new tab page. 39 // Bring up a new tab page.
41 ASSERT_TRUE(window->RunCommand(IDC_NEW_TAB)); 40 ASSERT_TRUE(window->RunCommand(IDC_NEW_TAB));
42 int load_time; 41 int load_time;
43 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); 42 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
44 43
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 91
93 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); 92 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get());
94 ASSERT_TRUE(migrated); 93 ASSERT_TRUE(migrated);
95 ASSERT_EQ(NewTabUI::current_pref_version(), 94 ASSERT_EQ(NewTabUI::current_pref_version(),
96 prefs->GetInteger(prefs::kNTPPrefVersion)); 95 prefs->GetInteger(prefs::kNTPPrefVersion));
97 96
98 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); 97 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get());
99 ASSERT_FALSE(migrated); 98 ASSERT_FALSE(migrated);
100 } 99 }
101 100
102 // Failing about 90% on XP. http://crbug.com/49389 101 TEST_F(NewTabUITest, HomePageLink) {
103 TEST_F(NewTabUITest, FLAKY_HomePageLink) {
104 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 102 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
105 ASSERT_TRUE(browser.get()); 103 ASSERT_TRUE(browser.get());
106 104
107 ASSERT_TRUE( 105 ASSERT_TRUE(
108 browser->SetBooleanPreference(prefs::kHomePageIsNewTabPage, false)); 106 browser->SetBooleanPreference(prefs::kHomePageIsNewTabPage, false));
109 107
110 // Bring up a new tab page. 108 // Bring up a new tab page.
111 ASSERT_TRUE(browser->RunCommand(IDC_NEW_TAB)); 109 ASSERT_TRUE(browser->RunCommand(IDC_NEW_TAB));
112 int load_time; 110 int load_time;
113 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); 111 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 L"})()" 157 L"})()"
160 L")", 158 L")",
161 &has_class)); 159 &has_class));
162 ASSERT_TRUE(has_class); 160 ASSERT_TRUE(has_class);
163 161
164 bool is_home_page; 162 bool is_home_page;
165 ASSERT_TRUE(browser->GetBooleanPreference(prefs::kHomePageIsNewTabPage, 163 ASSERT_TRUE(browser->GetBooleanPreference(prefs::kHomePageIsNewTabPage,
166 &is_home_page)); 164 &is_home_page));
167 ASSERT_TRUE(is_home_page); 165 ASSERT_TRUE(is_home_page);
168 } 166 }
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