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

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

Issue 10834129: Implement chrome.downloads.erase() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: @r172057 Created 8 years 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 552a7a174d8e9602df882ef8c11fa21e1872599b..35c04ed76176fe40b6b42748b916548db205b829 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -879,7 +879,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
}
IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
- DownloadExtensionTest_PauseResumeCancel) {
+ DownloadExtensionTest_PauseResumeCancelErase) {
DownloadItem* download_item = CreateSlowTestDownload();
ASSERT_TRUE(download_item);
@@ -942,6 +942,14 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
new DownloadsResumeFunction(), "[-42]");
EXPECT_STREQ(download_extension_errors::kInvalidOperationError,
error.c_str());
+
+ EXPECT_TRUE(RunFunction(
+ new DownloadsEraseFunction(),
+ base::StringPrintf("[{\"id\": %d}]", download_item->GetId())));
+ download_item = NULL;
+ DownloadManager::DownloadVector items;
+ GetCurrentManager()->GetAllDownloads(&items);
+ EXPECT_EQ(0UL, items.size());
}
scoped_refptr<UIThreadExtensionFunction> MockedGetFileIconFunction(

Powered by Google App Engine
This is Rietveld 408576698