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

Unified Diff: native_client_sdk/src/libraries/nacl_io_test/socket_test.cc

Issue 22587003: [NaCl SDK] Add UDP and TCP Sockets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Running tests on package Created 7 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_io_test/socket_test.cc
diff --git a/native_client_sdk/src/libraries/nacl_io_test/socket_test.cc b/native_client_sdk/src/libraries/nacl_io_test/socket_test.cc
index ec45185ff2c64dd9af076fda4b9e9e52a33f919d..3ccbccfb405da88b5ff193423d30831ecce07145 100644
--- a/native_client_sdk/src/libraries/nacl_io_test/socket_test.cc
+++ b/native_client_sdk/src/libraries/nacl_io_test/socket_test.cc
@@ -1,9 +1,14 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
+#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
+#include <netinet/in.h>
#include <pthread.h>
+#include <sys/types.h>
+#include <sys/socket.h>
#include <sys/stat.h>
#include <map>
@@ -240,16 +245,6 @@ TEST_F(SocketTest, Socket) {
EXPECT_EQ(errno, EAFNOSUPPORT);
EXPECT_LT(ki_socket(AF_INET, SOCK_RAW, 0), 0);
EXPECT_EQ(errno, EPROTONOSUPPORT);
-
- // These four af/protocol combinations should be supported.
- EXPECT_LT(ki_socket(AF_INET, SOCK_STREAM, 0), 0);
- EXPECT_EQ(errno, EACCES);
- EXPECT_LT(ki_socket(AF_INET, SOCK_DGRAM, 0), 0);
- EXPECT_EQ(errno, EACCES);
- EXPECT_LT(ki_socket(AF_INET6, SOCK_STREAM, 0), 0);
- EXPECT_EQ(errno, EACCES);
- EXPECT_LT(ki_socket(AF_INET6, SOCK_DGRAM, 0), 0);
- EXPECT_EQ(errno, EACCES);
}
TEST_F(SocketTest, Socketpair) {

Powered by Google App Engine
This is Rietveld 408576698