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

Side by Side Diff: chrome/browser/extensions/background_xhr_browsertest.cc

Issue 1474983003: Support for client certs in ssl_server_socket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 4 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_io_data.h" 10 #include "chrome/browser/profiles/profile_io_data.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 content::BrowserThread::PostTaskAndReply( 59 content::BrowserThread::PostTaskAndReply(
60 content::BrowserThread::IO, FROM_HERE, 60 content::BrowserThread::IO, FROM_HERE,
61 base::Bind(&InstallNullCertStoreFactoryOnIOThread, 61 base::Bind(&InstallNullCertStoreFactoryOnIOThread,
62 browser()->profile()->GetResourceContext()), 62 browser()->profile()->GetResourceContext()),
63 loop.QuitClosure()); 63 loop.QuitClosure());
64 loop.Run(); 64 loop.Run();
65 65
66 // Launch HTTPS server. 66 // Launch HTTPS server.
67 net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); 67 net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
68 net::SSLServerConfig ssl_config; 68 net::SSLServerConfig ssl_config;
69 ssl_config.require_client_cert = true; 69 ssl_config.client_cert_type =
70 net::SSLServerConfig::ClientCertType::REQUIRE_CLIENT_CERT;
70 https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_OK, ssl_config); 71 https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_OK, ssl_config);
71 https_server.ServeFilesFromSourceDirectory("content/test/data"); 72 https_server.ServeFilesFromSourceDirectory("content/test/data");
72 ASSERT_TRUE(https_server.Start()); 73 ASSERT_TRUE(https_server.Start());
73 74
74 ASSERT_NO_FATAL_FAILURE( 75 ASSERT_NO_FATAL_FAILURE(
75 RunTest("test_tls_client_auth.html", https_server.GetURL("/"))); 76 RunTest("test_tls_client_auth.html", https_server.GetURL("/")));
76 } 77 }
77 78
78 // Test that fetching a URL using HTTP auth doesn't crash, hang, or prompt. 79 // Test that fetching a URL using HTTP auth doesn't crash, hang, or prompt.
79 IN_PROC_BROWSER_TEST_F(BackgroundXhrTest, HttpAuth) { 80 IN_PROC_BROWSER_TEST_F(BackgroundXhrTest, HttpAuth) {
80 ASSERT_TRUE(embedded_test_server()->Start()); 81 ASSERT_TRUE(embedded_test_server()->Start());
81 ASSERT_NO_FATAL_FAILURE(RunTest( 82 ASSERT_NO_FATAL_FAILURE(RunTest(
82 "test_http_auth.html", embedded_test_server()->GetURL("/auth-basic"))); 83 "test_http_auth.html", embedded_test_server()->GetURL("/auth-basic")));
83 } 84 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698