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

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

Issue 1217223006: Prompt user for file access permission before download starts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 5 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
Index: chrome/browser/download/chrome_download_manager_delegate_unittest.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
index f83dd909daebad95128e7b50faf441858677220b..d81852791a31f373d311243a0af829f386d3691d 100644
--- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
@@ -28,6 +28,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/android/download/mock_download_controller_android.h"
+#endif
+
using ::testing::AtMost;
using ::testing::Invoke;
using ::testing::Ref;
@@ -166,6 +170,10 @@ class ChromeDownloadManagerDelegateTest
scoped_ptr<content::MockDownloadManager> download_manager_;
scoped_ptr<TestChromeDownloadManagerDelegate> delegate_;
MockWebContentsDelegate web_contents_delegate_;
+#if defined(OS_ANDROID)
+ chrome::android::MockDownloadControllerAndroid download_controller_;
+#endif
+
};
ChromeDownloadManagerDelegateTest::ChromeDownloadManagerDelegateTest()
@@ -183,11 +191,18 @@ void ChromeDownloadManagerDelegateTest::SetUp() {
ASSERT_TRUE(test_download_dir_.CreateUniqueTempDir());
SetDefaultDownloadPath(test_download_dir_.path());
+#if defined(OS_ANDROID)
+ content::DownloadControllerAndroid::SetDownloadControllerAndroid(
+ &download_controller_);
+#endif
}
void ChromeDownloadManagerDelegateTest::TearDown() {
base::RunLoop().RunUntilIdle();
delegate_->Shutdown();
+#if defined(OS_ANDROID)
+ content::DownloadControllerAndroid::SetDownloadControllerAndroid(nullptr);
+#endif
ChromeRenderViewHostTestHarness::TearDown();
}

Powered by Google App Engine
This is Rietveld 408576698