| 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 bad27f0cae09729c40c32bd2341b82785201149d..de2b68782db21b84b11901f066b195d1a14a70c5 100644
|
| --- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
|
| +++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
|
| @@ -1409,8 +1409,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());
|
| @@ -1450,8 +1449,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());
|
| @@ -1604,8 +1602,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());
|
| @@ -1645,8 +1642,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());
|
| @@ -1689,8 +1685,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());
|
| @@ -1734,8 +1729,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());
|
| @@ -1769,8 +1763,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());
|
| @@ -1817,8 +1810,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());
|
| @@ -1855,8 +1847,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());
|
| @@ -1894,8 +1885,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());
|
| @@ -1941,8 +1931,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());
|
| @@ -1980,8 +1969,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());
|
| @@ -2015,8 +2003,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());
|
| @@ -2064,8 +2051,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());
|
|
|