| 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 aee109d01d66141190dda8bca307f956f1e6c4c0..4c3d208e1a6d00b281276a3d085ed81fa3212123 100644
|
| --- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
|
| +++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
|
| @@ -1411,8 +1411,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1452,8 +1451,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1606,8 +1604,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1647,8 +1644,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1691,8 +1687,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1736,8 +1731,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1771,8 +1765,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1819,8 +1812,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1857,8 +1849,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1896,8 +1887,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1943,8 +1933,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -1982,8 +1971,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -2017,8 +2005,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
| @@ -2066,8 +2053,7 @@ 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);
|
| ASSERT_TRUE(item);
|
| ScopedCancellingItem canceller(item);
|
| ASSERT_EQ(download_url, item->GetOriginalUrl().spec());
|
|
|