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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api_unittest.cc

Issue 10912183: Remove DownloadManager::GetDownloadItem in favor of GetDownload() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 months 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/extensions/api/downloads/downloads_api_unittest.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
index dd38572ca07b62e8ef8e983c5b414065ab343d7d..a39ca585957aa82edfa4afdcd7c56d29033c3132 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -1409,8 +1409,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
Randy Smith (Not in Mondays) 2012/09/11 19:02:21 I'm guessing that you query-replaced and didn't re
benjhayden 2012/09/12 18:17:25 Done.
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1450,8 +1450,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1604,8 +1604,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1645,8 +1645,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1689,8 +1689,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1734,8 +1734,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1769,8 +1769,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1817,8 +1817,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1855,8 +1855,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1894,8 +1894,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1941,8 +1941,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -1980,8 +1980,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -2015,8 +2015,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result.get());
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
@@ -2064,8 +2064,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
int result_id = -1;
ASSERT_TRUE(result->GetAsInteger(&result_id));
- DownloadItem* item = GetCurrentManager()->GetActiveDownloadItem(result_id);
- if (!item) item = GetCurrentManager()->GetDownloadItem(result_id);
+ DownloadItem* item = GetCurrentManager()->GetDownload(result_id);
+ if (!item) item = GetCurrentManager()->GetDownload(result_id);
ASSERT_TRUE(item);
ScopedCancellingItem canceller(item);
ASSERT_EQ(download_url, item->GetOriginalUrl().spec());

Powered by Google App Engine
This is Rietveld 408576698