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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 273233004: Fix some more tests that were writing to the user's home directory. (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
Index: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index fca167eb1f0eedf502684ac64576bda250a57ba1..4eb055f90c03553500526eed164a1a182d7ea81a 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1692,6 +1692,12 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, MAYBE_ExtensionInstallSources) {
const GURL referrer_url(URLRequestMockHTTPJob::GetMockUrl(
base::FilePath(FILE_PATH_LITERAL("policy/*"))));
+ base::ScopedTempDir download_directory;
+ ASSERT_TRUE(download_directory.CreateUniqueTempDir());
+ DownloadPrefs* download_prefs =
+ DownloadPrefs::FromBrowserContext(browser()->profile());
+ download_prefs->SetDownloadPath(download_directory.path());
+
const GURL download_page_url(URLRequestMockHTTPJob::GetMockUrl(base::FilePath(
FILE_PATH_LITERAL("policy/extension_install_sources_test.html"))));
ui_test_utils::NavigateToURL(browser(), download_page_url);

Powered by Google App Engine
This is Rietveld 408576698