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

Unified Diff: chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc

Issue 76403004: An implementation of chrome.socket.secure(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Morning LKGR Rebase. Created 6 years, 5 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 | « chrome/browser/extensions/api/socket/tls_socket_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc
diff --git a/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc b/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc
index f49a180b952f4fd11c0b63ac15d2e8e296a61090..4086dda748bff4a92ca464e8a4ae14b05f554703 100644
--- a/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc
+++ b/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc
@@ -110,3 +110,28 @@ IN_PROC_BROWSER_TEST_F(SocketsTcpApiTest, SocketTcpExtension) {
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
+
+IN_PROC_BROWSER_TEST_F(SocketsTcpApiTest, SocketTcpExtensionTLS) {
+ scoped_ptr<net::SpawnedTestServer> test_https_server(
+ new net::SpawnedTestServer(
+ net::SpawnedTestServer::TYPE_HTTPS,
+ net::BaseTestServer::SSLOptions(),
+ base::FilePath(FILE_PATH_LITERAL("net/data"))));
+ EXPECT_TRUE(test_https_server->Start());
+
+ net::HostPortPair https_host_port_pair = test_https_server->host_port_pair();
+ int https_port = https_host_port_pair.port();
+ ASSERT_GT(https_port, 0);
+
+ ResultCatcher catcher;
+ catcher.RestrictToProfile(browser()->profile());
+
+ ExtensionTestMessageListener listener("info_please", true);
+
+ ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("sockets_tcp/api")));
+ EXPECT_TRUE(listener.WaitUntilSatisfied());
+ listener.Reply(base::StringPrintf(
+ "https:%s:%d", https_host_port_pair.host().c_str(), https_port));
+
+ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+}
« no previous file with comments | « chrome/browser/extensions/api/socket/tls_socket_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698