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

Side by Side Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 2054623002: Refactor HostContentSettingsMap::SetWebsiteSettingDefaultScope to take a std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer comments Created 4 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
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 <utility> 5 #include <utility>
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 1270
1271 // Add an entry into AutoSelectCertificateForUrls policy for automatic client 1271 // Add an entry into AutoSelectCertificateForUrls policy for automatic client
1272 // cert selection. 1272 // cert selection.
1273 Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext()); 1273 Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
1274 DCHECK(profile); 1274 DCHECK(profile);
1275 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 1275 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
1276 dict->SetString("ISSUER.CN", "pywebsocket"); 1276 dict->SetString("ISSUER.CN", "pywebsocket");
1277 HostContentSettingsMapFactory::GetForProfile(profile) 1277 HostContentSettingsMapFactory::GetForProfile(profile)
1278 ->SetWebsiteSettingDefaultScope( 1278 ->SetWebsiteSettingDefaultScope(
1279 url, GURL(), CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 1279 url, GURL(), CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
1280 std::string(), dict.release()); 1280 std::string(), std::move(dict));
1281 1281
1282 // Visit a HTTPS page which requires client certs. 1282 // Visit a HTTPS page which requires client certs.
1283 ui_test_utils::NavigateToURL(browser(), url); 1283 ui_test_utils::NavigateToURL(browser(), url);
1284 CheckAuthenticatedState(tab, AuthState::NONE); 1284 CheckAuthenticatedState(tab, AuthState::NONE);
1285 1285
1286 // Test page runs a WebSocket wss connection test. The result will be shown 1286 // Test page runs a WebSocket wss connection test. The result will be shown
1287 // as page title. 1287 // as page title.
1288 const base::string16 result = watcher.WaitAndGetTitle(); 1288 const base::string16 result = watcher.WaitAndGetTitle();
1289 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass")); 1289 EXPECT_TRUE(base::LowerCaseEqualsASCII(result, "pass"));
1290 } 1290 }
(...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after
3016 3016
3017 // Visit a page over https that contains a frame with a redirect. 3017 // Visit a page over https that contains a frame with a redirect.
3018 3018
3019 // XMLHttpRequest insecure content in synchronous mode. 3019 // XMLHttpRequest insecure content in synchronous mode.
3020 3020
3021 // XMLHttpRequest insecure content in asynchronous mode. 3021 // XMLHttpRequest insecure content in asynchronous mode.
3022 3022
3023 // XMLHttpRequest over bad ssl in synchronous mode. 3023 // XMLHttpRequest over bad ssl in synchronous mode.
3024 3024
3025 // XMLHttpRequest over OK ssl in synchronous mode. 3025 // XMLHttpRequest over OK ssl in synchronous mode.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698