summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_unittest.cc
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 22:57:09 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 22:57:09 +0000
commit73e0bbac9d097eff34726194d2095dce90f2dfa3 (patch)
treeda2f14f77ee83984118e733a231ada709432ea52 /net/url_request/url_request_unittest.cc
parentcefe1497a83ce69c7da0cec320e258e6f87b3aa9 (diff)
downloadchromium_src-73e0bbac9d097eff34726194d2095dce90f2dfa3.zip
chromium_src-73e0bbac9d097eff34726194d2095dce90f2dfa3.tar.gz
chromium_src-73e0bbac9d097eff34726194d2095dce90f2dfa3.tar.bz2
Enable SSL error handling in Linux again.
Evan, could you review the change since http://codereview.chromium.org/20444 : - load temporary root cert in test_shell Thanks! Review URL: http://codereview.chromium.org/20511 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_unittest.cc')
-rw-r--r--net/url_request/url_request_unittest.cc29
1 files changed, 19 insertions, 10 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 5ba7165..f2028f13 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -180,18 +180,27 @@ TEST_F(URLRequestTest, GetTest) {
#endif
}
-class HTTPSRequestTest : public testing::Test {
- protected:
- HTTPSRequestTest() : util_() {}
+TEST_F(URLRequestTest, QuitTest) {
+ scoped_refptr<HTTPTestServer> server =
+ HTTPTestServer::CreateServer(L"", NULL);
+ ASSERT_TRUE(NULL != server.get());
+ server->SendQuit();
+ EXPECT_TRUE(server->WaitToFinish(20000));
- SSLTestUtil util_;
+#ifndef NDEBUG
+ DCHECK_EQ(url_request_metrics.object_count, 0);
+#endif
+}
+
+class HTTPSRequestTest : public testing::Test {
};
#if defined(OS_MACOSX)
-// TODO(port): support temporary root cert on mac
-#define MAYBE_HTTPSGetTest DISABLED_HTTPSGetTest
+// ssl_client_socket_mac.cc crashes currently in GetSSLInfo
+// when called on a connection with an unrecognized certificate
+#define MAYBE_HTTPSGetTest DISABLED_HTTPSGetTest
#else
-#define MAYBE_HTTPSGetTest HTTPSGetTest
+#define MAYBE_HTTPSGetTest HTTPSGetTest
#endif
TEST_F(HTTPSRequestTest, MAYBE_HTTPSGetTest) {
@@ -200,11 +209,9 @@ TEST_F(HTTPSRequestTest, MAYBE_HTTPSGetTest) {
// so this test doesn't really need to specify a document root.
// But if it did, a good one would be net/data/ssl.
scoped_refptr<HTTPSTestServer> server =
- HTTPSTestServer::CreateServer(util_.kHostName, util_.kOKHTTPSPort,
- L"net/data/ssl", util_.GetOKCertPath().ToWStringHack());
+ HTTPSTestServer::CreateGoodServer(L"net/data/ssl");
ASSERT_TRUE(NULL != server.get());
- EXPECT_TRUE(util_.CheckCATrusted());
TestDelegate d;
{
TestURLRequest r(server->TestServerPage(""), &d);
@@ -223,6 +230,8 @@ TEST_F(HTTPSRequestTest, MAYBE_HTTPSGetTest) {
#endif
}
+// TODO(dkegel): add test for expired and mismatched certificates here
+
TEST_F(URLRequestTest, CancelTest) {
TestDelegate d;
{