| 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 =
|
|
|