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

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

Issue 14200028: Make CrosSettings and DeviceSettingsService non Lazy instances (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/proxy_config_service_impl.h" 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/format_macros.h" 11 #include "base/format_macros.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/prefs/testing_pref_service.h" 14 #include "base/prefs/testing_pref_service.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "base/stringprintf.h" 16 #include "base/stringprintf.h"
17 #include "chrome/browser/chromeos/cros/cros_library.h" 17 #include "chrome/browser/chromeos/cros/cros_library.h"
18 #include "chrome/browser/chromeos/settings/cros_settings.h"
18 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
19 #include "chromeos/dbus/dbus_thread_manager.h" 20 #include "chromeos/dbus/dbus_thread_manager.h"
20 #include "content/public/test/test_browser_thread.h" 21 #include "content/public/test/test_browser_thread.h"
21 #include "net/proxy/proxy_config_service_common_unittest.h" 22 #include "net/proxy/proxy_config_service_common_unittest.h"
22 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
23 24
24 using content::BrowserThread; 25 using content::BrowserThread;
25 26
26 namespace chromeos { 27 namespace chromeos {
27 28
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 323 }
323 324
324 MessageLoop loop_; 325 MessageLoop loop_;
325 scoped_ptr<ChromeProxyConfigService> proxy_config_service_; 326 scoped_ptr<ChromeProxyConfigService> proxy_config_service_;
326 scoped_ptr<ProxyConfigServiceImpl> config_service_impl_; 327 scoped_ptr<ProxyConfigServiceImpl> config_service_impl_;
327 328
328 private: 329 private:
329 // Default stub state has ethernet as the active connected network and 330 // Default stub state has ethernet as the active connected network and
330 // PROFILE_SHARED as profile type, which this unittest expects. 331 // PROFILE_SHARED as profile type, which this unittest expects.
331 ScopedStubCrosEnabler stub_cros_enabler_; 332 ScopedStubCrosEnabler stub_cros_enabler_;
333 ScopedTestCrosSettings test_cros_settings_;
332 content::TestBrowserThread ui_thread_; 334 content::TestBrowserThread ui_thread_;
333 content::TestBrowserThread io_thread_; 335 content::TestBrowserThread io_thread_;
334 }; 336 };
335 337
336 class ProxyConfigServiceImplTest 338 class ProxyConfigServiceImplTest
337 : public ProxyConfigServiceImplTestBase<testing::Test> { 339 : public ProxyConfigServiceImplTestBase<testing::Test> {
338 protected: 340 protected:
339 virtual void SetUp() { 341 virtual void SetUp() {
340 Init(&pref_service_); 342 Init(&pref_service_);
341 } 343 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); 554 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect());
553 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); 555 EXPECT_EQ(network_params.pac_url, actual_config.pac_url());
554 EXPECT_TRUE(network_params.proxy_rules.Matches( 556 EXPECT_TRUE(network_params.proxy_rules.Matches(
555 actual_config.proxy_rules())); 557 actual_config.proxy_rules()));
556 } 558 }
557 } 559 }
558 560
559 } // namespace 561 } // namespace
560 562
561 } // namespace chromeos 563 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698