diff --git a/eng/pipelines/libraries/outerloop-mono.yml b/eng/pipelines/libraries/outerloop-mono.yml index 7dd54bc883955c..f73f0c1e03c323 100644 --- a/eng/pipelines/libraries/outerloop-mono.yml +++ b/eng/pipelines/libraries/outerloop-mono.yml @@ -38,6 +38,8 @@ jobs: # extra steps, run tests extraStepsTemplate: /eng/pipelines/libraries/helix.yml extraStepsParameters: + scenarios: + - wasmtestonbrowser testScope: outerloop creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) diff --git a/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs b/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs index 71f9b59a21f3ac..76ef1eb99647d6 100644 --- a/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs @@ -40,7 +40,7 @@ public abstract class DefaultCredentialsTest : HttpClientHandlerTestBase public DefaultCredentialsTest(ITestOutputHelper output) : base(output) { } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(ServerAuthenticationTestsEnabled))] [MemberData(nameof(AuthenticatedServers))] public async Task UseDefaultCredentials_DefaultValue_Unauthorized(string uri, bool useProxy) @@ -55,7 +55,7 @@ public async Task UseDefaultCredentials_DefaultValue_Unauthorized(string uri, bo } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(ServerAuthenticationTestsEnabled))] [MemberData(nameof(AuthenticatedServers))] public async Task UseDefaultCredentials_SetFalse_Unauthorized(string uri, bool useProxy) @@ -71,7 +71,7 @@ public async Task UseDefaultCredentials_SetFalse_Unauthorized(string uri, bool u } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(ServerAuthenticationTestsEnabled))] [MemberData(nameof(AuthenticatedServers))] public async Task UseDefaultCredentials_SetTrue_ConnectAsCurrentIdentity(string uri, bool useProxy) @@ -92,7 +92,7 @@ public async Task UseDefaultCredentials_SetTrue_ConnectAsCurrentIdentity(string } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(ServerAuthenticationTestsEnabled))] [MemberData(nameof(AuthenticatedServers))] public async Task Credentials_SetToWrappedDefaultCredential_ConnectAsCurrentIdentity(string uri, bool useProxy) @@ -116,7 +116,7 @@ public async Task Credentials_SetToWrappedDefaultCredential_ConnectAsCurrentIden } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(ServerAuthenticationTestsEnabled))] [MemberData(nameof(AuthenticatedServers))] public async Task Credentials_SetToBadCredential_Unauthorized(string uri, bool useProxy) @@ -132,7 +132,7 @@ public async Task Credentials_SetToBadCredential_Unauthorized(string uri, bool u } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ActiveIssue("https://github.com/dotnet/runtime/issues/17845")] [ConditionalTheory(nameof(DomainJoinedTestsEnabled))] [InlineData(false)] @@ -154,7 +154,7 @@ public async Task Credentials_SetToSpecificCredential_ConnectAsSpecificIdentity( } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ActiveIssue("https://github.com/dotnet/runtime/issues/17845")] [ConditionalFact(nameof(DomainProxyTestsEnabled))] public async Task Proxy_UseAuthenticatedProxyWithNoCredentials_ProxyAuthenticationRequired() @@ -169,7 +169,7 @@ public async Task Proxy_UseAuthenticatedProxyWithNoCredentials_ProxyAuthenticati } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ActiveIssue("https://github.com/dotnet/runtime/issues/17845")] [ConditionalFact(nameof(DomainProxyTestsEnabled))] public async Task Proxy_UseAuthenticatedProxyWithDefaultCredentials_OK() @@ -184,7 +184,7 @@ public async Task Proxy_UseAuthenticatedProxyWithDefaultCredentials_OK() } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(nameof(DomainProxyTestsEnabled))] public async Task Proxy_UseAuthenticatedProxyWithWrappedDefaultCredentials_OK() { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs index b7f911048dca84..75214845cc8287 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs @@ -57,7 +57,7 @@ public static IEnumerable RedirectStatusCodesOldMethodsNewMethods() } public HttpClientHandlerTest_AutoRedirect(ITestOutputHelper output) : base(output) { } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndRedirectStatusCodes))] public async Task GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusCodeRedirect(Configuration.Http.RemoteServer remoteServer, int statusCode) { @@ -192,7 +192,7 @@ await LoopbackServer.CreateServerAsync(async (redirServer, redirUrl) => } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndRedirectStatusCodes))] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCodeOK(Configuration.Http.RemoteServer remoteServer, int statusCode) { @@ -219,7 +219,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCo } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusCodeOK() { @@ -240,7 +240,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusC } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpsToHttp_StatusCodeRedirect() { @@ -288,7 +288,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] public async Task GetAsync_AllowAutoRedirectTrue_RedirectToUriWithParams_RequestMsgUriSet(Configuration.Http.RemoteServer remoteServer) { @@ -310,7 +310,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectToUriWithParams_Request } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [InlineData(3, 2)] [InlineData(3, 3)] @@ -358,7 +358,7 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] public async Task GetAsync_AllowAutoRedirectTrue_RedirectWithRelativeLocation(Configuration.Http.RemoteServer remoteServer) { @@ -478,7 +478,7 @@ await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => } [Theory, MemberData(nameof(RemoteServersMemberData))] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public async Task GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUnauthorized(Configuration.Http.RemoteServer remoteServer) { HttpClientHandler handler = CreateHttpClientHandler(); @@ -497,7 +497,7 @@ public async Task GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUn } [Theory, MemberData(nameof(RemoteServersMemberData))] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public async Task HttpClientHandler_CredentialIsNotCredentialCacheAfterRedirect_StatusCodeOK(Configuration.Http.RemoteServer remoteServer) { HttpClientHandler handler = CreateHttpClientHandler(); @@ -522,7 +522,7 @@ public async Task HttpClientHandler_CredentialIsNotCredentialCacheAfterRedirect_ } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndRedirectStatusCodes))] public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(Configuration.Http.RemoteServer remoteServer, int statusCode) { @@ -554,7 +554,7 @@ public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(C } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndRedirectStatusCodes))] public async Task DefaultHeaders_SetCredentials_ClearedOnRedirect(Configuration.Http.RemoteServer remoteServer, int statusCode) { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs index 98938a834ccaa1..6cf46633cc69bb 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs @@ -170,6 +170,7 @@ await server.AcceptConnectionAsync(async connection => } [OuterLoop("Uses external servers")] + [SkipOnPlatform(TestPlatforms.Browser, "AutomaticDecompression not supported on Browser")] [Theory, MemberData(nameof(RemoteServersAndCompressionUris))] public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed_GZip(Configuration.Http.RemoteServer remoteServer, Uri uri) { @@ -205,6 +206,7 @@ public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed_GZip(Co [Theory] [InlineData("http://httpbin.org/deflate", "\"deflated\": true")] [InlineData("https://httpbin.org/deflate", "\"deflated\": true")] + [SkipOnPlatform(TestPlatforms.Browser, "AutomaticDecompression not supported on Browser")] public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed_Deflate(string uri, string expectedContent) { if (IsWinHttpHandler) @@ -221,8 +223,9 @@ public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed_Deflate } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndCompressionUris))] + [SkipOnPlatform(TestPlatforms.Browser, "AutomaticDecompression not supported on Browser")] public async Task GetAsync_SetAutomaticDecompression_HeadersRemoved(Configuration.Http.RemoteServer remoteServer, Uri uri) { // Sync API supported only up to HTTP/1.1 diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs index 31af521cee924c..4ad8e2005a9285 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs @@ -150,7 +150,7 @@ await LoopbackServer.CreateClientAndServerAsync(uri => Task.Run(() => // The purpose of this test is mainly to validate the .NET Framework OOB System.Net.Http implementation // since it has an underlying dependency to WebRequest. While .NET Core implementations of System.Net.Http // are not using any WebRequest code, the test is still useful to validate correctness. - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task ProxyNotExplicitlyProvided_DefaultCredentialsSet_DefaultWebProxySetToNull_Success() { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs index 22a98d68cf182e..c6d7332108fc9c 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs @@ -57,7 +57,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [ActiveIssue("https://github.com/dotnet/runtime/issues/1507")] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] [InlineData(AuthenticationSchemes.Ntlm, true, false)] [InlineData(AuthenticationSchemes.Negotiate, true, false)] @@ -114,7 +114,7 @@ await response.Content.ReadAsStringAsync(), public static bool IsSocketsHttpHandlerAndRemoteExecutorSupported => !HttpClientHandlerTestBase.IsWinHttpHandler && RemoteExecutor.IsSupported; - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(nameof(IsSocketsHttpHandlerAndRemoteExecutorSupported))] public void Proxy_UseEnvironmentVariableToSetSystemProxy_RequestGoesThruProxy() { @@ -171,7 +171,7 @@ private void ValidateProxyBasicAuthentication(LoopbackProxyServer proxyServer, N } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(CredentialsForProxy))] public async Task AuthenticatedProxiedRequest_GetAsyncWithCreds_Success(NetworkCredential cred, bool wrapCredsInCache, bool connectionCloseAfter407) @@ -202,7 +202,7 @@ await response.Content.ReadAsStringAsync(), } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(CredentialsForProxy))] public async Task AuthenticatedProxyTunnelRequest_PostAsyncWithCreds_Success(NetworkCredential cred, bool wrapCredsInCache, bool connectionCloseAfter407) @@ -241,7 +241,7 @@ public async Task AuthenticatedProxyTunnelRequest_PostAsyncWithCreds_Success(Net } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(BypassedProxies))] public async Task Proxy_BypassTrue_GetRequestDoesntGoesThroughCustomProxy(IWebProxy proxy) @@ -259,7 +259,7 @@ await response.Content.ReadAsStringAsync(), } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task AuthenticatedProxiedRequest_GetAsyncWithNoCreds_ProxyAuthenticationRequiredStatusCode() { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs index a491691e0494a0..fcf578b63cd63d 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs @@ -18,6 +18,7 @@ namespace System.Net.Http.Functional.Tests using HttpClientHandler = System.Net.Http.WinHttpClientHandler; #endif + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] public sealed class HttpClientHandler_RemoteServerTest : HttpClientHandlerTestBase { private const string ExpectedContent = "Test content"; @@ -59,6 +60,7 @@ public HttpClientHandler_RemoteServerTest(ITestOutputHelper output) : base(outpu [Theory] [InlineData(false)] [InlineData(true)] + [SkipOnPlatform(TestPlatforms.Browser, "UseProxy not supported on Browser")] public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeUnauthorized(bool useProxy) { HttpClientHandler handler = CreateHttpClientHandler(); @@ -76,6 +78,7 @@ public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeU } [OuterLoop("Uses external servers")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] [Theory, MemberData(nameof(RemoteServersMemberData))] public async Task SendAsync_SimpleGet_Success(Configuration.Http.RemoteServer remoteServer) { @@ -92,8 +95,9 @@ public async Task SendAsync_SimpleGet_Success(Configuration.Http.RemoteServer re } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_MultipleRequestsReusingSameClient_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -108,8 +112,9 @@ public async Task SendAsync_MultipleRequestsReusingSameClient_Success(Configurat } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_ResponseContentAfterClientAndHandlerDispose_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -123,8 +128,9 @@ public async Task GetAsync_ResponseContentAfterClientAndHandlerDispose_Success(C } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [SkipOnPlatform(TestPlatforms.Browser, "Credentials is not supported on Browser")] public async Task GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCodeUnauthorized(Configuration.Http.RemoteServer remoteServer) { HttpClientHandler handler = CreateHttpClientHandler(); @@ -139,8 +145,9 @@ public async Task GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCo } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [SkipOnPlatform(TestPlatforms.Browser, "Credentials is not supported on Browser")] public async Task GetAsync_ServerNeedsAuthAndSetCredential_StatusCodeOK(Configuration.Http.RemoteServer remoteServer) { HttpClientHandler handler = CreateHttpClientHandler(); @@ -155,8 +162,9 @@ public async Task GetAsync_ServerNeedsAuthAndSetCredential_StatusCodeOK(Configur } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -169,9 +177,10 @@ public async Task GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(RemoteServersAndHeaderEchoUrisMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndEmptyValueSent(Configuration.Http.RemoteServer remoteServer, Uri uri) { if (IsWinHttpHandler && !PlatformDetection.IsWindows10Version1709OrGreater) @@ -195,8 +204,9 @@ public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndEmptyValueSen } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersHeaderValuesAndUris))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndValueSent(Configuration.Http.RemoteServer remoteServer, string name, string value, Uri uri) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -213,8 +223,9 @@ public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndValueSent(Con } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndHeaderEchoUrisMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_LargeRequestHeader_HeadersAndValuesSent(Configuration.Http.RemoteServer remoteServer, Uri uri) { // Unfortunately, our remote servers seem to have pretty strict limits (around 16K?) @@ -280,8 +291,9 @@ public static IEnumerable RemoteServersHeaderValuesAndUris() public static IEnumerable RemoteServersAndHeaderEchoUrisMemberData() => RemoteServersAndHeaderEchoUris().Select(x => new object[] { x.remoteServer, x.uri }); - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -305,8 +317,9 @@ public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDead } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_HttpRequestMsgResponseHeadersRead_StatusCodeOK(Configuration.Http.RemoteServer remoteServer) { // Sync API supported only up to HTTP/1.1 @@ -331,8 +344,9 @@ public async Task SendAsync_HttpRequestMsgResponseHeadersRead_StatusCodeOK(Confi } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostAsync_CallMethodTwice_StringContent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -356,8 +370,9 @@ public async Task PostAsync_CallMethodTwice_StringContent(Configuration.Http.Rem } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostAsync_CallMethod_UnicodeStringContent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -373,8 +388,9 @@ public async Task PostAsync_CallMethod_UnicodeStringContent(Configuration.Http.R } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(VerifyUploadServersStreamsAndExpectedData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostAsync_CallMethod_StreamContent(Configuration.Http.RemoteServer remoteServer, HttpContent content, byte[] expectedData) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -512,8 +528,9 @@ public static IEnumerable VerifyUploadServersStreamsAndExpectedData } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_CallMethod_NullContent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -533,8 +550,9 @@ public async Task PostAsync_CallMethod_NullContent(Configuration.Http.RemoteServ } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_CallMethod_EmptyContent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -563,9 +581,10 @@ public static IEnumerable ExpectContinueVersion() select new object[] {expect, version}; } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(ExpectContinueVersion))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, Version version) { // Sync API supported only up to HTTP/1.1 @@ -603,8 +622,9 @@ public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, Version } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_Redirect_ResultingGetFormattedCorrectly(Configuration.Http.RemoteServer remoteServer) { const string ContentString = "This is the content string."; @@ -624,8 +644,9 @@ public async Task PostAsync_Redirect_ResultingGetFormattedCorrectly(Configuratio } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostAsync_RedirectWith307_LargePayload(Configuration.Http.RemoteServer remoteServer) { if (remoteServer.HttpVersion == new Version(2, 0)) @@ -639,8 +660,9 @@ public async Task PostAsync_RedirectWith307_LargePayload(Configuration.Http.Remo await PostAsync_Redirect_LargePayload_Helper(remoteServer, 307, true); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostAsync_RedirectWith302_LargePayload(Configuration.Http.RemoteServer remoteServer) { await PostAsync_Redirect_LargePayload_Helper(remoteServer, 302, false); @@ -694,8 +716,9 @@ private async Task PostAsync_Redirect_LargePayload_Helper(Configuration.Http.Rem } #if !NETFRAMEWORK - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_ReuseRequestContent_Success(Configuration.Http.RemoteServer remoteServer) { const string ContentString = "This is the content string."; @@ -714,8 +737,10 @@ public async Task PostAsync_ReuseRequestContent_Success(Configuration.Http.Remot } #endif - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(HttpMethods))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53592", TestPlatforms.Browser)] public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_MethodCorrectlySent( string method, Uri serverUri) @@ -734,8 +759,9 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(HttpMethodsThatAllowContent))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53591", TestPlatforms.Browser)] public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success( string method, Uri serverUri) @@ -763,8 +789,10 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(HttpMethodsThatDontAllowContent))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53591", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53592", TestPlatforms.Browser)] public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_NoBodySent( string method, Uri serverUri) @@ -808,8 +836,9 @@ public static IEnumerable SendAsync_SendSameRequestMultipleTimesDirect } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Success_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Success(Configuration.Http.RemoteServer remoteServer, string stringContent, int startingPosition) { using (var handler = new HttpMessageInvoker(CreateHttpClientHandler())) @@ -840,9 +869,10 @@ public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Succes } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(Http2Servers))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(Uri server) { // Sync API supported only up to HTTP/1.1 @@ -872,7 +902,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(IsWindows10Version1607OrGreater)), MemberData(nameof(Http2NoPushServers))] public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server) { diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs index 2a493178fd9b70..c90753dd4025de 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs @@ -76,7 +76,7 @@ public void ServerCertificateCustomValidationCallback_SetGet_Roundtrips() } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior() { @@ -93,7 +93,7 @@ public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task UseCallback_NotSecureConnection_CallbackNotCalled() { @@ -136,7 +136,7 @@ public static IEnumerable UseCallback_ValidCertificate_ExpectedValuesD } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(UseCallback_ValidCertificate_ExpectedValuesDuringCallback_Urls))] public async Task UseCallback_ValidCertificate_ExpectedValuesDuringCallback(Configuration.Http.RemoteServer remoteServer, Uri url, bool checkRevocation) @@ -179,7 +179,7 @@ public async Task UseCallback_ValidCertificate_ExpectedValuesDuringCallback(Conf } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task UseCallback_CallbackReturnsFailure_ThrowsException() { @@ -191,7 +191,7 @@ public async Task UseCallback_CallbackReturnsFailure_ThrowsException() } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task UseCallback_CallbackThrowsException_ExceptionPropagatesAsBaseException() { @@ -213,7 +213,7 @@ public async Task UseCallback_CallbackThrowsException_ExceptionPropagatesAsBaseE new object[] { Configuration.Http.WrongHostNameCertRemoteServer }, }; - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(ClientSupportsDHECipherSuites))] [MemberData(nameof(CertificateValidationServers))] public async Task NoCallback_BadCertificate_ThrowsException(string url) @@ -224,7 +224,7 @@ public async Task NoCallback_BadCertificate_ThrowsException(string url) } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(nameof(ClientSupportsDHECipherSuites))] public async Task NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds() { @@ -235,7 +235,7 @@ public async Task NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds() } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task NoCallback_RevokedCertificate_RevocationChecking_Fails() { @@ -279,7 +279,7 @@ private async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(CertificateValidationServersAndExpectedPolicies))] public async Task UseCallback_BadCertificate_ExpectedPolicyErrors(string url, SslPolicyErrors expectedErrors) @@ -336,7 +336,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [PlatformSpecific(TestPlatforms.Windows)] // CopyToAsync(Stream, TransportContext) isn't used on unix [Fact] public async Task PostAsync_Post_ChannelBinding_ConfiguredCorrectly() diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs index f5b6a02c51b2ae..06e80b66b00be5 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs @@ -1235,7 +1235,7 @@ await server.AcceptConnectionSendCustomResponseAndCloseAsync( }); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/29424")] public async Task GetAsync_UnicodeHostName_SuccessStatusCodeInResponse() diff --git a/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs b/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs index 6fc23e8f27d5e8..0d75e65aea91a6 100644 --- a/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs @@ -30,6 +30,7 @@ public PostScenarioTest(ITestOutputHelper output) : base(output) { } #if !NETFRAMEWORK [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySent(Configuration.Http.RemoteServer remoteServer) { const string requestBody = "ABC"; @@ -53,7 +54,9 @@ public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySen #endif [OuterLoop("Uses external servers")] - [Theory, MemberData(nameof(RemoteServersMemberData))] + [MemberData(nameof(RemoteServersMemberData))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostNoContentUsingContentLengthSemantics_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, string.Empty, null, @@ -62,6 +65,7 @@ await PostHelper(remoteServer, string.Empty, null, [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostEmptyContentUsingContentLengthSemantics_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, string.Empty, new StringContent(string.Empty), @@ -70,6 +74,7 @@ public async Task PostEmptyContentUsingContentLengthSemantics_Success(Configurat [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostEmptyContentUsingChunkedEncoding_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, string.Empty, new StringContent(string.Empty), @@ -78,6 +83,7 @@ public async Task PostEmptyContentUsingChunkedEncoding_Success(Configuration.Htt [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostEmptyContentUsingConflictingSemantics_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, string.Empty, new StringContent(string.Empty), @@ -86,6 +92,7 @@ public async Task PostEmptyContentUsingConflictingSemantics_Success(Configuratio [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostUsingContentLengthSemantics_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, ExpectedContent, new StringContent(ExpectedContent), @@ -94,6 +101,7 @@ public async Task PostUsingContentLengthSemantics_Success(Configuration.Http.Rem [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostUsingChunkedEncoding_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, ExpectedContent, new StringContent(ExpectedContent), @@ -102,6 +110,7 @@ public async Task PostUsingChunkedEncoding_Success(Configuration.Http.RemoteServ [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostSyncBlockingContentUsingChunkedEncoding_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, ExpectedContent, new SyncBlockingContent(ExpectedContent), @@ -110,6 +119,7 @@ public async Task PostSyncBlockingContentUsingChunkedEncoding_Success(Configurat [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostRepeatedFlushContentUsingChunkedEncoding_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, ExpectedContent, new RepeatedFlushContent(ExpectedContent), @@ -118,6 +128,7 @@ public async Task PostRepeatedFlushContentUsingChunkedEncoding_Success(Configura [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostUsingUsingConflictingSemantics_UsesChunkedSemantics(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, ExpectedContent, new StringContent(ExpectedContent), @@ -126,6 +137,7 @@ public async Task PostUsingUsingConflictingSemantics_UsesChunkedSemantics(Config [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostUsingNoSpecifiedSemantics_UsesChunkedSemantics(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, ExpectedContent, new StringContent(ExpectedContent), @@ -142,9 +154,10 @@ public static IEnumerable RemoteServersAndLargeContentSizes() } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(RemoteServersAndLargeContentSizes))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostLargeContentUsingContentLengthSemantics_Success(Configuration.Http.RemoteServer remoteServer, int contentLength) { var rand = new Random(42); @@ -160,6 +173,7 @@ public async Task PostLargeContentUsingContentLengthSemantics_Success(Configurat } [OuterLoop("Uses external servers")] + [SkipOnPlatform(TestPlatforms.Browser, "PreAuthenticate not supported on Browser")] [Theory, MemberData(nameof(RemoteServersMemberData))] public async Task PostRewindableContentUsingAuth_NoPreAuthenticate_Success(Configuration.Http.RemoteServer remoteServer) { @@ -178,6 +192,7 @@ public async Task PostRewindableContentUsingAuth_NoPreAuthenticate_Success(Confi [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [SkipOnPlatform(TestPlatforms.Browser, "PreAuthenticate not supported on Browser")] public async Task PostNonRewindableContentUsingAuth_NoPreAuthenticate_ThrowsHttpRequestException(Configuration.Http.RemoteServer remoteServer) { // Sync API supported only up to HTTP/1.1 @@ -194,6 +209,7 @@ await Assert.ThrowsAsync(() => [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [SkipOnPlatform(TestPlatforms.Browser, "PreAuthenticate not supported on Browser")] public async Task PostNonRewindableContentUsingAuth_PreAuthenticate_Success(Configuration.Http.RemoteServer remoteServer) { // Sync API supported only up to HTTP/1.1 @@ -208,7 +224,9 @@ public async Task PostNonRewindableContentUsingAuth_PreAuthenticate_Success(Conf } [OuterLoop("Uses external servers")] - [Theory, MemberData(nameof(RemoteServersMemberData))] + [MemberData(nameof(RemoteServersMemberData))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_EmptyContent_ContentTypeHeaderNotSent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) diff --git a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs index 3e0e30e95350e9..3b01e68198c649 100644 --- a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs @@ -30,8 +30,9 @@ public static IEnumerable RemoteServersAndReadModes() } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndReadModes))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetStreamAsync_ReadToEnd_Success(Configuration.Http.RemoteServer remoteServer, int readMode) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -125,8 +126,9 @@ public async Task GetStreamAsync_ReadToEnd_Success(Configuration.Http.RemoteServ } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_UseResponseHeadersReadAndCallLoadIntoBuffer_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -144,8 +146,9 @@ public async Task GetAsync_UseResponseHeadersReadAndCallLoadIntoBuffer_Success(C } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_UseResponseHeadersReadAndCopyToMemoryStream_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -168,8 +171,9 @@ public async Task GetAsync_UseResponseHeadersReadAndCopyToMemoryStream_Success(C } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetStreamAsync_ReadZeroBytes_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -183,8 +187,9 @@ public async Task GetStreamAsync_ReadZeroBytes_Success(Configuration.Http.Remote } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task ReadAsStreamAsync_Cancel_TaskIsCanceled(Configuration.Http.RemoteServer remoteServer) { var cts = new CancellationTokenSource(); @@ -227,6 +232,7 @@ await client.GetAsync(remoteServer.EchoUri, HttpCompletionOption.ResponseHeaders } } #if NETCOREAPP + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] [Theory] [InlineData(TransferType.ContentLength, TransferError.ContentLengthTooLarge)] [InlineData(TransferType.Chunked, TransferError.MissingChunkTerminator)] @@ -241,6 +247,7 @@ await StartTransferTypeAndErrorServer(transferType, transferError, async uri => }); } + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] [Theory] [InlineData(TransferType.None, TransferError.None)] [InlineData(TransferType.ContentLength, TransferError.None)] @@ -255,6 +262,7 @@ await StartTransferTypeAndErrorServer(transferType, transferError, async uri => }); } + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] [Theory] [InlineData(TransferType.None, TransferError.None)] [InlineData(TransferType.ContentLength, TransferError.None)] diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index c30fbb254733a5..e63e0d0d5e946b 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -57,6 +57,7 @@ public static partial class PlatformDetection public static bool IsSizeOptimized => IsBrowser || IsAndroid || IsiOS || IstvOS || IsMacCatalyst; public static bool IsBrowserDomSupported => GetIsBrowserDomSupported(); + public static bool IsBrowserDomSupportedOrNotBrowser => IsNotBrowser || GetIsBrowserDomSupported(); public static bool IsNotBrowserDomSupported => !IsBrowserDomSupported; public static bool IsUsingLimitedCultures => !IsNotMobile; diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/PlatformHandlerTest.cs b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/PlatformHandlerTest.cs index db9a3c7b193731..9e384c292c8a04 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/PlatformHandlerTest.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/PlatformHandlerTest.cs @@ -104,6 +104,7 @@ public sealed class PlatformHandler_HttpClientHandler_DefaultProxyCredentials_Te public PlatformHandler_HttpClientHandler_DefaultProxyCredentials_Test(ITestOutputHelper output) : base(output) { } } + [SkipOnPlatform(TestPlatforms.Browser, "MaxConnectionsPerServer not supported on Browser")] public sealed class PlatformHandler_HttpClientHandler_MaxConnectionsPerServer_Test : HttpClientHandler_MaxConnectionsPerServer_Test { public PlatformHandler_HttpClientHandler_MaxConnectionsPerServer_Test(ITestOutputHelper output) : base(output) { } @@ -260,6 +261,7 @@ public sealed class PlatformHandler_HttpClientHandler_DefaultProxyCredentials_Ht public PlatformHandler_HttpClientHandler_DefaultProxyCredentials_Http2_Test(ITestOutputHelper output) : base(output) { } } + [SkipOnPlatform(TestPlatforms.Browser, "MaxConnectionsPerServer not supported on Browser")] public sealed class PlatformHandler_HttpClientHandler_MaxConnectionsPerServer_Http2_Test : HttpClientHandler_MaxConnectionsPerServer_Test { protected override Version UseVersion => HttpVersion20.Value; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs index e5925630a12948..e9f993cb03dc7b 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs @@ -50,7 +50,7 @@ public void EventSource_ExistsWithCorrectId() /// This test must be in the same test collection as any others testing HttpClient/WinHttpHandler /// DiagnosticSources, since the global logging mechanism makes them conflict inherently. /// - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSourceLogging() { @@ -118,7 +118,7 @@ public void SendAsync_ExpectedDiagnosticSourceLogging() /// This test must be in the same test collection as any others testing HttpClient/WinHttpHandler /// DiagnosticSources, since the global logging mechanism makes them conflict inherently. /// - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSourceNoLogging() { @@ -174,7 +174,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() } [ActiveIssue("https://github.com/dotnet/runtime/issues/1477", TestPlatforms.AnyUnix)] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] [InlineData(false)] [InlineData(true)] @@ -222,7 +222,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( }, UseVersion.ToString(), useSsl.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticExceptionLogging() { @@ -269,7 +269,7 @@ public void SendAsync_ExpectedDiagnosticExceptionLogging() } [ActiveIssue("https://github.com/dotnet/runtime/issues/23167")] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticCancelledLogging() { @@ -482,7 +482,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingW3C() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSourceActivityLogging_InvalidBaggage() { @@ -541,7 +541,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLogging_InvalidBaggage() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteHeader() { @@ -597,7 +597,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteHea }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteW3CTraceParentHeader() { @@ -653,7 +653,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteW3C }, UseVersion.ToString(), TestAsync.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() { @@ -700,7 +700,7 @@ public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() { @@ -747,7 +747,7 @@ public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSynchronousExceptionActivityLogging() { @@ -816,7 +816,7 @@ public void SendAsync_ExpectedDiagnosticSynchronousExceptionActivityLogging() }, UseVersion.ToString(), TestAsync.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() { @@ -866,7 +866,7 @@ public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() { @@ -907,7 +907,7 @@ public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() { @@ -947,7 +947,7 @@ public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedActivityPropagationWithoutListener() { @@ -964,7 +964,7 @@ public void SendAsync_ExpectedActivityPropagationWithoutListener() }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedActivityPropagationWithoutListenerOrParentActivity() { @@ -982,7 +982,7 @@ public void SendAsync_ExpectedActivityPropagationWithoutListenerOrParentActivity }, UseVersion.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(EnableActivityPropagationEnvironmentVariableIsNotSetAndRemoteExecutorSupported))] [InlineData("true", true)] [InlineData("1", true)] @@ -1032,7 +1032,7 @@ public void SendAsync_SuppressedGlobalStaticPropagationEnvVar(string envVarValue }, envVarValue, isInstrumentationEnabled.ToString()).Dispose(); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] [InlineData(true)] [InlineData(false)] @@ -1054,7 +1054,7 @@ public void SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx(bool swi } [ActiveIssue("https://github.com/dotnet/runtime/issues/23167")] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void SendAsync_ExpectedDiagnosticCancelledActivityLogging() { diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs index f3f264dfabf678..eb57adbbfc6357 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs @@ -23,6 +23,7 @@ public HttpClientHandlerTest_Headers(ITestOutputHelper output) : base(output) { private sealed class DerivedHttpHeaders : HttpHeaders { } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_RequestWithSimpleHeader_ResponseReferencesUnmodifiedRequestHeaders() { const string HeaderKey = "some-header-123", HeaderValue = "this is the expected header value"; @@ -46,6 +47,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_UserAgent_CorrectlyWritten() { string userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.18 Safari/537.36"; @@ -69,6 +71,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_LargeHeaders_CorrectlyWritten() { if (UseVersion == HttpVersion.Version30) @@ -104,6 +107,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_DefaultHeaders_CorrectlyWritten() { const string Version = "2017-04-17"; @@ -133,6 +137,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [Theory] [InlineData("\u05D1\u05F1")] [InlineData("jp\u30A5")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_InvalidCharactersInHeader_Throw(string value) { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -164,6 +169,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [InlineData("Accept-CharSet", "text/plain, text/json", false)] // invalid format for header but added with TryAddWithoutValidation [InlineData("Content-Location", "", false)] // invalid format for header but added with TryAddWithoutValidation [InlineData("Max-Forwards", "NotAnInteger", false)] // invalid format for header but added with TryAddWithoutValidation + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_SpecialHeaderKeyOrValue_Success(string key, string value, bool parsable) { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -203,6 +209,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [Theory] [InlineData("Content-Security-Policy", 4618)] [InlineData("RandomCustomHeader", 12345)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetAsync_LargeHeader_Success(string headerName, int headerValueLength) { var rand = new Random(42); @@ -227,6 +234,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetAsync_EmptyResponseHeader_Success() { IList headers = new HttpHeaderData[] { @@ -254,6 +262,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetAsync_MissingExpires_ReturnNull() { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -274,6 +283,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [InlineData("Thu, 01 Dec 1994 16:00:00 GMT", true)] [InlineData("-1", false)] [InlineData("0", false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_Expires_Success(string value, bool isValid) { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -312,6 +322,7 @@ public void HeadersAdd_CustomExpires_Success(string value, bool isValid) [Theory] [InlineData("Accept-Encoding", "identity,gzip")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_RequestHeaderInResponse_Success(string name, string value) { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -332,10 +343,11 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => }); } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Theory] [InlineData(false)] [InlineData(true)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_GetWithValidHostHeader_Success(bool withPort) { if (UseVersion == HttpVersion.Version30) @@ -360,7 +372,7 @@ public async Task SendAsync_GetWithValidHostHeader_Success(bool withPort) } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [Fact] public async Task SendAsync_GetWithInvalidHostHeader_ThrowsException() { @@ -381,6 +393,7 @@ public async Task SendAsync_GetWithInvalidHostHeader_ThrowsException() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_WithZeroLengthHeaderName_Throws() { await LoopbackServerFactory.CreateClientAndServerAsync( @@ -423,6 +436,7 @@ private static readonly (string Name, Encoding ValueEncoding, string[] Values)[] }; [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_CustomRequestEncodingSelector_CanSendNonAsciiHeaderValues() { await LoopbackServerFactory.CreateClientAndServerAsync( @@ -477,6 +491,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_CustomResponseEncodingSelector_CanReceiveNonAsciiHeaderValues() { await LoopbackServerFactory.CreateClientAndServerAsync( diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.RequestRetry.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.RequestRetry.cs index 4e2426b958e658..ced259294f8c13 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.RequestRetry.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.RequestRetry.cs @@ -19,6 +19,7 @@ public abstract class HttpClientHandlerTest_RequestRetry : HttpClientHandlerTest public HttpClientHandlerTest_RequestRetry(ITestOutputHelper output) : base(output) { } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetAsyncOnNewConnection_RetryOnConnectionClosed_Success() { await LoopbackServer.CreateClientAndServerAsync(async url => diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs index dc9d2b57efeadc..bff9da8acf2b5d 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs @@ -16,7 +16,20 @@ public abstract partial class HttpClientHandlerTestBase : FileCleanupTestBase protected virtual QuicImplementationProvider UseQuicImplementationProvider => null; - public static bool IsMsQuicSupported => QuicImplementationProviders.MsQuic.IsSupported; + public static bool IsMsQuicSupported + { + get + { + try + { + return QuicImplementationProviders.MsQuic.IsSupported; + } + catch (System.PlatformNotSupportedException) + { + return false; + } + } + } protected static HttpClientHandler CreateHttpClientHandler(Version useVersion = null, QuicImplementationProvider quicImplementationProvider = null, bool allowAllHttp2Certificates = true) { diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs index 06d3f2a5ed47d2..5ac37fdd6ab7d5 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs @@ -212,6 +212,7 @@ public async Task GetContentAsync_ErrorStatusCode_ExpectedExceptionThrown(bool w [Fact] [OuterLoop("Failing connection attempts take long on windows")] + [SkipOnPlatform(TestPlatforms.Browser, "Socket is not supported on Browser")] public async Task GetContentAsync_WhenCanNotConnect_ExceptionContainsHostInfo() { using Socket portReserver = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); @@ -357,6 +358,7 @@ public async Task GetAsync_CustomException_Asynchronous_ThrowsException() [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetStringAsync_Success() { string content = Guid.NewGuid().ToString(); @@ -377,6 +379,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetStringAsync_CanBeCanceled_AlreadyCanceledCts() { var onClientFinished = new SemaphoreSlim(0, 1); @@ -402,6 +405,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetStringAsync_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -436,6 +440,7 @@ await server.AcceptConnectionAsync(async connection => [InlineData(1, 0)] [InlineData(1, 1)] [InlineData(1, 2)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetAsync_ContentCanBeCanceled(int getMode, int cancelMode) { // cancelMode: @@ -526,6 +531,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetByteArrayAsync_Success() { string content = Guid.NewGuid().ToString(); @@ -547,6 +553,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetByteArrayAsync_CanBeCanceled_AlreadyCanceledCts() { var onClientFinished = new SemaphoreSlim(0, 1); @@ -572,6 +579,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetByteArrayAsync_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -600,6 +608,7 @@ await server.AcceptConnectionAsync(async connection => [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetStreamAsync_Success() { string content = Guid.NewGuid().ToString(); @@ -624,6 +633,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetStreamAsync_CanBeCanceled_AlreadyCanceledCts() { var onClientFinished = new SemaphoreSlim(0, 1); @@ -649,6 +659,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task GetStreamAsync_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -906,6 +917,7 @@ public void Send_SingleThread_Succeeds(HttpCompletionOption completionOption) [InlineData(HttpCompletionOption.ResponseContentRead)] [InlineData(HttpCompletionOption.ResponseHeadersRead)] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task Send_SingleThread_Loopback_Succeeds(HttpCompletionOption completionOption) { string content = "Test content"; @@ -958,6 +970,7 @@ await server.AcceptConnectionAsync(async connection => [Fact] [OuterLoop] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task Send_CancelledRequestContent_Throws() { CancellationTokenSource cts = new CancellationTokenSource(); @@ -1004,6 +1017,7 @@ await server.AcceptConnectionAsync(async connection => [Fact] [OuterLoop] [ActiveIssue("https://github.com/dotnet/runtime/issues/39056")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task Send_TimeoutRequestContent_Throws() { await LoopbackServer.CreateClientAndServerAsync( @@ -1046,6 +1060,7 @@ await server.AcceptConnectionAsync(async connection => [Fact] [OuterLoop] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task Send_CancelledResponseContent_Throws() { string content = "Test content"; @@ -1095,6 +1110,7 @@ await server.AcceptConnectionAsync(async connection => [Fact] [OuterLoop] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public void Send_TimeoutResponseContent_Throws() { const string Content = "Test content"; @@ -1148,6 +1164,7 @@ public static IEnumerable VersionSelectionMemberData() [Theory] [MemberData(nameof(VersionSelectionMemberData))] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task SendAsync_CorrectVersionSelected_LoopbackServer(Version requestVersion, HttpVersionPolicy versionPolicy, Version serverVersion, bool useSsl, object expectedResult) { await HttpAgnosticLoopbackServer.CreateClientAndServerAsync( @@ -1196,9 +1213,10 @@ await HttpAgnosticLoopbackServer.CreateClientAndServerAsync( }); } - [OuterLoop("Uses external server")] - [Theory] + [OuterLoop("Uses external servers")] [MemberData(nameof(VersionSelectionMemberData))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_CorrectVersionSelected_ExternalServer(Version requestVersion, HttpVersionPolicy versionPolicy, Version serverVersion, bool useSsl, object expectedResult) { RemoteServer remoteServer = null; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs index eae8a3a6b3a4e9..214042a185040e 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs @@ -614,6 +614,7 @@ public void Dispose_DisposedObjectThenAccessMembers_ThrowsObjectDisposedExceptio [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsStringAsync_Buffered_IgnoresCancellationToken() { string content = Guid.NewGuid().ToString(); @@ -641,6 +642,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsStringAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts() { await LoopbackServer.CreateClientAndServerAsync( @@ -669,6 +671,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsStringAsync_Unbuffered_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -704,6 +707,7 @@ await server.AcceptConnectionAsync(async connection => [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsByteArrayAsync_Buffered_IgnoresCancellationToken() { string content = Guid.NewGuid().ToString(); @@ -732,6 +736,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsByteArrayAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts() { await LoopbackServer.CreateClientAndServerAsync( @@ -760,6 +765,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsByteArrayAsync_Unbuffered_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -797,6 +803,7 @@ await server.AcceptConnectionAsync(async connection => [InlineData(true)] [InlineData(false)] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsStreamAsync_Buffered_IgnoresCancellationToken(bool readStreamAsync) { string content = Guid.NewGuid().ToString(); @@ -829,6 +836,7 @@ await LoopbackServer.CreateClientAndServerAsync( [InlineData(true)] [InlineData(false)] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)] public async Task ReadAsStreamAsync_Unbuffered_IgnoresCancellationToken(bool readStreamAsync) { string content = Guid.NewGuid().ToString(); diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index e74684eb384ba7..640f468ec92369 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -158,6 +158,7 @@ public SocketsHttpHandler_HttpClientEKUTest(ITestOutputHelper output) : base(out } #endif + [SkipOnPlatform(TestPlatforms.Browser, "AutomaticDecompression not supported on Browser")] public sealed class SocketsHttpHandler_HttpClientHandler_Decompression_Tests : HttpClientHandler_Decompression_Test { public SocketsHttpHandler_HttpClientHandler_Decompression_Tests(ITestOutputHelper output) : base(output) { } @@ -192,8 +193,7 @@ public SocketsHttpHandler_HttpClientHandler_Finalization_Http2_Test(ITestOutputH protected override Version UseVersion => HttpVersion.Version20; } - // set_MaxConnectionsPerServer - System.PlatformNotSupportedException - [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))] + [SkipOnPlatform(TestPlatforms.Browser, "MaxConnectionsPerServer not supported on Browser")] public sealed class SocketsHttpHandler_HttpClientHandler_MaxConnectionsPerServer_Test : HttpClientHandler_MaxConnectionsPerServer_Test { public SocketsHttpHandler_HttpClientHandler_MaxConnectionsPerServer_Test(ITestOutputHelper output) : base(output) { } @@ -548,7 +548,7 @@ protected override bool TryComputeLength(out long length) } } - [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))] + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] public sealed class SocketsHttpHandler_ResponseStreamTest : ResponseStreamTest { public SocketsHttpHandler_ResponseStreamTest(ITestOutputHelper output) : base(output) { } @@ -3051,7 +3051,6 @@ public SocketsHttpHandlerTest_HttpClientHandlerTest_Http2(ITestOutputHelper outp protected override Version UseVersion => HttpVersion.Version20; } - [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))] public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http11 : HttpClientHandlerTest_Headers { public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http11(ITestOutputHelper output) : base(output) { } @@ -3078,6 +3077,7 @@ public SocketsHttpHandlerTest_Http3_MsQuic(ITestOutputHelper output) : base(outp protected override QuicImplementationProvider UseQuicImplementationProvider => QuicImplementationProviders.MsQuic; } + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))] public sealed class SocketsHttpHandlerTest_Http3_Mock : HttpClientHandlerTest_Http3 { public SocketsHttpHandlerTest_Http3_Mock(ITestOutputHelper output) : base(output) { } @@ -3092,6 +3092,7 @@ public SocketsHttpHandlerTest_HttpClientHandlerTest_Http3_MsQuic(ITestOutputHelp protected override QuicImplementationProvider UseQuicImplementationProvider => QuicImplementationProviders.MsQuic; } + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))] public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Http3_Mock : HttpClientHandlerTest { public SocketsHttpHandlerTest_HttpClientHandlerTest_Http3_Mock(ITestOutputHelper output) : base(output) { } @@ -3110,6 +3111,7 @@ public SocketsHttpHandlerTest_Cookies_Http3_MsQuic(ITestOutputHelper output) : b } [ActiveIssue("https://github.com/dotnet/runtime/issues/53093")] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))] public sealed class SocketsHttpHandlerTest_Cookies_Http3_Mock : HttpClientHandlerTest_Cookies { public SocketsHttpHandlerTest_Cookies_Http3_Mock(ITestOutputHelper output) : base(output) { } @@ -3125,6 +3127,7 @@ public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3_MsQuic(ITestOu protected override QuicImplementationProvider UseQuicImplementationProvider => QuicImplementationProviders.MsQuic; } + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))] public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3_Mock : HttpClientHandlerTest_Headers { public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http3_Mock(ITestOutputHelper output) : base(output) { } @@ -3143,6 +3146,7 @@ public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3_MsQuic(ITest } [ActiveIssue("https://github.com/dotnet/runtime/issues/53093")] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))] public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3_Mock : HttpClientHandler_Cancellation_Test { public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http3_Mock(ITestOutputHelper output) : base(output) { } @@ -3161,6 +3165,7 @@ public SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3_MsQuic(ITestOutput } [ActiveIssue("https://github.com/dotnet/runtime/issues/53093")] + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))] public sealed class SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3_Mock : HttpClientHandler_AltSvc_Test { public SocketsHttpHandler_HttpClientHandler_AltSvc_Test_Http3_Mock(ITestOutputHelper output) : base(output) { } @@ -3176,6 +3181,7 @@ public SocketsHttpHandler_HttpClientHandler_Finalization_Http3_MsQuic(ITestOutpu protected override QuicImplementationProvider UseQuicImplementationProvider => QuicImplementationProviders.MsQuic; } + [ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))] public sealed class SocketsHttpHandler_HttpClientHandler_Finalization_Http3_Mock : HttpClientHandler_Finalization_Test { public SocketsHttpHandler_HttpClientHandler_Finalization_Http3_Mock(ITestOutputHelper output) : base(output) { } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SyncHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SyncHttpHandlerTest.cs index b355d89706106c..f1028363a1e244 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SyncHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SyncHttpHandlerTest.cs @@ -26,6 +26,7 @@ public SyncHttpHandler_DiagnosticsTest(ITestOutputHelper output) : base(output) protected override bool TestAsync => false; } + [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] public sealed class SyncHttpHandler_PostScenarioTest : PostScenarioTest { public SyncHttpHandler_PostScenarioTest(ITestOutputHelper output) : base(output) { } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 88d979aff2cfe0..a5ae70bbb2feb4 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -8,6 +8,11 @@ true $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-OSX + + WasmTestOnBrowser + $(TestArchiveRoot)browseronly/ + $(TestArchiveTestsRoot)$(OSPlatformConfig)/ + diff --git a/src/libraries/System.Net.NameResolution/tests/PalTests/NameResolutionPalTests.cs b/src/libraries/System.Net.NameResolution/tests/PalTests/NameResolutionPalTests.cs index 4fec65413c28bb..b753063dfb4162 100644 --- a/src/libraries/System.Net.NameResolution/tests/PalTests/NameResolutionPalTests.cs +++ b/src/libraries/System.Net.NameResolution/tests/PalTests/NameResolutionPalTests.cs @@ -71,7 +71,7 @@ public void TryGetAddrInfo_EmptyHost(bool justAddresses) [Theory] [InlineData(false)] [InlineData(true)] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public void TryGetAddrInfo_HostName(bool justAddresses) { string hostName = NameResolutionPal.GetHostName(); @@ -112,7 +112,7 @@ public void TryGetAddrInfo_ExternalHost(bool justAddresses) [Theory] [InlineData(false)] [InlineData(true)] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public void TryGetAddrInfo_UnknownHost(bool justAddresses) { SocketError error = NameResolutionPal.TryGetAddrInfo("test.123", justAddresses, AddressFamily.Unspecified, out string? _, out string[] _, out IPAddress[] _, out int nativeErrorCode); @@ -161,7 +161,7 @@ public void TryGetAddrInfo_LocalHost_TryGetNameInfo() } [Fact] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public void TryGetAddrInfo_HostName_TryGetNameInfo() { string hostName = NameResolutionPal.GetHostName(); @@ -273,7 +273,7 @@ public async Task GetAddrInfoAsync_LocalHost(bool justAddresses) [Theory] [InlineData(false)] [InlineData(true)] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public async Task GetAddrInfoAsync_EmptyHost(bool justAddresses) { if (!NameResolutionPal.SupportsGetAddrInfoAsync) @@ -320,7 +320,7 @@ public async Task GetAddrInfoAsync_EmptyHost(bool justAddresses) [Theory] [InlineData(false)] [InlineData(true)] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public async Task GetAddrInfoAsync_HostName(bool justAddresses) { if (!NameResolutionPal.SupportsGetAddrInfoAsync) @@ -403,7 +403,7 @@ public async Task GetAddrInfoAsync_ExternalHost(bool justAddresses) [Theory] [InlineData(false)] [InlineData(true)] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] public async Task GetAddrInfoAsync_UnknownHost(bool justAddresses) { if (!NameResolutionPal.SupportsGetAddrInfoAsync) diff --git a/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs b/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs index eacf92ffc0ac76..728b2d96bd1b70 100644 --- a/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs +++ b/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs @@ -1572,7 +1572,7 @@ public void Proxy_GetDefault_ExpectNotNull(Uri remoteServer) } [ActiveIssue("https://github.com/dotnet/runtime/issues/31380")] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [PlatformSpecific(TestPlatforms.AnyUnix)] // The default proxy is resolved via WinINet on Windows. [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public async Task ProxySetViaEnvironmentVariable_DefaultProxyCredentialsUsed() diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamAlpnTests.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamAlpnTests.cs index fb4fb9d528d0ef..7848c01e9f0d85 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamAlpnTests.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamAlpnTests.cs @@ -173,7 +173,7 @@ public async Task SslStream_StreamToStream_Alpn_NonMatchingProtocols_Fail() } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(ClientSupportsAlpn))] [MemberData(nameof(Http2Servers))] public async Task SslStream_Http2_Alpn_Success(Uri server) diff --git a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs index f4dc4bbbe48fc8..bee31155b396fb 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs @@ -18,7 +18,7 @@ public class CloseTest : ClientWebSocketTestBase public CloseTest(ITestOutputHelper output) : base(output) { } [ActiveIssue("https://github.com/dotnet/runtime/issues/28957")] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServersAndBoolean))] public async Task CloseAsync_ServerInitiatedClose_Success(Uri server, bool useCloseOutputAsync) { @@ -65,7 +65,7 @@ await cws.SendAsync( } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_ClientInitiatedClose_Success(Uri server) { @@ -87,7 +87,7 @@ public async Task CloseAsync_ClientInitiatedClose_Success(Uri server) } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_CloseDescriptionIsMaxLength_Success(Uri server) { @@ -101,7 +101,7 @@ public async Task CloseAsync_CloseDescriptionIsMaxLength_Success(Uri server) } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_CloseDescriptionIsMaxLengthPlusOne_ThrowsArgumentException(Uri server) { @@ -126,7 +126,7 @@ public async Task CloseAsync_CloseDescriptionIsMaxLengthPlusOne_ThrowsArgumentEx } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_CloseDescriptionHasUnicode_Success(Uri server) { @@ -145,7 +145,7 @@ public async Task CloseAsync_CloseDescriptionHasUnicode_Success(Uri server) } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_CloseDescriptionIsNull_Success(Uri server) { @@ -161,7 +161,7 @@ public async Task CloseAsync_CloseDescriptionIsNull_Success(Uri server) } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseOutputAsync_ExpectedStates(Uri server) { @@ -180,7 +180,7 @@ public async Task CloseOutputAsync_ExpectedStates(Uri server) } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_CloseOutputAsync_Throws(Uri server) { @@ -205,7 +205,7 @@ await Assert.ThrowsAnyAsync(async () => } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseOutputAsync_ClientInitiated_CanReceive_CanClose(Uri server) { @@ -245,7 +245,7 @@ public async Task CloseOutputAsync_ClientInitiated_CanReceive_CanClose(Uri serve } [ActiveIssue("https://github.com/dotnet/runtime/issues/28957")] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseOutputAsync_ServerInitiated_CanSend(Uri server) { @@ -292,7 +292,7 @@ await cws.SendAsync( } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseOutputAsync_CloseDescriptionIsNull_Success(Uri server) { @@ -308,7 +308,7 @@ public async Task CloseOutputAsync_CloseDescriptionIsNull_Success(Uri server) } [ActiveIssue("https://github.com/dotnet/runtime/issues/22000", TargetFrameworkMonikers.Netcoreapp)] - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseOutputAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri server) { @@ -345,7 +345,7 @@ public async Task CloseOutputAsync_DuringConcurrentReceiveAsync_ExpectedStates(U } } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri server) { diff --git a/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs index e0a0e1e59fd846..1f12d76743357a 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs @@ -22,6 +22,7 @@ public DeflateTests(ITestOutputHelper output) : base(output) [ConditionalTheory(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)] [InlineData(15, true, 15, true, "permessage-deflate; client_max_window_bits")] [InlineData(14, true, 15, true, "permessage-deflate; client_max_window_bits=14")] [InlineData(15, true, 14, true, "permessage-deflate; client_max_window_bits; server_max_window_bits=14")] diff --git a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj index 21ba2a12dd5247..3da2d56665aebf 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj +++ b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj @@ -4,6 +4,11 @@ $(NetCoreAppCurrent);$(NetCoreAppCurrent)-Browser $(DefineConstants);NETSTANDARD + + WasmTestOnBrowser + $(TestArchiveRoot)browseronly/ + $(TestArchiveTestsRoot)$(OSPlatformConfig)/ + diff --git a/src/libraries/System.Net.WebSockets/tests/WebSocketCreateTest.cs b/src/libraries/System.Net.WebSockets/tests/WebSocketCreateTest.cs index af0179ee5b58ca..f940df0add3aee 100644 --- a/src/libraries/System.Net.WebSockets/tests/WebSocketCreateTest.cs +++ b/src/libraries/System.Net.WebSockets/tests/WebSocketCreateTest.cs @@ -41,6 +41,7 @@ public void CreateFromStream_ValidBufferSizes_CreatesWebSocket() [Theory] [MemberData(nameof(EchoServers))] [SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform.")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public async Task WebSocketProtocol_CreateFromConnectedStream_CanSendReceiveData(Uri echoUri) { if (PlatformDetection.IsWindows7) @@ -205,6 +206,7 @@ public async Task ReceiveAsync_ServerSplitHeader_ValidDataReceived() [Theory] [MemberData(nameof(EchoServersAndBoolean))] [SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform.")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)] public async Task WebSocketProtocol_CreateFromConnectedStream_CloseAsyncClosesStream(Uri echoUri, bool explicitCloseAsync) { if (PlatformDetection.IsWindows7) diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 3001a00bc110ec..84c140a2182a64 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -331,6 +331,7 @@ <_WorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" /> <_WorkItem Include="$(TestArchiveRoot)runonly/**/WebAssembly.Console.*.Test.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' != 'WasmTestOnBrowser' and '$(Scenario)' != 'BuildWasmApps'" /> <_WorkItem Include="$(TestArchiveRoot)runonly/**/WebAssembly.Browser.*.Test.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' == 'WasmTestOnBrowser'" /> + <_WorkItem Include="$(TestArchiveRoot)browseronly/**/*.zip" Condition="'$(TargetOS)' == 'Browser' and '$(Scenario)' == 'WasmTestOnBrowser'" /> %(Identity) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index a282a166a1f00a..8afaa2595c182c 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -25,6 +25,11 @@ + + + + + @@ -227,7 +232,6 @@ -