[Theory]
[MemberData(nameof(Authentication_TestData))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task HttpClientHandler_Authentication_Succeeds(string authenticateHeader, bool result)
{
if (PlatformDetection.IsWindowsNanoServer)
[Theory]
[InlineData("WWW-Authenticate: Basic realm=\"hello\"\r\nWWW-Authenticate: Digest realm=\"hello\", nonce=\"hello\", algorithm=MD5\r\n")]
[InlineData("WWW-Authenticate: Digest realm=\"hello\", nonce=\"hello\", algorithm=MD5\r\nWWW-Authenticate: Basic realm=\"hello\"\r\n")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task HttpClientHandler_MultipleAuthenticateHeaders_Succeeds(string authenticateHeader)
{
if (PlatformDetection.IsWindowsNanoServer)
[Theory]
[InlineData("WWW-Authenticate: Basic realm=\"hello\"\r\nWWW-Authenticate: NTLM\r\n", "Basic", "Negotiate")]
[InlineData("WWW-Authenticate: Basic realm=\"hello\"\r\nWWW-Authenticate: Digest realm=\"hello\", nonce=\"hello\", algorithm=MD5\r\nWWW-Authenticate: NTLM\r\n", "Digest", "Negotiate")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task HttpClientHandler_MultipleAuthenticateHeaders_PicksSupported(string authenticateHeader, string supportedAuth, string unsupportedAuth)
{
if (PlatformDetection.IsWindowsNanoServer)
[Theory]
[InlineData("WWW-Authenticate: Basic realm=\"hello\"\r\n")]
[InlineData("WWW-Authenticate: Digest realm=\"hello\", nonce=\"testnonce\"\r\n")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task HttpClientHandler_IncorrectCredentials_Fails(string authenticateHeader)
{
var options = new LoopbackServer.Options { Domain = Domain, Username = Username, Password = Password };
[InlineData("NTLM")]
[InlineData("Kerberos")]
[InlineData("Negotiate")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task PreAuthenticate_NoPreviousAuthenticatedRequests_NoCredentialsSent(string credCacheScheme)
{
const int NumRequests = 3;
[Theory]
[InlineData(null, "WWW-Authenticate: Basic realm=\"hello\"\r\n")]
[InlineData("Basic", "WWW-Authenticate: Basic realm=\"hello\"\r\n")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task PreAuthenticate_FirstRequestNoHeaderAndAuthenticates_SecondRequestPreauthenticates(string credCacheScheme, string authResponse)
{
await LoopbackServer.CreateClientAndServerAsync(async uri =>
[InlineData((HttpStatusCode)508)] // LoopDetected
[InlineData((HttpStatusCode)510)] // NotExtended
[InlineData((HttpStatusCode)511)] // NetworkAuthenticationRequired
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task PreAuthenticate_FirstRequestNoHeader_SecondRequestVariousStatusCodes_ThirdRequestPreauthenticates(HttpStatusCode statusCode)
{
const string AuthResponse = "WWW-Authenticate: Basic realm=\"hello\"\r\n";
[InlineData("/something/hello.html", "/world.html", false)]
[InlineData("/something/hello.html", "/another/", false)]
[InlineData("/something/hello.html", "/another/hello.html", false)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task PreAuthenticate_AuthenticatedUrl_ThenTryDifferentUrl_SendsAuthHeaderOnlyIfPrefixMatches(
string originalRelativeUri, string secondRelativeUri, bool expectedAuthHeader)
{
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task PreAuthenticate_SuccessfulBasicButThenFails_DoesntLoopInfinitely()
{
await LoopbackServer.CreateClientAndServerAsync(async uri =>
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task PreAuthenticate_SuccessfulBasic_ThenDigestChallenged()
{
if (IsWinHttpHandler)
[InlineData("deflate", true)]
[InlineData("br", false)]
[InlineData("br", true)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task DecompressedResponse_MethodSpecified_DecompressedContentReturned(string encodingName, bool all)
{
Func<Stream, Stream> compress;
[Theory]
[MemberData(nameof(DecompressedResponse_MethodNotSpecified_OriginalContentReturned_MemberData))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task DecompressedResponse_MethodNotSpecified_OriginalContentReturned(
string encodingName, Func<Stream, Stream> compress, DecompressionMethods methods)
{
[InlineData(DecompressionMethods.Deflate, "deflate", "gzip")]
[InlineData(DecompressionMethods.Deflate, "deflate", "br")]
[InlineData(DecompressionMethods.GZip | DecompressionMethods.Deflate, "gzip, deflate", "gzip, deflate")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetAsync_SetAutomaticDecompression_AcceptEncodingHeaderSentWithNoDuplicates(
DecompressionMethods methods,
string encodings,
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
using Xunit;
[assembly: SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131", RuntimeConfiguration.Checked)]
-[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/131", TestRuntimes.Mono)] // System.Net.Tests are flaky and/or long running
+[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/131", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsNotBrowser))] // System.Net.Tests are flaky and/or long running
namespace System.Net.Http.Functional.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public class HPackTest : HttpClientHandlerTestBase
{
protected override Version UseVersion => HttpVersion.Version20;
public HttpClientHandlerTest_Http1(ITestOutputHelper output) : base(output) { }
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task SendAsync_HostHeader_First()
{
// RFC 7230 3.2.2. Field Order
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetStringAsync_Success()
{
string content = Guid.NewGuid().ToString();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetStringAsync_CanBeCanceled_AlreadyCanceledCts()
{
var onClientFinished = new SemaphoreSlim(0, 1);
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetStringAsync_CanBeCanceled()
{
var cts = new CancellationTokenSource();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetByteArrayAsync_Success()
{
string content = Guid.NewGuid().ToString();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetByteArrayAsync_CanBeCanceled_AlreadyCanceledCts()
{
var onClientFinished = new SemaphoreSlim(0, 1);
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetByteArrayAsync_CanBeCanceled()
{
var cts = new CancellationTokenSource();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetStreamAsync_Success()
{
string content = Guid.NewGuid().ToString();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetStreamAsync_CanBeCanceled_AlreadyCanceledCts()
{
var onClientFinished = new SemaphoreSlim(0, 1);
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task GetStreamAsync_CanBeCanceled()
{
var cts = new CancellationTokenSource();
[Theory]
[InlineData(false)]
[InlineData(true)]
+ [SkipOnMono("System.Net.Sockets is not supported on this platform", TestPlatforms.Browser)]
public void CancelAllPending_AllPendingOperationsCanceled(bool withInfiniteTimeout)
{
using (var client = new HttpClient(new CustomResponseHandler((r, c) => WhenCanceled<HttpResponseMessage>(c))))
[Theory]
[InlineData(HttpCompletionOption.ResponseContentRead)]
[InlineData(HttpCompletionOption.ResponseHeadersRead)]
+ [SkipOnMono("System.Net.Sockets is not supported on this platform", TestPlatforms.Browser)]
public void Timeout_TooShort_AllPendingOperationsCanceled(HttpCompletionOption completionOption)
{
using (var client = new HttpClient(new CustomResponseHandler((r, c) => WhenCanceled<HttpResponseMessage>(c))))
[Theory]
[InlineData(HttpCompletionOption.ResponseContentRead)]
[InlineData(HttpCompletionOption.ResponseHeadersRead)]
+ [SkipOnMono("System.Net.Sockets is not supported on this platform", TestPlatforms.Browser)]
public void Timeout_CallerCanceledTokenBeforeTimeout_TimeoutIsNotDetected(HttpCompletionOption completionOption)
{
using (var client = new HttpClient(new CustomResponseHandler((r, c) => WhenCanceled<HttpResponseMessage>(c))))
[Theory]
[InlineData(HttpCompletionOption.ResponseContentRead)]
[InlineData(HttpCompletionOption.ResponseHeadersRead)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task Send_SingleThread_Loopback_Succeeds(HttpCompletionOption completionOption)
{
string content = "Test content";
[Theory]
[MemberData(nameof(VersionSelectionMemberData))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task SendAsync_CorrectVersionSelected_LoopbackServer(Version requestVersion, HttpVersionPolicy versionPolicy, Version serverVersion, bool useSsl, object expectedResult)
{
await HttpAgnosticLoopbackServer.CreateClientAndServerAsync(
namespace System.Net.Http.Functional.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public class HttpConnectionKeyTest
{
public static IEnumerable<object[]> KeyComponents()
Assert.Equal(before, after);
}
+ [SkipOnMono("Browser doesn't support Synchronous reads", TestPlatforms.Browser)]
[Theory]
[InlineData(true)]
[InlineData(false)]
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsStringAsync_Buffered_IgnoresCancellationToken()
{
string content = Guid.NewGuid().ToString();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsStringAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts()
{
await LoopbackServer.CreateClientAndServerAsync(
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsStringAsync_Unbuffered_CanBeCanceled()
{
var cts = new CancellationTokenSource();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsByteArrayAsync_Buffered_IgnoresCancellationToken()
{
string content = Guid.NewGuid().ToString();
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsByteArrayAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts()
{
await LoopbackServer.CreateClientAndServerAsync(
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsByteArrayAsync_Unbuffered_CanBeCanceled()
{
var cts = new CancellationTokenSource();
[Theory]
[InlineData(true)]
[InlineData(false)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsStreamAsync_Buffered_IgnoresCancellationToken(bool readStreamAsync)
{
string content = Guid.NewGuid().ToString();
[Theory]
[InlineData(true)]
[InlineData(false)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)]
public async Task ReadAsStreamAsync_Unbuffered_IgnoresCancellationToken(bool readStreamAsync)
{
string content = Guid.NewGuid().ToString();
namespace System.Net.Http.Functional.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public class HttpRequestMessageTest : HttpClientHandlerTestBase
{
private readonly Version _expectedRequestMessageVersion = HttpVersion.Version11;
namespace System.Net.Http.Functional.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_Asynchrony_Test : HttpClientHandler_Asynchrony_Test
{
public SocketsHttpHandler_HttpClientHandler_Asynchrony_Test(ITestOutputHelper output) : base(output) { }
}
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpProtocolTests : HttpProtocolTests
{
public SocketsHttpHandler_HttpProtocolTests(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpProtocolTests_Dribble : HttpProtocolTests_Dribble
{
public SocketsHttpHandler_HttpProtocolTests_Dribble(ITestOutputHelper output) : base(output) { }
public SocketsHttpHandler_HttpClientHandler_Decompression_Tests(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test : HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test
{
public SocketsHttpHandler_HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_ClientCertificates_Test : HttpClientHandler_ClientCertificates_Test
{
public SocketsHttpHandler_HttpClientHandler_ClientCertificates_Test(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_DefaultProxyCredentials_Test : HttpClientHandler_DefaultProxyCredentials_Test
{
public SocketsHttpHandler_HttpClientHandler_DefaultProxyCredentials_Test(ITestOutputHelper output) : base(output) { }
protected override Version UseVersion => HttpVersion.Version20;
}
+ // set_MaxConnectionsPerServer - System.PlatformNotSupportedException
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_MaxConnectionsPerServer_Test : HttpClientHandler_MaxConnectionsPerServer_Test
{
public SocketsHttpHandler_HttpClientHandler_MaxConnectionsPerServer_Test(ITestOutputHelper output) : base(output) { }
}
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_ServerCertificates_Test : HttpClientHandler_ServerCertificates_Test
{
public SocketsHttpHandler_HttpClientHandler_ServerCertificates_Test(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_ResponseDrain_Test : HttpClientHandler_ResponseDrain_Test
{
protected override void SetResponseDrainTimeout(HttpClientHandler handler, TimeSpan time)
}
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_PostScenarioTest : PostScenarioTest
{
public SocketsHttpHandler_PostScenarioTest(ITestOutputHelper output) : base(output) { }
}
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_ResponseStreamTest : ResponseStreamTest
{
public SocketsHttpHandler_ResponseStreamTest(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_SslProtocols_Test : HttpClientHandler_SslProtocols_Test
{
public SocketsHttpHandler_HttpClientHandler_SslProtocols_Test(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_Proxy_Test : HttpClientHandler_Proxy_Test
{
public SocketsHttpHandler_HttpClientHandler_Proxy_Test(ITestOutputHelper output) : base(output) { }
new DataFrame(data, (endStream ? FrameFlags.EndStream : FrameFlags.None), 0, streamId);
}
+ // System.Net.Sockets is not supported on this platform
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public class SocketsHttpHandler_Http1_TrailingHeaders_Test : SocketsHttpHandler_TrailingHeaders_Test
{
public SocketsHttpHandler_Http1_TrailingHeaders_Test(ITestOutputHelper output) : base(output) { }
public SocketsHttpHandler_HttpClientHandlerTest(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandlerTest_AutoRedirect : HttpClientHandlerTest_AutoRedirect
{
public SocketsHttpHandlerTest_AutoRedirect(ITestOutputHelper output) : base(output) { }
public SocketsHttpHandler_DefaultCredentialsTest(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_IdnaProtocolTests : IdnaProtocolTests
{
public SocketsHttpHandler_IdnaProtocolTests(ITestOutputHelper output) : base(output) { }
protected override bool SupportsIdna => true;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpRetryProtocolTests : HttpRetryProtocolTests
{
public SocketsHttpHandler_HttpRetryProtocolTests(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandlerTest_Cookies : HttpClientHandlerTest_Cookies
{
public SocketsHttpHandlerTest_Cookies(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandlerTest_Cookies_Http11 : HttpClientHandlerTest_Cookies_Http11
{
public SocketsHttpHandlerTest_Cookies_Http11(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test : HttpClientHandler_Http11_Cancellation_Test
{
public SocketsHttpHandler_HttpClientHandler_Cancellation_Test(ITestOutputHelper output) : base(output) { }
}
}
+ // BrowserHttpHandler.set_MaxResponseHeadersLength - Not supported on this platform
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Test : HttpClientHandler_MaxResponseHeadersLength_Test
{
public SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Test(ITestOutputHelper output) : base(output) { }
}
+ //System.Net.Sockets is not supported on this platform
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_Authentication_Test : HttpClientHandler_Authentication_Test
{
public SocketsHttpHandler_HttpClientHandler_Authentication_Test(ITestOutputHelper output) : base(output) { }
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_ConnectionUpgrade_Test : HttpClientHandlerTestBase
{
public SocketsHttpHandler_ConnectionUpgrade_Test(ITestOutputHelper output) : base(output) { }
}
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_Connect_Test : HttpClientHandler_Connect_Test
{
public SocketsHttpHandler_Connect_Test(ITestOutputHelper output) : base(output) { }
}
+ // System.Net.Sockets is not supported on this platform
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_HttpClientHandler_ConnectionPooling_Test : HttpClientHandlerTestBase
{
public SocketsHttpHandler_HttpClientHandler_ConnectionPooling_Test(ITestOutputHelper output) : base(output) { }
}
}
+ // System.Net.Sockets is not supported on this platform
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandler_PublicAPIBehavior_Test
{
[Fact]
}
}
+ // System.Net.Sockets is not supported on this platform
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandlerTest_LocationHeader
{
private static readonly byte[] s_redirectResponseBefore = Encoding.ASCII.GetBytes(
}
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandlerTest_Http2 : HttpClientHandlerTest_Http2
{
public SocketsHttpHandlerTest_Http2(ITestOutputHelper output) : base(output) { }
private static bool PlatformSupportsUnixDomainSockets => Socket.OSSupportsUnixDomainSockets;
}
+ // System.Net.Sockets is not supported on this platform
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandlerTest_ConnectCallback_Http11 : SocketsHttpHandlerTest_ConnectCallback
{
public SocketsHttpHandlerTest_ConnectCallback_Http11(ITestOutputHelper output) : base(output) { }
}
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SocketsHttpHandlerTest_PlaintextStreamFilter_Http11 : SocketsHttpHandlerTest_PlaintextStreamFilter
{
public SocketsHttpHandlerTest_PlaintextStreamFilter_Http11(ITestOutputHelper output) : base(output) { }
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) { }
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using Xunit;
using Xunit.Abstractions;
namespace System.Net.Http.Functional.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_HttpProtocolTests : HttpProtocolTests
{
public SyncHttpHandler_HttpProtocolTests(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_HttpProtocolTests_Dribble : HttpProtocolTests_Dribble
{
public SyncHttpHandler_HttpProtocolTests_Dribble(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_HttpClientHandlerTest : HttpClientHandlerTest
{
public SyncHttpHandler_HttpClientHandlerTest(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandlerTest_AutoRedirect : HttpClientHandlerTest_AutoRedirect
{
public SyncHttpHandlerTest_AutoRedirect(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_IdnaProtocolTests : IdnaProtocolTests
{
public SyncHttpHandler_IdnaProtocolTests(ITestOutputHelper output) : base(output) { }
protected override bool SupportsIdna => true;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_HttpRetryProtocolTests : HttpRetryProtocolTests
{
public SyncHttpHandler_HttpRetryProtocolTests(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandlerTest_Cookies : HttpClientHandlerTest_Cookies
{
public SyncHttpHandlerTest_Cookies(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandlerTest_Cookies_Http11 : HttpClientHandlerTest_Cookies_Http11
{
public SyncHttpHandlerTest_Cookies_Http11(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_HttpClientHandler_Cancellation_Test : HttpClientHandler_Http11_Cancellation_Test
{
public SyncHttpHandler_HttpClientHandler_Cancellation_Test(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_HttpClientHandler_Authentication_Test : HttpClientHandler_Authentication_Test
{
public SyncHttpHandler_HttpClientHandler_Authentication_Test(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
public sealed class SyncHttpHandler_Connect_Test : HttpClientHandler_Connect_Test
{
public SyncHttpHandler_Connect_Test(ITestOutputHelper output) : base(output) { }
protected override bool TestAsync => false;
}
+ [SkipOnMono("System.Net.Sockets is not supported on this platform.", TestPlatforms.Browser)]
public sealed class SyncHttpHandlerTest_HttpClientHandlerTest_Headers : HttpClientHandlerTest_Headers
{
public SyncHttpHandlerTest_HttpClientHandlerTest_Headers(ITestOutputHelper output) : base(output) { }