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

Unified Diff: chrome/browser/component_updater/test/crx_downloader_unittest.cc

Issue 118703008: Merge 241734 "Added support for multiple urls in the component u..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 7 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/component_updater/test/crx_downloader_unittest.cc
===================================================================
--- chrome/browser/component_updater/test/crx_downloader_unittest.cc (revision 242136)
+++ chrome/browser/component_updater/test/crx_downloader_unittest.cc (working copy)
@@ -104,7 +104,8 @@
}
void CrxDownloaderTest::Quit() {
- quit_closure_.Run();
+ if (!quit_closure_.is_null())
+ quit_closure_.Run();
}
void CrxDownloaderTest::DownloadComplete(
@@ -133,6 +134,18 @@
base::RunLoop().RunUntilIdle();
}
+// Tests that starting a download without a url results in an error.
+TEST_F(CrxDownloaderTest, NoUrl) {
+ std::vector<GURL> urls;
+ crx_downloader_->StartDownload(urls);
+
+ RunThreadsUntilIdle();
+ EXPECT_EQ(-1, error_);
+ EXPECT_EQ(kExpectedContext, crx_context_);
+
+ EXPECT_EQ(1, num_calls_);
+}
+
// Tests that downloading from one url is successful.
TEST_F(CrxDownloaderTest, OneUrl) {
const GURL expected_crx_url =

Powered by Google App Engine
This is Rietveld 408576698