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

Side by Side Diff: chrome/browser/chromeos/proxy_config_service_impl_unittest.cc

Issue 2562733003: Remove duplicated user_prefs::TestingPrefServiceSyncable (Closed)
Patch Set: Fixed usage from .mm files Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/network/proxy/proxy_config_service_impl.h" 5 #include "chromeos/network/proxy/proxy_config_service_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 #include "chromeos/dbus/shill_profile_client.h" 22 #include "chromeos/dbus/shill_profile_client.h"
23 #include "chromeos/dbus/shill_service_client.h" 23 #include "chromeos/dbus/shill_service_client.h"
24 #include "chromeos/network/network_handler.h" 24 #include "chromeos/network/network_handler.h"
25 #include "chromeos/network/network_profile_handler.h" 25 #include "chromeos/network/network_profile_handler.h"
26 #include "chromeos/network/network_state.h" 26 #include "chromeos/network/network_state.h"
27 #include "chromeos/network/network_state_handler.h" 27 #include "chromeos/network/network_state_handler.h"
28 #include "chromeos/network/onc/onc_utils.h" 28 #include "chromeos/network/onc/onc_utils.h"
29 #include "chromeos/network/proxy/proxy_config_handler.h" 29 #include "chromeos/network/proxy/proxy_config_handler.h"
30 #include "chromeos/network/proxy/ui_proxy_config.h" 30 #include "chromeos/network/proxy/ui_proxy_config.h"
31 #include "components/onc/onc_pref_names.h" 31 #include "components/onc/onc_pref_names.h"
32 #include "components/pref_registry/testing_pref_service_syncable.h"
33 #include "components/prefs/testing_pref_service.h" 32 #include "components/prefs/testing_pref_service.h"
34 #include "components/proxy_config/proxy_config_pref_names.h" 33 #include "components/proxy_config/proxy_config_pref_names.h"
34 #include "components/sync_preferences/testing_pref_service_syncable.h"
35 #include "content/public/test/test_browser_thread.h" 35 #include "content/public/test/test_browser_thread.h"
36 #include "net/proxy/proxy_config.h" 36 #include "net/proxy/proxy_config.h"
37 #include "net/proxy/proxy_config_service_common_unittest.h" 37 #include "net/proxy/proxy_config_service_common_unittest.h"
38 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
39 #include "third_party/cros_system_api/dbus/service_constants.h" 39 #include "third_party/cros_system_api/dbus/service_constants.h"
40 40
41 // TODO(stevenjb): Refactor and move this to src/chromeos/network/proxy or 41 // TODO(stevenjb): Refactor and move this to src/chromeos/network/proxy or
42 // rename. This is really more of an integration test than a unit test at this 42 // rename. This is really more of an integration test than a unit test at this
43 // point and currently relies on some chrome specific components. 43 // point and currently relies on some chrome specific components.
44 44
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 net::ProxyConfigService::ConfigAvailability availability = 366 net::ProxyConfigService::ConfigAvailability availability =
367 proxy_config_service_->GetLatestProxyConfig(config); 367 proxy_config_service_->GetLatestProxyConfig(config);
368 368
369 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID, availability); 369 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID, availability);
370 } 370 }
371 371
372 base::MessageLoop loop_; 372 base::MessageLoop loop_;
373 std::unique_ptr<net::ProxyConfigService> proxy_config_service_; 373 std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
374 std::unique_ptr<ProxyConfigServiceImpl> config_service_impl_; 374 std::unique_ptr<ProxyConfigServiceImpl> config_service_impl_;
375 TestingPrefServiceSimple pref_service_; 375 TestingPrefServiceSimple pref_service_;
376 user_prefs::TestingPrefServiceSyncable profile_prefs_; 376 sync_preferences::TestingPrefServiceSyncable profile_prefs_;
377 377
378 private: 378 private:
379 ScopedTestDeviceSettingsService test_device_settings_service_; 379 ScopedTestDeviceSettingsService test_device_settings_service_;
380 ScopedTestCrosSettings test_cros_settings_; 380 ScopedTestCrosSettings test_cros_settings_;
381 content::TestBrowserThread ui_thread_; 381 content::TestBrowserThread ui_thread_;
382 content::TestBrowserThread io_thread_; 382 content::TestBrowserThread io_thread_;
383 }; 383 };
384 384
385 TEST_F(ProxyConfigServiceImplTest, NetworkProxy) { 385 TEST_F(ProxyConfigServiceImplTest, NetworkProxy) {
386 SetUpPrivateWiFi(); 386 SetUpPrivateWiFi();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 network_configs.release()); 527 network_configs.release());
528 528
529 net::ProxyConfig actual_config; 529 net::ProxyConfig actual_config;
530 SyncGetLatestProxyConfig(&actual_config); 530 SyncGetLatestProxyConfig(&actual_config);
531 net::ProxyConfig expected_config = 531 net::ProxyConfig expected_config =
532 net::ProxyConfig::CreateFromCustomPacURL(GURL("http://domain.com/x")); 532 net::ProxyConfig::CreateFromCustomPacURL(GURL("http://domain.com/x"));
533 EXPECT_TRUE(expected_config.Equals(actual_config)); 533 EXPECT_TRUE(expected_config.Equals(actual_config));
534 } 534 }
535 535
536 } // namespace chromeos 536 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698