diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs
index 8065bc3b38aea..a11c4aa9f4737 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs
@@ -17,6 +17,7 @@ public class ClientWebSocketOptionsTests : ClientWebSocketTestBase
public ClientWebSocketOptionsTests(ITestOutputHelper output) : base(output) { }
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser
public static void UseDefaultCredentials_Roundtrips()
{
var cws = new ClientWebSocket();
@@ -28,6 +29,7 @@ public static void UseDefaultCredentials_Roundtrips()
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Proxy not supported on browser
public static void Proxy_Roundtrips()
{
var cws = new ClientWebSocket();
@@ -99,6 +101,7 @@ public async Task Proxy_ConnectThruProxy_Success(Uri server)
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Buffer not supported on browser
public static void SetBuffer_InvalidArgs_Throws()
{
// Recreate the minimum WebSocket buffer size values from the .NET Framework version of WebSocket,
@@ -120,6 +123,7 @@ public static void SetBuffer_InvalidArgs_Throws()
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // KeepAlive not supported on browser
public static void KeepAliveInterval_Roundtrips()
{
var cws = new ClientWebSocket();
@@ -138,6 +142,7 @@ public static void KeepAliveInterval_Roundtrips()
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Certificates not supported on browser
public void RemoteCertificateValidationCallback_Roundtrips()
{
using (var cws = new ClientWebSocket())
@@ -157,6 +162,7 @@ public void RemoteCertificateValidationCallback_Roundtrips()
[ConditionalTheory(nameof(WebSocketsSupported))]
[InlineData(false)]
[InlineData(true)]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Certificates not supported on browser
public async Task RemoteCertificateValidationCallback_PassedRemoteCertificateInfo(bool secure)
{
if (PlatformDetection.IsWindows7)
@@ -193,6 +199,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
[OuterLoop("Connects to remote service")]
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser
public async Task ClientCertificates_ValidCertificate_ServerReceivesCertificateAndConnectAsyncSucceeds()
{
if (PlatformDetection.IsWindows7)
@@ -230,6 +237,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
[InlineData("ws://")]
[InlineData("wss://")]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser
public async Task NonSecureConnect_ConnectThruProxy_CONNECTisUsed(string connectionType)
{
if (PlatformDetection.IsWindows7)
diff --git a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs
index 7bdffd25e99b8..a803d4cb021fa 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs
@@ -327,6 +327,7 @@ public async Task CloseAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri ser
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task CloseAsync_CancelableEvenWhenPendingReceive_Throws()
{
var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs
index 265db6d6c4167..45c94e4164428 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs
@@ -89,6 +89,7 @@ public async Task ConnectAsync_AddCustomHeaders_Success(Uri server)
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task ConnectAsync_AddHostHeader_Success()
{
string expectedHost = null;
@@ -208,6 +209,7 @@ public async Task ConnectAsync_PassMultipleSubProtocols_ServerRequires_Connectio
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task ConnectAsync_NonStandardRequestHeaders_HeadersAddedWithoutValidation()
{
await LoopbackServer.CreateClientAndServerAsync(async uri =>
@@ -246,6 +248,7 @@ public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri se
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/44720", TestPlatforms.Browser)]
public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperationCanceledException()
{
using (var clientSocket = new ClientWebSocket())
@@ -259,6 +262,7 @@ public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperatio
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException()
{
var releaseServer = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
diff --git a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs
index 163fc2b530e38..5bfc2c911d754 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs
@@ -389,6 +389,7 @@ public async Task SendReceive_Concurrent_Success(Uri server)
[OuterLoop("Uses external servers")]
[ConditionalFact(nameof(WebSocketsSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated()
{
var options = new LoopbackServer.Options { WebSocketEndpoint = true };
diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj
index 511f7f68fe002..7a57738a2f7b3 100644
--- a/src/libraries/tests.proj
+++ b/src/libraries/tests.proj
@@ -157,7 +157,6 @@
-