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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 class ShortcutsBackendTest : public testing::Test, | 27 class ShortcutsBackendTest : public testing::Test, |
28 public ShortcutsBackend::ShortcutsBackendObserver { | 28 public ShortcutsBackend::ShortcutsBackendObserver { |
29 public: | 29 public: |
30 ShortcutsBackendTest() | 30 ShortcutsBackendTest() |
31 : ui_thread_(BrowserThread::UI, &ui_message_loop_), | 31 : ui_thread_(BrowserThread::UI, &ui_message_loop_), |
32 db_thread_(BrowserThread::DB), | 32 db_thread_(BrowserThread::DB), |
33 load_notified_(false), | 33 load_notified_(false), |
34 changed_notified_(false) {} | 34 changed_notified_(false) {} |
35 | 35 |
36 void SetUp(); | 36 virtual void SetUp(); |
37 void TearDown(); | 37 virtual void TearDown(); |
38 | 38 |
39 virtual void OnShortcutsLoaded() OVERRIDE; | 39 virtual void OnShortcutsLoaded() OVERRIDE; |
40 virtual void OnShortcutsChanged() OVERRIDE; | 40 virtual void OnShortcutsChanged() OVERRIDE; |
41 | 41 |
42 void InitBackend(); | 42 void InitBackend(); |
43 | 43 |
44 TestingProfile profile_; | 44 TestingProfile profile_; |
45 scoped_refptr<ShortcutsBackend> backend_; | 45 scoped_refptr<ShortcutsBackend> backend_; |
46 MessageLoopForUI ui_message_loop_; | 46 MessageLoopForUI ui_message_loop_; |
47 content::TestBrowserThread ui_thread_; | 47 content::TestBrowserThread ui_thread_; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 std::vector<std::string> deleted_ids; | 166 std::vector<std::string> deleted_ids; |
167 deleted_ids.push_back(shortcut3.id); | 167 deleted_ids.push_back(shortcut3.id); |
168 deleted_ids.push_back(shortcut4.id); | 168 deleted_ids.push_back(shortcut4.id); |
169 | 169 |
170 EXPECT_TRUE(backend_->DeleteShortcutsWithIds(deleted_ids)); | 170 EXPECT_TRUE(backend_->DeleteShortcutsWithIds(deleted_ids)); |
171 | 171 |
172 ASSERT_EQ(0U, shortcuts.size()); | 172 ASSERT_EQ(0U, shortcuts.size()); |
173 } | 173 } |
174 | 174 |
175 } // namespace history | 175 } // namespace history |
OLD | NEW |