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

Unified Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 274193008: Create a temp download directory for WebstorePrivateApiTest (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
index 74ac417b84879df3b31f99d3a0da53a9136054e8..ddba33bd75e919a2bff0806f096f9f5d43811002 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
@@ -157,6 +157,11 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
ProfileOAuth2TokenServiceFactory::GetInstance()->GetForProfile(
profile()));
ASSERT_TRUE(token_service_);
+
+ ASSERT_TRUE(webstore_install_dir_.CreateUniqueTempDir());
+ webstore_install_dir_copy_ = webstore_install_dir_.path();
+ WebstoreInstaller::SetDownloadDirectoryForTests(
+ &webstore_install_dir_copy_);
}
protected:
@@ -223,6 +228,10 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
scoped_ptr<base::CallbackList<void(content::BrowserContext*)>::Subscription>
will_create_browser_context_services_subscription_;
+ base::ScopedTempDir webstore_install_dir_;
+ // WebstoreInstaller needs a reference to a FilePath when setting the download
+ // directory for testing.
+ base::FilePath webstore_install_dir_copy_;
};
// Test cases for webstore origin frame blocking.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698