OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 Loading... |
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_ = ""; | 25 homepage_ = ""; |
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 // Fails on XP, Linux: http://crbug.com/51721 |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 ASSERT_EQ(0, prefs->GetInteger(prefs::kNTPPrefVersion)); | 89 ASSERT_EQ(0, prefs->GetInteger(prefs::kNTPPrefVersion)); |
89 | 90 |
90 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); | 91 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); |
91 ASSERT_TRUE(migrated); | 92 ASSERT_TRUE(migrated); |
92 ASSERT_EQ(NewTabUI::current_pref_version(), | 93 ASSERT_EQ(NewTabUI::current_pref_version(), |
93 prefs->GetInteger(prefs::kNTPPrefVersion)); | 94 prefs->GetInteger(prefs::kNTPPrefVersion)); |
94 | 95 |
95 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); | 96 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); |
96 ASSERT_FALSE(migrated); | 97 ASSERT_FALSE(migrated); |
97 } | 98 } |
OLD | NEW |