diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 05:26:10 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 05:26:10 +0000 |
commit | ee287e40bb740d7238717a97b5f635ae3e68c47a (patch) | |
tree | 4515656a0a870939dbcf6892b48baa02c99c26ca /chrome/browser/ssl/ssl_uitest.cc | |
parent | 0afe827a49501c6801c3c9efbbdb1f64aa010beb (diff) | |
download | chromium_src-ee287e40bb740d7238717a97b5f635ae3e68c47a.zip chromium_src-ee287e40bb740d7238717a97b5f635ae3e68c47a.tar.gz chromium_src-ee287e40bb740d7238717a97b5f635ae3e68c47a.tar.bz2 |
ssl_client_socket_unittest.cc: launch local server with TestServerLauncher
rather than use bugs.webkit.org, fixes TODO(darin)
Add tests with bad server certs
ssl_client_socket_nss.cc: fix bugs revealed by new tests
tcp_pinger.cc: helper class to do synchronous connect from tests.
Has to work inside ui tests where one can't use TestCompletionCallback.
ssl_test_util: renamed class TestServerLauncher, added Start/Stop methods.
Make part of net.lib to work around link error in test_shell_tests.
url_request_unittest.h: use TestServerLauncher to manage server.
SSL client tests disabled for now on Mac.
BUG=7114
Review URL: http://codereview.chromium.org/16207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl/ssl_uitest.cc')
-rw-r--r-- | chrome/browser/ssl/ssl_uitest.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/ssl/ssl_uitest.cc b/chrome/browser/ssl/ssl_uitest.cc index f31d8f2..47f4753 100644 --- a/chrome/browser/ssl/ssl_uitest.cc +++ b/chrome/browser/ssl/ssl_uitest.cc @@ -23,7 +23,6 @@ class SSLUITest : public UITest { protected: SSLUITest() { dom_automation_enabled_ = true; - EXPECT_TRUE(util_.CheckCATrusted()); } TabProxy* GetActiveTabProxy() { @@ -47,18 +46,14 @@ class SSLUITest : public UITest { } HTTPSTestServer* GoodCertServer() { - return HTTPSTestServer::CreateServer(util_.kHostName, util_.kOKHTTPSPort, - kDocRoot, util_.GetOKCertPath().ToWStringHack()); + return HTTPSTestServer::CreateGoodServer(kDocRoot); } HTTPSTestServer* BadCertServer() { - return HTTPSTestServer::CreateServer(util_.kHostName, util_.kBadHTTPSPort, - kDocRoot, util_.GetExpiredCertPath().ToWStringHack()); + return HTTPSTestServer::CreateExpiredServer(kDocRoot); } protected: - SSLTestUtil util_; - DISALLOW_COPY_AND_ASSIGN(SSLUITest); }; @@ -424,8 +419,7 @@ TEST_F(SSLUITest, TestCachedMixedContents) { TEST_F(SSLUITest, DISABLED_TestCNInvalidStickiness) { const std::string kLocalHost = "localhost"; scoped_refptr<HTTPSTestServer> https_server = - HTTPSTestServer::CreateServer(kLocalHost, util_.kOKHTTPSPort, - kDocRoot, util_.GetOKCertPath().ToWStringHack()); + HTTPSTestServer::CreateMismatchedServer(kDocRoot); ASSERT_TRUE(NULL != https_server.get()); // First we hit the server with hostname, this generates an invalid policy @@ -462,7 +456,7 @@ TEST_F(SSLUITest, DISABLED_TestCNInvalidStickiness) { ASSERT_TRUE(hostname_index != std::string::npos); // Test sanity check. std::string new_url; new_url.append(url.spec().substr(0, hostname_index)); - new_url.append(util_.kHostName); + new_url.append(net::TestServerLauncher::kHostName); new_url.append(url.spec().substr(hostname_index + kLocalHost.size())); NavigateTab(tab.get(), GURL(new_url)); |