WinHttpHandler tests are back (#1676)
authorMarie Píchová <mapichov@microsoft.com>
Tue, 21 Jan 2020 18:55:08 +0000 (19:55 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Jan 2020 18:55:08 +0000 (19:55 +0100)
commit26298bc6295be9cddfa185f9d1dc8e99a5c92278
tree5a1211e82fd5e38a426edae3d2c69171bec50141
parenta6738ed4a2d65d1436be057a472ad81d71744da2
WinHttpHandler tests are back (#1676)

The tests used by PlatformHandlerTest moved to Common/tests in order to share them between System.Net.Http and System.Net.Http.WinHttpHandler.
The added conditions correspond to the state before WinHttpHandler removal. They're just based on IsWinHttpHandler instead of UseSocketHandler.
Some of the code must be conditionally compiled since there is no usable common base class for HttpClientHandler and WinHttpHandler. Other issues solved by introducing WinHttpClientHandler for testing purposes. It corresponds to HttpClientHandler.Windows.cs code from before its removal.
39 files changed:
src/libraries/Common/tests/System/Net/Http/ByteAtATimeContent.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/ByteAtATimeContent.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/ChannelBindingAwareContent.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/ChannelBindingAwareContent.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/CustomContent.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/CustomContent.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/DefaultCredentialsTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs with 99% similarity]
src/libraries/Common/tests/System/Net/Http/DribbleStream.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/DribbleStream.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClient.SelectedSitesTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClient.SelectedSitesTest.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientEKUTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AcceptAllCerts.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs with 96% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Asynchrony.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Asynchrony.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Authentication.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Authentication.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs with 89% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs with 99% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Decompression.cs with 95% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxConnectionsPerServer.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs with 97% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.MaxResponseHeadersLength.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs with 94% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Proxy.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs with 97% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.SslProtocols.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs with 94% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs with 74% similarity]
src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs with 91% similarity]
src/libraries/Common/tests/System/Net/Http/HttpRetryProtocolTests.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs with 94% similarity]
src/libraries/Common/tests/System/Net/Http/IdnaProtocolTests.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/IdnaProtocolTests.cs with 98% similarity]
src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs with 99% similarity]
src/libraries/Common/tests/System/Net/Http/RepeatedFlushContent.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/RepeatedFlushContent.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/ResponseStreamTest.cs with 93% similarity]
src/libraries/Common/tests/System/Net/Http/SchSendAuxRecordHttpTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs with 96% similarity]
src/libraries/Common/tests/System/Net/Http/SyncBlockingContent.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/SyncBlockingContent.cs with 100% similarity]
src/libraries/Common/tests/System/Net/Http/TestHelper.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/TestHelper.cs with 97% similarity]
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/HttpClientHandlerTestBase.WinHttpHandler.cs [new file with mode: 0644]
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/PlatformHandlerTest.cs [moved from src/libraries/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs with 68% similarity]
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj
src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpClientHandler.cs [new file with mode: 0644]
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs [new file with mode: 0644]
src/libraries/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs [deleted file]
src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj