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 "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
8 #include "base/test/mock_time_provider.h" | 8 #include "base/test/mock_time_provider.h" |
9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/history/history.h" | 13 #include "chrome/browser/history/history.h" |
14 #include "chrome/browser/history/history_notifications.h" | 14 #include "chrome/browser/history/history_notifications.h" |
15 #include "chrome/browser/search_engines/search_host_to_urls_map.h" | 15 #include "chrome/browser/search_engines/search_host_to_urls_map.h" |
16 #include "chrome/browser/search_engines/search_terms_data.h" | 16 #include "chrome/browser/search_engines/search_terms_data.h" |
17 #include "chrome/browser/search_engines/template_url.h" | 17 #include "chrome/browser/search_engines/template_url.h" |
18 #include "chrome/browser/search_engines/template_url_service.h" | 18 #include "chrome/browser/search_engines/template_url_service.h" |
19 #include "chrome/browser/search_engines/template_url_service_test_util.h" | 19 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
20 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 20 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
21 #include "chrome/browser/webdata/web_database.h" | 21 #include "chrome/browser/webdata/web_database.h" |
22 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/common/chrome_notification_types.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/test/base/testing_pref_service.h" |
24 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
25 #include "chrome/test/testing_pref_service.h" | |
26 #include "content/browser/browser_thread.h" | 26 #include "content/browser/browser_thread.h" |
27 #include "content/common/notification_details.h" | 27 #include "content/common/notification_details.h" |
28 #include "content/common/notification_source.h" | 28 #include "content/common/notification_source.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 using base::Time; | 31 using base::Time; |
32 using base::TimeDelta; | 32 using base::TimeDelta; |
33 using ::testing::Return; | 33 using ::testing::Return; |
34 using ::testing::StrictMock; | 34 using ::testing::StrictMock; |
35 | 35 |
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 model()->SetDefaultSearchProvider(t_url); | 1237 model()->SetDefaultSearchProvider(t_url); |
1238 EXPECT_EQ(t_url, model()->GetDefaultSearchProvider()); | 1238 EXPECT_EQ(t_url, model()->GetDefaultSearchProvider()); |
1239 | 1239 |
1240 // Now reset the model again but load it after setting the preferences. | 1240 // Now reset the model again but load it after setting the preferences. |
1241 ResetModel(false); | 1241 ResetModel(false); |
1242 SetManagedDefaultSearchPreferences(false, "", "", "", "", "", ""); | 1242 SetManagedDefaultSearchPreferences(false, "", "", "", "", "", ""); |
1243 VerifyLoad(); | 1243 VerifyLoad(); |
1244 EXPECT_TRUE(model()->is_default_search_managed()); | 1244 EXPECT_TRUE(model()->is_default_search_managed()); |
1245 EXPECT_TRUE(model()->GetDefaultSearchProvider() == NULL); | 1245 EXPECT_TRUE(model()->GetDefaultSearchProvider() == NULL); |
1246 } | 1246 } |
OLD | NEW |