Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc

Issue 10915180: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r168573 Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e2f3daa60a7d1be06ce004db47c5babf818e5749..374e60564e06e02825d4a1ba8c01460209414c54 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
@@ -6,6 +6,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_reader.h"
#include "base/values.h"
+#include "chrome/browser/history/download_row.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -13,7 +14,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 {
@@ -141,22 +141,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);
mddh.WaitForDownloadsList();
ASSERT_EQ(1, static_cast<int>(mddh.downloads_list()->GetSize()));

Powered by Google App Engine
This is Rietveld 408576698