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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.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: Address comments 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 | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc
index 8418a661bf6945f86aa9ff71fa157109190762fa..ae63d93de080b5e99511b4a6ba793d0856e4b3b3 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc
@@ -5,6 +5,7 @@
#include <list>
#include <set>
+#include "base/files/scoped_temp_dir.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string_util.h"
@@ -17,6 +18,7 @@
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/download/download_browsertest.h"
+#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -321,6 +323,12 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, ServerRedirect) {
}
IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Download) {
+ base::ScopedTempDir download_directory;
+ ASSERT_TRUE(download_directory.CreateUniqueTempDir());
+ DownloadPrefs* download_prefs =
+ DownloadPrefs::FromBrowserContext(browser()->profile());
+ download_prefs->SetDownloadPath(download_directory.path());
+
DownloadTestObserverNotInProgress download_observer(
content::BrowserContext::GetDownloadManager(profile()), 1);
download_observer.StartObserving();
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698