Parcourir la source

[System] Enable WebSockets on the mobile profile. Update related unit tests to run on mobile (and fix one to build with NUnitlite)

Sebastien Pouliot il y a 12 ans
Parent
commit
bc0900537c

+ 2 - 2
mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs

@@ -1,4 +1,4 @@
-#if NET_4_5 && !MOBILE
+#if NET_4_5
 using System;
 using System.Net;
 using System.Threading;
@@ -226,7 +226,7 @@ namespace MonoTests.System.Net.WebSockets
 			Assert.AreEqual (error, wsEx.WebSocketErrorCode);
 			if (inner != null) {
 				Assert.IsNotNull (wsEx.InnerException);
-				Assert.IsInstanceOfType (inner, wsEx.InnerException);
+				Assert.IsTrue (inner.IsInstanceOfType (wsEx.InnerException));
 			}
 		}
 

+ 11 - 0
mcs/class/System/mobile_System.dll.sources

@@ -555,6 +555,17 @@ System.Net/WebRequest.cs
 System.Net/WebRequestMethods.cs
 System.Net/WebResponse.cs
 System.Net/WebUtility.cs
+System.Net.WebSockets/ClientWebSocket.cs
+System.Net.WebSockets/ClientWebSocketOptions.cs
+System.Net.WebSockets/HttpListenerWebSocketContext.cs
+System.Net.WebSockets/WebSocket.cs
+System.Net.WebSockets/WebSocketCloseStatus.cs
+System.Net.WebSockets/WebSocketContext.cs
+System.Net.WebSockets/WebSocketError.cs
+System.Net.WebSockets/WebSocketException.cs
+System.Net.WebSockets/WebSocketMessageType.cs
+System.Net.WebSockets/WebSocketReceiveResult.cs
+System.Net.WebSockets/WebSocketState.cs
 System.Runtime.InteropServices/DefaultParameterValueAttribute.cs
 System.Security.AccessControl/SemaphoreAccessRule.cs
 System.Security.AccessControl/SemaphoreAuditRule.cs