OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/history/core/test/history_backend_db_base_test.h" | 5 #include "components/history/core/test/history_backend_db_base_test.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 KeywordID keyword_id, | 55 KeywordID keyword_id, |
56 const base::string16& term) override {} | 56 const base::string16& term) override {} |
57 void NotifyKeywordSearchTermDeleted(URLID url_id) override {} | 57 void NotifyKeywordSearchTermDeleted(URLID url_id) override {} |
58 void DBLoaded() override {} | 58 void DBLoaded() override {} |
59 | 59 |
60 private: | 60 private: |
61 HistoryBackendDBBaseTest* history_test_; | 61 HistoryBackendDBBaseTest* history_test_; |
62 }; | 62 }; |
63 | 63 |
64 HistoryBackendDBBaseTest::HistoryBackendDBBaseTest() | 64 HistoryBackendDBBaseTest::HistoryBackendDBBaseTest() |
65 : db_(nullptr), | 65 : scoped_task_environment_( |
66 last_profile_error_ (sql::INIT_OK) { | 66 base::test::ScopedTaskEnvironment::MainThreadType::UI), |
67 } | 67 db_(nullptr), |
| 68 last_profile_error_(sql::INIT_OK) {} |
68 | 69 |
69 HistoryBackendDBBaseTest::~HistoryBackendDBBaseTest() { | 70 HistoryBackendDBBaseTest::~HistoryBackendDBBaseTest() { |
70 } | 71 } |
71 | 72 |
72 void HistoryBackendDBBaseTest::SetUp() { | 73 void HistoryBackendDBBaseTest::SetUp() { |
73 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 74 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
74 history_dir_ = temp_dir_.GetPath().AppendASCII("HistoryBackendDBBaseTest"); | 75 history_dir_ = temp_dir_.GetPath().AppendASCII("HistoryBackendDBBaseTest"); |
75 ASSERT_TRUE(base::CreateDirectory(history_dir_)); | 76 ASSERT_TRUE(base::CreateDirectory(history_dir_)); |
76 } | 77 } |
77 | 78 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 GURL("http://tab-referrer-url.example.com/"), std::string(), | 135 GURL("http://tab-referrer-url.example.com/"), std::string(), |
135 "application/vnd.oasis.opendocument.text", "application/octet-stream", | 136 "application/vnd.oasis.opendocument.text", "application/octet-stream", |
136 time, time, std::string(), std::string(), 0, 512, state, | 137 time, time, std::string(), std::string(), 0, 512, state, |
137 DownloadDangerType::NOT_DANGEROUS, kTestDownloadInterruptReasonNone, | 138 DownloadDangerType::NOT_DANGEROUS, kTestDownloadInterruptReasonNone, |
138 std::string(), id, guid, false, time, true, "by_ext_id", "by_ext_name", | 139 std::string(), id, guid, false, time, true, "by_ext_id", "by_ext_name", |
139 std::vector<DownloadSliceInfo>()); | 140 std::vector<DownloadSliceInfo>()); |
140 return db_->CreateDownload(download); | 141 return db_->CreateDownload(download); |
141 } | 142 } |
142 | 143 |
143 } // namespace history | 144 } // namespace history |
OLD | NEW |