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

Unified Diff: chrome/browser/extensions/webstore_installer_test.cc

Issue 276133002: Use a temp directory for downloads in WebstoreInstaller tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « chrome/browser/extensions/webstore_installer_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_installer_test.cc
diff --git a/chrome/browser/extensions/webstore_installer_test.cc b/chrome/browser/extensions/webstore_installer_test.cc
index fdc4d4a4a64f3b656eab3cc2c3acf3903a3eaae1..ff3db722597b6dc84f05ba578eee7d834542ff6d 100644
--- a/chrome/browser/extensions/webstore_installer_test.cc
+++ b/chrome/browser/extensions/webstore_installer_test.cc
@@ -5,6 +5,7 @@
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/extensions/webstore_inline_installer.h"
@@ -77,6 +78,14 @@ void WebstoreInstallerTest::SetUpInProcessBrowserTestFixture() {
host_resolver()->AddRule(unverified_domain_, "127.0.0.1");
}
+void WebstoreInstallerTest::SetUpOnMainThread() {
+ InProcessBrowserTest::SetUpOnMainThread();
+ ASSERT_TRUE(download_directory_.CreateUniqueTempDir());
+ DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
+ browser()->profile());
+ download_prefs->SetDownloadPath(download_directory_.path());
+}
+
GURL WebstoreInstallerTest::GenerateTestServerUrl(
const std::string& domain,
const std::string& page_filename) {
« no previous file with comments | « chrome/browser/extensions/webstore_installer_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698