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

Unified Diff: chrome/browser/download/download_browsertest.cc

Issue 12047039: download: Remove DownloadManager::MockDownloadOpenForTesting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and comment fix Created 7 years, 11 months 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
« no previous file with comments | « no previous file | chrome/browser/download/download_test_file_activity_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 962f561275c34a2240e2454ee6cea684b7548f59..b7e181c87277a01752e65125c1ffaddc0864e9b6 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -27,7 +27,7 @@
#include "chrome/browser/download/download_service.h"
#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/download/download_shelf.h"
-#include "chrome/browser/download/download_test_file_chooser_observer.h"
+#include "chrome/browser/download/download_test_file_activity_observer.h"
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -245,10 +245,10 @@ class DownloadTest : public InProcessBrowserTest {
}
virtual void CleanUpOnMainThread() OVERRIDE {
- // Needs to be torn down on the main thread. file_chooser_observer_ holds a
+ // Needs to be torn down on the main thread. file_activity_observer_ holds a
// reference to the ChromeDownloadManagerDelegate which should be destroyed
// on the UI thread.
- file_chooser_observer_.reset();
+ file_activity_observer_.reset();
}
// Returning false indicates a failure of the setup, and should be asserted
@@ -277,8 +277,8 @@ class DownloadTest : public InProcessBrowserTest {
DownloadPrefs::FromDownloadManager(manager)->ResetAutoOpen();
manager->RemoveAllDownloads();
- file_chooser_observer_.reset(
- new DownloadTestFileChooserObserver(browser()->profile()));
+ file_activity_observer_.reset(
+ new DownloadTestFileActivityObserver(browser()->profile()));
return true;
}
@@ -543,11 +543,11 @@ class DownloadTest : public InProcessBrowserTest {
}
void EnableFileChooser(bool enable) {
- file_chooser_observer_->EnableFileChooser(enable);
+ file_activity_observer_->EnableFileChooser(enable);
}
bool DidShowFileChooser() {
- return file_chooser_observer_->TestAndResetDidShowFileChooser();
+ return file_activity_observer_->TestAndResetDidShowFileChooser();
}
// Checks that |path| is has |file_size| bytes, and matches the |value|
@@ -810,7 +810,7 @@ class DownloadTest : public InProcessBrowserTest {
// Location of the downloads directory for these tests
base::ScopedTempDir downloads_directory_;
- scoped_ptr<DownloadTestFileChooserObserver> file_chooser_observer_;
+ scoped_ptr<DownloadTestFileActivityObserver> file_activity_observer_;
};
// NOTES:
@@ -1466,8 +1466,6 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, AutoOpen) {
ASSERT_TRUE(
GetDownloadPrefs(browser())->EnableAutoOpenBasedOnExtension(file));
- DownloadManagerForBrowser(browser())->MockDownloadOpenForTesting();
-
DownloadAndWait(browser(), url);
// Find the download and confirm it was opened.
« no previous file with comments | « no previous file | chrome/browser/download/download_test_file_activity_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698