OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/prefs/pref_value_store.h" | 9 #include "chrome/browser/prefs/pref_value_store.h" |
10 #include "chrome/browser/sync/signin_manager.h" | 10 #include "chrome/browser/sync/signin_manager.h" |
11 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 11 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "chrome/common/json_pref_store.h" | 13 #include "chrome/common/json_pref_store.h" |
14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
16 #include "chrome/test/automation/automation_proxy.h" | 16 #include "chrome/test/automation/automation_proxy.h" |
17 #include "chrome/test/automation/browser_proxy.h" | 17 #include "chrome/test/automation/browser_proxy.h" |
18 #include "chrome/test/automation/tab_proxy.h" | 18 #include "chrome/test/automation/tab_proxy.h" |
19 #include "chrome/test/automation/window_proxy.h" | 19 #include "chrome/test/automation/window_proxy.h" |
20 #include "chrome/test/testing_pref_service.h" | 20 #include "chrome/test/base/testing_pref_service.h" |
21 | 21 |
22 class NewTabUITest : public UITest { | 22 class NewTabUITest : public UITest { |
23 public: | 23 public: |
24 NewTabUITest() { | 24 NewTabUITest() { |
25 dom_automation_enabled_ = true; | 25 dom_automation_enabled_ = true; |
26 // Set home page to the empty string so that we can set the home page using | 26 // Set home page to the empty string so that we can set the home page using |
27 // preferences. | 27 // preferences. |
28 set_homepage(""); | 28 set_homepage(""); |
29 | 29 |
30 // Setup the DEFAULT_THEME profile (has fake history entries). | 30 // Setup the DEFAULT_THEME profile (has fake history entries). |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 ASSERT_EQ(0, prefs->GetInteger(prefs::kNTPPrefVersion)); | 204 ASSERT_EQ(0, prefs->GetInteger(prefs::kNTPPrefVersion)); |
205 | 205 |
206 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); | 206 bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); |
207 ASSERT_TRUE(migrated); | 207 ASSERT_TRUE(migrated); |
208 ASSERT_EQ(NewTabUI::current_pref_version(), | 208 ASSERT_EQ(NewTabUI::current_pref_version(), |
209 prefs->GetInteger(prefs::kNTPPrefVersion)); | 209 prefs->GetInteger(prefs::kNTPPrefVersion)); |
210 | 210 |
211 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); | 211 migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get()); |
212 ASSERT_FALSE(migrated); | 212 ASSERT_FALSE(migrated); |
213 } | 213 } |
OLD | NEW |