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

Unified Diff: components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc

Issue 2785883003: Use unique_ptr<DictionaryValue> in ProxyConfigDictionary (Closed)
Patch Set: Fix compilation Created 3 years, 9 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: components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc
diff --git a/components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc b/components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc
index 53378106f9157c4557a5f1969d41aa041ecdc14d..b0fd11edca0aaf4f717ee9c8fa8e6c735646dff0 100644
--- a/components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc
+++ b/components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc
@@ -8,7 +8,6 @@
#include <string>
#include "base/files/file_path.h"
-#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -118,10 +117,9 @@ TEST_F(PrefProxyConfigTrackerImplTest, BaseConfiguration) {
}
TEST_F(PrefProxyConfigTrackerImplTest, DynamicPrefOverrides) {
- pref_service_->SetManagedPref(
- proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateFixedServers(
- "http://example.com:3128", std::string())));
+ pref_service_->SetManagedPref(proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreateFixedServers(
+ "http://example.com:3128", std::string()));
base::RunLoop().RunUntilIdle();
net::ProxyConfig actual_config;
@@ -134,9 +132,8 @@ TEST_F(PrefProxyConfigTrackerImplTest, DynamicPrefOverrides) {
net::ProxyServer::FromURI("http://example.com:3128",
net::ProxyServer::SCHEME_HTTP));
- pref_service_->SetManagedPref(
- proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateAutoDetect()));
+ pref_service_->SetManagedPref(proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreateAutoDetect());
base::RunLoop().RunUntilIdle();
EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID,
@@ -174,8 +171,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Observers) {
CONFIG_VALID)).Times(1);
pref_service_->SetManagedPref(
proxy_config::prefs::kProxy,
- base::WrapUnique(
- ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false)));
+ ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false));
base::RunLoop().RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
@@ -225,9 +221,8 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) {
EXPECT_CALL(observer,
OnProxyConfigChanged(ProxyConfigMatches(recommended_config),
CONFIG_VALID)).Times(1);
- pref_service_->SetRecommendedPref(
- proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateAutoDetect()));
+ pref_service_->SetRecommendedPref(proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreateAutoDetect());
base::RunLoop().RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
EXPECT_EQ(CONFIG_VALID,
@@ -240,8 +235,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) {
CONFIG_VALID)).Times(1);
pref_service_->SetManagedPref(
proxy_config::prefs::kProxy,
- base::WrapUnique(
- ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false)));
+ ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false));
base::RunLoop().RunUntilIdle();
Mock::VerifyAndClearExpectations(&observer);
EXPECT_EQ(CONFIG_VALID,
@@ -263,12 +257,10 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) {
}
TEST_F(PrefProxyConfigTrackerImplTest, ExplicitSystemSettings) {
- pref_service_->SetRecommendedPref(
- proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateAutoDetect()));
- pref_service_->SetUserPref(
- proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateSystem()));
+ pref_service_->SetRecommendedPref(proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreateAutoDetect());
+ pref_service_->SetUserPref(proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreateSystem());
base::RunLoop().RunUntilIdle();
// Test if we actually use the system setting, which is |kFixedPacUrl|.

Powered by Google App Engine
This is Rietveld 408576698