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

Unified Diff: ppapi/tests/test_tcp_socket_private.cc

Issue 9836015: Revert 128266 - Added a pepper test for SSLHandshake. This starts an SSL server which the test can … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/tests/test_tcp_socket_private.h ('k') | ppapi/tests/testing_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_tcp_socket_private.cc
===================================================================
--- ppapi/tests/test_tcp_socket_private.cc (revision 128267)
+++ ppapi/tests/test_tcp_socket_private.cc (working copy)
@@ -40,16 +40,12 @@
if (!GetLocalHostPort(instance_->pp_instance(), &host_, &port_))
return false;
- // Get the port for the SSL server.
- ssl_port_ = instance_->ssl_server_port();
-
return true;
}
void TestTCPSocketPrivate::RunTests(const std::string& filter) {
RUN_TEST_FORCEASYNC_AND_NOT(Basic, filter);
RUN_TEST_FORCEASYNC_AND_NOT(ReadWrite, filter);
- RUN_TEST_FORCEASYNC_AND_NOT(ReadWriteSSL, filter);
RUN_TEST_FORCEASYNC_AND_NOT(ConnectAddress, filter);
}
@@ -95,34 +91,6 @@
PASS();
}
-std::string TestTCPSocketPrivate::TestReadWriteSSL() {
- pp::TCPSocketPrivate socket(instance_);
- TestCompletionCallback cb(instance_->pp_instance(), force_async_);
-
- int32_t rv = socket.Connect(host_.c_str(), ssl_port_, cb);
- ASSERT_TRUE(!force_async_ || rv == PP_OK_COMPLETIONPENDING);
- if (rv == PP_OK_COMPLETIONPENDING)
- rv = cb.WaitForResult();
- ASSERT_EQ(PP_OK, rv);
-
- rv = socket.SSLHandshake(host_.c_str(), ssl_port_, cb);
- ASSERT_TRUE(!force_async_ || rv == PP_OK_COMPLETIONPENDING);
- if (rv == PP_OK_COMPLETIONPENDING)
- rv = cb.WaitForResult();
- ASSERT_EQ(PP_OK, rv);
-
- ASSERT_EQ(PP_OK, WriteStringToSocket(&socket, "GET / HTTP/1.0\r\n\r\n"));
-
- // Read up to the first \n and check that it looks like valid HTTP response.
- std::string s;
- ASSERT_EQ(PP_OK, ReadFirstLineFromSocket(&socket, &s));
- ASSERT_TRUE(ValidateHttpResponse(s));
-
- socket.Disconnect();
-
- PASS();
-}
-
std::string TestTCPSocketPrivate::TestConnectAddress() {
PP_NetAddress_Private address;
@@ -160,6 +128,8 @@
PASS();
}
+// TODO(viettrungluu): Try testing SSL somehow.
+
int32_t TestTCPSocketPrivate::ReadFirstLineFromSocket(
pp::TCPSocketPrivate* socket,
std::string* s) {
« no previous file with comments | « ppapi/tests/test_tcp_socket_private.h ('k') | ppapi/tests/testing_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698