Index: chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc |
diff --git a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc |
index 0c90358815c5e8d0dcab635b4b701170eb07a0d4..2d2d4c1368b9f0f256094b9af97360d3d08a947f 100644 |
--- a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc |
+++ b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc |
@@ -5,6 +5,7 @@ |
#include "base/json/json_reader.h" |
#include "base/scoped_temp_dir.h" |
#include "base/values.h" |
+#include "chrome/browser/history/download_persistent_store_info.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
@@ -12,7 +13,6 @@ |
#include "chrome/common/pref_names.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
-#include "content/public/browser/download_persistent_store_info.h" |
#include "content/public/browser/web_contents.h" |
namespace { |
@@ -111,22 +111,16 @@ IN_PROC_BROWSER_TEST_F(DownloadsDOMHandlerTest, |
GURL url = test_server()->GetURL("files/downloads/image.jpg"); |
base::Time current(base::Time::Now()); |
- content::DownloadPersistentStoreInfo population_entries[] = { |
- content::DownloadPersistentStoreInfo( |
- FilePath(FILE_PATH_LITERAL("/path/to/file")), |
- url, |
- GURL(""), |
- current - base::TimeDelta::FromMinutes(5), |
- current, |
- 128, |
- 128, |
- content::DownloadItem::COMPLETE, |
- 1, |
- false), |
- }; |
- std::vector<content::DownloadPersistentStoreInfo> entries( |
- population_entries, population_entries + arraysize(population_entries)); |
- download_manager()->OnPersistentStoreQueryComplete(&entries); |
+ download_manager()->CreateDownloadItem( |
+ FilePath(FILE_PATH_LITERAL("/path/to/file")), |
+ url, |
+ GURL(""), |
+ current - base::TimeDelta::FromMinutes(5), |
+ current, |
+ 128, |
+ 128, |
+ content::DownloadItem::COMPLETE, |
+ false); |
content::RunMessageLoop(); |
ASSERT_EQ(1, static_cast<int>(mddh.downloads_list()->GetSize())); |