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 "components/omnibox/browser/shortcuts_backend.h" | 5 #include "components/omnibox/browser/shortcuts_backend.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" | 14 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" |
12 #include "chrome/browser/search_engines/template_url_service_factory.h" | 15 #include "chrome/browser/search_engines/template_url_service_factory.h" |
13 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" | 16 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
14 #include "chrome/test/base/search_test_utils.h" | 17 #include "chrome/test/base/search_test_utils.h" |
15 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
16 #include "components/omnibox/browser/shortcuts_database.h" | 19 #include "components/omnibox/browser/shortcuts_database.h" |
17 #include "components/search_engines/template_url_service.h" | 20 #include "components/search_engines/template_url_service.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 ASSERT_TRUE(shortcut4_iter != shortcuts_map().end()); | 319 ASSERT_TRUE(shortcut4_iter != shortcuts_map().end()); |
317 EXPECT_EQ(shortcut4.id, shortcut4_iter->second.id); | 320 EXPECT_EQ(shortcut4.id, shortcut4_iter->second.id); |
318 | 321 |
319 ShortcutsDatabase::ShortcutIDs deleted_ids; | 322 ShortcutsDatabase::ShortcutIDs deleted_ids; |
320 deleted_ids.push_back(shortcut3.id); | 323 deleted_ids.push_back(shortcut3.id); |
321 deleted_ids.push_back(shortcut4.id); | 324 deleted_ids.push_back(shortcut4.id); |
322 EXPECT_TRUE(DeleteShortcutsWithIDs(deleted_ids)); | 325 EXPECT_TRUE(DeleteShortcutsWithIDs(deleted_ids)); |
323 | 326 |
324 ASSERT_EQ(0U, shortcuts_map().size()); | 327 ASSERT_EQ(0U, shortcuts_map().size()); |
325 } | 328 } |
OLD | NEW |