| 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 bba9b21695994887a0ed7caed9314baa259b00b7..faa8dfd0aa521b96099cf0873a3039a2b38a6568 100644
|
| --- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
|
| +++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
|
| @@ -275,6 +275,8 @@ class DownloadExtensionTest : public ExtensionApiTest {
|
| prefs::kPromptForDownload, false);
|
| GetOnRecordManager()->RemoveAllDownloads();
|
| events_listener_.reset(new DownloadsEventsListener());
|
| + file_chooser_observer_.reset(new DownloadTestFileChooserObserver(
|
| + current_browser()->profile()));
|
| }
|
|
|
| void GoOnTheRecord() { current_browser_ = browser(); }
|
| @@ -410,8 +412,6 @@ class DownloadExtensionTest : public ExtensionApiTest {
|
| observer->WaitForFinished();
|
| EXPECT_EQ(
|
| 1u, observer->NumDownloadsSeenInState(DownloadItem::IN_PROGRESS));
|
| - // We don't expect a select file dialog.
|
| - ASSERT_FALSE(observer->select_file_dialog_seen());
|
| }
|
| GetCurrentManager()->GetAllDownloads(FilePath(), items);
|
| ASSERT_EQ(count, items->size());
|
| @@ -433,9 +433,6 @@ class DownloadExtensionTest : public ExtensionApiTest {
|
|
|
| observer->WaitForFinished();
|
| EXPECT_EQ(1u, observer->NumDownloadsSeenInState(DownloadItem::IN_PROGRESS));
|
| - // We don't expect a select file dialog.
|
| - if (observer->select_file_dialog_seen())
|
| - return NULL;
|
|
|
| DownloadManager::DownloadVector items;
|
| manager->GetAllDownloads(FilePath(), &items);
|
| @@ -465,14 +462,14 @@ class DownloadExtensionTest : public ExtensionApiTest {
|
|
|
| DownloadTestObserver* CreateDownloadObserver(size_t download_count) {
|
| return new DownloadTestObserverTerminal(
|
| - GetCurrentManager(), download_count, true,
|
| + GetCurrentManager(), download_count,
|
| DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_FAIL);
|
| }
|
|
|
| DownloadTestObserver* CreateInProgressDownloadObserver(
|
| size_t download_count) {
|
| return new DownloadTestObserverInProgress(
|
| - GetCurrentManager(), download_count, true);
|
| + GetCurrentManager(), download_count);
|
| }
|
|
|
| bool RunFunction(UIThreadExtensionFunction* function,
|
| @@ -574,6 +571,7 @@ class DownloadExtensionTest : public ExtensionApiTest {
|
| Browser* incognito_browser_;
|
| Browser* current_browser_;
|
| scoped_ptr<DownloadsEventsListener> events_listener_;
|
| + scoped_ptr<DownloadTestFileChooserObserver> file_chooser_observer_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DownloadExtensionTest);
|
| };
|
|
|