Chromium Code Reviews| Index: chrome/browser/download/download_browsertest.cc |
| diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc |
| index 66830adfd89606b4040686c0a8c5cb1e63ff5a5f..c2a7678e7b5145e09f444111e3270fc5ada746ba 100644 |
| --- a/chrome/browser/download/download_browsertest.cc |
| +++ b/chrome/browser/download/download_browsertest.cc |
| @@ -167,30 +167,6 @@ void SetHiddenDownloadCallback(DownloadItem* item, net::Error error) { |
| } // namespace |
| -// While an object of this class exists, it will mock out download |
| -// opening for all downloads created on the specified download manager. |
| -class MockDownloadOpeningObserver : public DownloadManager::Observer { |
| - public: |
| - explicit MockDownloadOpeningObserver(DownloadManager* manager) |
| - : download_manager_(manager) { |
| - download_manager_->AddObserver(this); |
| - } |
| - |
| - ~MockDownloadOpeningObserver() { |
| - download_manager_->RemoveObserver(this); |
| - } |
| - |
| - virtual void OnDownloadCreated( |
| - DownloadManager* manager, DownloadItem* item) OVERRIDE { |
| - item->MockDownloadOpenForTesting(); |
| - } |
| - |
| - private: |
| - DownloadManager* download_manager_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(MockDownloadOpeningObserver); |
| -}; |
| - |
| class HistoryObserver : public DownloadHistory::Observer { |
| public: |
| explicit HistoryObserver(Profile* profile) |
| @@ -1487,8 +1463,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, AutoOpen) { |
| ASSERT_TRUE( |
| GetDownloadPrefs(browser())->EnableAutoOpenBasedOnExtension(file)); |
| - // Mock out external opening on all downloads until end of test. |
| - MockDownloadOpeningObserver observer(DownloadManagerForBrowser(browser())); |
| + DownloadManagerForBrowser(browser())->MockDownloadOpenForTesting(); |
|
Randy Smith (Not in Mondays)
2013/01/18 18:53:37
The better way to do this (given that the DMD now
hashimoto
2013/01/21 10:54:25
Filed in http://crbug.com/171224.
|
| DownloadAndWait(browser(), url); |