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

Side by Side Diff: chrome/browser/extensions/webstore_installer_test.cc

Issue 2314363002: extensions: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Comment addressed Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/download/download_prefs.h" 8 #include "chrome/browser/download/download_prefs.h"
9 #include "chrome/browser/extensions/extension_install_prompt.h" 9 #include "chrome/browser/extensions/extension_install_prompt.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 host_resolver()->AddRule(webstore_domain_, "127.0.0.1"); 78 host_resolver()->AddRule(webstore_domain_, "127.0.0.1");
79 host_resolver()->AddRule(verified_domain_, "127.0.0.1"); 79 host_resolver()->AddRule(verified_domain_, "127.0.0.1");
80 host_resolver()->AddRule(unverified_domain_, "127.0.0.1"); 80 host_resolver()->AddRule(unverified_domain_, "127.0.0.1");
81 } 81 }
82 82
83 void WebstoreInstallerTest::SetUpOnMainThread() { 83 void WebstoreInstallerTest::SetUpOnMainThread() {
84 ExtensionBrowserTest::SetUpOnMainThread(); 84 ExtensionBrowserTest::SetUpOnMainThread();
85 ASSERT_TRUE(download_directory_.CreateUniqueTempDir()); 85 ASSERT_TRUE(download_directory_.CreateUniqueTempDir());
86 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext( 86 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
87 browser()->profile()); 87 browser()->profile());
88 download_prefs->SetDownloadPath(download_directory_.path()); 88 download_prefs->SetDownloadPath(download_directory_.GetPath());
89 } 89 }
90 90
91 GURL WebstoreInstallerTest::GenerateTestServerUrl( 91 GURL WebstoreInstallerTest::GenerateTestServerUrl(
92 const std::string& domain, 92 const std::string& domain,
93 const std::string& page_filename) { 93 const std::string& page_filename) {
94 GURL page_url = embedded_test_server()->GetURL(base::StringPrintf( 94 GURL page_url = embedded_test_server()->GetURL(base::StringPrintf(
95 "/%s/%s", test_data_path_.c_str(), page_filename.c_str())); 95 "/%s/%s", test_data_path_.c_str(), page_filename.c_str()));
96 96
97 GURL::Replacements replace_host; 97 GURL::Replacements replace_host;
98 replace_host.SetHostStr(domain); 98 replace_host.SetHostStr(domain);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 install_auto_confirm_.reset(); // Destroy any old override first. 141 install_auto_confirm_.reset(); // Destroy any old override first.
142 install_auto_confirm_.reset(new extensions::ScopedTestDialogAutoConfirm( 142 install_auto_confirm_.reset(new extensions::ScopedTestDialogAutoConfirm(
143 extensions::ScopedTestDialogAutoConfirm::ACCEPT)); 143 extensions::ScopedTestDialogAutoConfirm::ACCEPT));
144 } 144 }
145 145
146 void WebstoreInstallerTest::AutoCancelInstall() { 146 void WebstoreInstallerTest::AutoCancelInstall() {
147 install_auto_confirm_.reset(); // Destroy any old override first. 147 install_auto_confirm_.reset(); // Destroy any old override first.
148 install_auto_confirm_.reset(new extensions::ScopedTestDialogAutoConfirm( 148 install_auto_confirm_.reset(new extensions::ScopedTestDialogAutoConfirm(
149 extensions::ScopedTestDialogAutoConfirm::CANCEL)); 149 extensions::ScopedTestDialogAutoConfirm::CANCEL));
150 } 150 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/wake_event_page_apitest.cc ('k') | chrome/browser/site_details_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698