OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
12 #include "base/test/mock_time_provider.h" | 12 #include "base/test/mock_time_provider.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/browser/history/history_notifications.h" | 16 #include "chrome/browser/history/history_notifications.h" |
17 #include "chrome/browser/history/history_service.h" | 17 #include "chrome/browser/history/history_service.h" |
18 #include "chrome/browser/history/history_service_factory.h" | 18 #include "chrome/browser/history/history_service_factory.h" |
19 #include "chrome/browser/search_engines/search_host_to_urls_map.h" | 19 #include "chrome/browser/search_engines/search_host_to_urls_map.h" |
20 #include "chrome/browser/search_engines/search_terms_data.h" | 20 #include "chrome/browser/search_engines/search_terms_data.h" |
21 #include "chrome/browser/search_engines/template_url.h" | 21 #include "chrome/browser/search_engines/template_url.h" |
22 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 22 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
23 #include "chrome/browser/search_engines/template_url_service.h" | 23 #include "chrome/browser/search_engines/template_url_service.h" |
24 #include "chrome/browser/search_engines/template_url_service_test_util.h" | 24 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
25 #include "chrome/browser/webdata/web_data_service_factory.h" | 25 #include "chrome/browser/webdata/web_data_service_factory.h" |
26 #include "chrome/browser/webdata/web_database.h" | |
27 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
28 #include "chrome/test/base/testing_profile.h" | 27 #include "chrome/test/base/testing_profile.h" |
| 28 #include "components/webdata/common/web_database.h" |
29 #include "content/public/test/test_browser_thread.h" | 29 #include "content/public/test/test_browser_thread.h" |
30 #include "extensions/common/constants.h" | 30 #include "extensions/common/constants.h" |
31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
32 | 32 |
33 using base::Time; | 33 using base::Time; |
34 using base::TimeDelta; | 34 using base::TimeDelta; |
35 using content::BrowserThread; | 35 using content::BrowserThread; |
36 using ::testing::Return; | 36 using ::testing::Return; |
37 using ::testing::StrictMock; | 37 using ::testing::StrictMock; |
38 | 38 |
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 EXPECT_EQ(8U, loaded_url->input_encodings().size()); | 1515 EXPECT_EQ(8U, loaded_url->input_encodings().size()); |
1516 | 1516 |
1517 // Reload the model to verify it was actually saved to the database and the | 1517 // Reload the model to verify it was actually saved to the database and the |
1518 // duplicate encodings were removed. | 1518 // duplicate encodings were removed. |
1519 test_util_.ResetModel(true); | 1519 test_util_.ResetModel(true); |
1520 ASSERT_EQ(initial_count + 1, model()->GetTemplateURLs().size()); | 1520 ASSERT_EQ(initial_count + 1, model()->GetTemplateURLs().size()); |
1521 loaded_url = model()->GetTemplateURLForKeyword(ASCIIToUTF16("keyword")); | 1521 loaded_url = model()->GetTemplateURLForKeyword(ASCIIToUTF16("keyword")); |
1522 ASSERT_FALSE(loaded_url == NULL); | 1522 ASSERT_FALSE(loaded_url == NULL); |
1523 EXPECT_EQ(4U, loaded_url->input_encodings().size()); | 1523 EXPECT_EQ(4U, loaded_url->input_encodings().size()); |
1524 } | 1524 } |
OLD | NEW |