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

Side by Side Diff: chrome/browser/captive_portal/captive_portal_browsertest.cc

Issue 10878003: Refactoring for merging WebSocket test server to net::TestServer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reflect Ryan's review Created 8 years, 4 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 test_server()->GetURL("nocontent")); 1567 test_server()->GetURL("nocontent"));
1568 SlowLoadNoCaptivePortal(browser(), RESULT_INTERNET_CONNECTED); 1568 SlowLoadNoCaptivePortal(browser(), RESULT_INTERNET_CONNECTED);
1569 } 1569 }
1570 1570
1571 // Checks that no login page is opened when the HTTP test URL redirects to an 1571 // Checks that no login page is opened when the HTTP test URL redirects to an
1572 // SSL certificate error. 1572 // SSL certificate error.
1573 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, RedirectSSLCertError) { 1573 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, RedirectSSLCertError) {
1574 // Need an HTTP TestServer to handle a dynamically created server redirect. 1574 // Need an HTTP TestServer to handle a dynamically created server redirect.
1575 ASSERT_TRUE(test_server()->Start()); 1575 ASSERT_TRUE(test_server()->Start());
1576 1576
1577 net::TestServer::HTTPSOptions https_options; 1577 net::TestServer::SSLOptions ssl_options;
1578 https_options.server_certificate = 1578 ssl_options.server_certificate =
1579 net::TestServer::HTTPSOptions::CERT_MISMATCHED_NAME; 1579 net::TestServer::SSLOptions::CERT_MISMATCHED_NAME;
1580 net::TestServer https_server(https_options, 1580 net::TestServer https_server(net::TestServer::TYPE_HTTPS,
1581 ssl_options,
1581 FilePath(FILE_PATH_LITERAL("chrome/test/data"))); 1582 FilePath(FILE_PATH_LITERAL("chrome/test/data")));
1582 ASSERT_TRUE(https_server.Start()); 1583 ASSERT_TRUE(https_server.Start());
1583 1584
1584 GURL ssl_login_url = https_server.GetURL(kTestServerLoginPath); 1585 GURL ssl_login_url = https_server.GetURL(kTestServerLoginPath);
1585 1586
1586 CaptivePortalService* captive_portal_service = 1587 CaptivePortalService* captive_portal_service =
1587 CaptivePortalServiceFactory::GetForProfile(browser()->profile()); 1588 CaptivePortalServiceFactory::GetForProfile(browser()->profile());
1588 ASSERT_TRUE(captive_portal_service); 1589 ASSERT_TRUE(captive_portal_service);
1589 SetUpCaptivePortalService( 1590 SetUpCaptivePortalService(
1590 browser()->profile(), 1591 browser()->profile(),
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 base::Bind(&AddHstsHost, 2069 base::Bind(&AddHstsHost,
2069 make_scoped_refptr(browser()->profile()->GetRequestContext()), 2070 make_scoped_refptr(browser()->profile()->GetRequestContext()),
2070 http_timeout_url.host())); 2071 http_timeout_url.host()));
2071 2072
2072 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url); 2073 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url);
2073 Login(browser(), 1, 0); 2074 Login(browser(), 1, 0);
2074 FailLoadsAfterLogin(browser(), 1); 2075 FailLoadsAfterLogin(browser(), 1);
2075 } 2076 }
2076 2077
2077 } // namespace captive_portal 2078 } // namespace captive_portal
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | net/test/base_test_server.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698