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

Side by Side Diff: chrome/browser/net/ssl_config_service_manager_pref_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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/net/ssl_config_service_manager.h" 5 #include "chrome/browser/net/ssl_config_service_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 protected: 47 protected:
48 bool IsChannelIdEnabled(SSLConfigService* config_service) { 48 bool IsChannelIdEnabled(SSLConfigService* config_service) {
49 // Pump the message loop to notify the SSLConfigServiceManagerPref that the 49 // Pump the message loop to notify the SSLConfigServiceManagerPref that the
50 // preferences changed. 50 // preferences changed.
51 message_loop_.RunUntilIdle(); 51 message_loop_.RunUntilIdle();
52 SSLConfig config; 52 SSLConfig config;
53 config_service->GetSSLConfig(&config); 53 config_service->GetSSLConfig(&config);
54 return config.channel_id_enabled; 54 return config.channel_id_enabled;
55 } 55 }
56 56
57 MessageLoop message_loop_; 57 base::MessageLoop message_loop_;
58 content::TestBrowserThread ui_thread_; 58 content::TestBrowserThread ui_thread_;
59 content::TestBrowserThread io_thread_; 59 content::TestBrowserThread io_thread_;
60 }; 60 };
61 61
62 // Test channel id with no user prefs. 62 // Test channel id with no user prefs.
63 TEST_F(SSLConfigServiceManagerPrefTest, ChannelIDWithoutUserPrefs) { 63 TEST_F(SSLConfigServiceManagerPrefTest, ChannelIDWithoutUserPrefs) {
64 TestingPrefServiceSimple local_state; 64 TestingPrefServiceSimple local_state;
65 SSLConfigServiceManager::RegisterPrefs(local_state.registry()); 65 SSLConfigServiceManager::RegisterPrefs(local_state.registry());
66 local_state.SetUserPref(prefs::kEnableOriginBoundCerts, 66 local_state.SetUserPref(prefs::kEnableOriginBoundCerts,
67 Value::CreateBooleanValue(false)); 67 Value::CreateBooleanValue(false));
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 std::string version_max_str; 255 std::string version_max_str;
256 EXPECT_FALSE(local_state_store->GetString(prefs::kSSLVersionMin, 256 EXPECT_FALSE(local_state_store->GetString(prefs::kSSLVersionMin,
257 &version_min_str)); 257 &version_min_str));
258 EXPECT_FALSE(local_state_store->GetString(prefs::kSSLVersionMax, 258 EXPECT_FALSE(local_state_store->GetString(prefs::kSSLVersionMax,
259 &version_max_str)); 259 &version_max_str));
260 bool unrestricted_ssl3_fallback_enabled; 260 bool unrestricted_ssl3_fallback_enabled;
261 EXPECT_FALSE(local_state_store->GetBoolean( 261 EXPECT_FALSE(local_state_store->GetBoolean(
262 prefs::kEnableUnrestrictedSSL3Fallback, 262 prefs::kEnableUnrestrictedSSL3Fallback,
263 &unrestricted_ssl3_fallback_enabled)); 263 &unrestricted_ssl3_fallback_enabled));
264 } 264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698