Chromium Code Reviews| 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()); |