Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[browser] firefox testing #100697

Merged
merged 16 commits into from
Apr 25, 2024
5 changes: 3 additions & 2 deletions eng/pipelines/common/templates/wasm-library-aot-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
alwaysRun: false
extraBuildArgs: ''
extraHelixArgs: ''
extraHelixArguments: ''
isExtraPlatformsBuild: false
isWasmOnlyBuild: false
buildAOTOnHelix: true
Expand All @@ -26,7 +26,7 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
extraBuildArgs: /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=${{ parameters.buildAOTOnHelix }} /p:RunAOTCompilation=${{ parameters.runAOT }} ${{ parameters.extraBuildArgs }}
extraHelixArgs: /p:NeedsToBuildWasmAppsOnHelix=true ${{ parameters.extraHelixArgs }}
extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true ${{ parameters.extraHelixArguments }}
alwaysRun: ${{ parameters.alwaysRun }}
shouldRunSmokeOnly: ${{ parameters.shouldRunSmokeOnly }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
Expand All @@ -35,5 +35,6 @@ jobs:
- WasmTestOnV8
- ${{ if eq(platform, 'browser_wasm_win') }}:
- WasmTestOnChrome
- WasmTestOnFirefox
- ${{ if or(eq(platform, 'wasi_wasm_win'), eq(platform, 'wasi_wasm')) }}:
- WasmTestOnWasmtime
4 changes: 2 additions & 2 deletions eng/pipelines/common/templates/wasm-library-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
alwaysRun: false
extraBuildArgs: ''
extraHelixArgs: ''
extraHelixArguments: ''
isExtraPlatformsBuild: false
isWasmOnlyBuild: false
nameSuffix: ''
Expand Down Expand Up @@ -97,5 +97,5 @@ jobs:
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraHelixArguments: /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) ${{ parameters.extraHelixArgs }}
extraHelixArguments: /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) ${{ parameters.extraHelixArguments }}
scenarios: ${{ parameters.scenarios }}
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ jobs:
scenarios:
- WasmTestOnV8
- WasmTestOnChrome
- WasmTestOnFirefox
- WasmTestOnNodeJS

# Hybrid Globalization AOT tests
Expand Down Expand Up @@ -321,4 +322,4 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
scenarios:
- WasmTestOnV8
- WasmTestOnWasmtime
3 changes: 3 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ extends:
scenarios:
- WasmTestOnV8
- WasmTestOnChrome
- WasmTestOnFirefox

- template: /eng/pipelines/common/templates/wasm-library-tests.yml
parameters:
Expand All @@ -861,10 +862,12 @@ extends:
#- browser_wasm_win
nameSuffix: _Threading
extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
extraHelixArguments: /p:WasmEnableThreads=true
alwaysRun: ${{ variables.isRollingBuild }}
shouldRunSmokeOnly: onLibrariesAndIllinkChanges
scenarios:
- WasmTestOnChrome
- WasmTestOnFirefox
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592

# EAT Library tests - only run on linux
Expand Down
4 changes: 3 additions & 1 deletion eng/testing/BrowserVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<win_ChromeRevision>1250580</win_ChromeRevision>
<win_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1250586</win_ChromeBaseSnapshotUrl>
<win_V8Version>12.3.219</win_V8Version>
<linux_FirefoxRevision>124.0.2</linux_FirefoxRevision>
<linux_FirefoxRevision>125.0.1</linux_FirefoxRevision>
<linux_GeckoDriverRevision>0.34.0</linux_GeckoDriverRevision>
<win_FirefoxRevision>125.0.1</win_FirefoxRevision>
<win_GeckoDriverRevision>0.34.0</win_GeckoDriverRevision>
</PropertyGroup>
</Project>
30 changes: 24 additions & 6 deletions eng/testing/WasmRunnerTemplate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ if [%XHARNESS_COMMAND%] == [] (
if /I [%SCENARIO%]==[WasmTestOnChrome] (
set XHARNESS_COMMAND=test-browser
) else (
set XHARNESS_COMMAND=test
if /I [%SCENARIO%]==[WasmTestOnFirefox] (
set XHARNESS_COMMAND=test-browser
) else (
set XHARNESS_COMMAND=test
)
)
)

Expand All @@ -56,11 +60,25 @@ if /I [%XHARNESS_COMMAND%] == [test] (
)
)
) else (
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
)
if [%JS_ENGINE_ARGS%] == [] (
set "JS_ENGINE_ARGS=--browser-arg^=--js-flags^=--stack-trace-limit^=1000"
if /I [%SCENARIO%] == [WasmTestOnChrome] (
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
)
if [%JS_ENGINE_ARGS%] == [] (
set "JS_ENGINE_ARGS=--browser-arg^=--js-flags^=--stack-trace-limit^=1000"
)
) else (
if /I [%SCENARIO%] == [WasmTestOnFirefox] (
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\firefox\firefox.exe"
)
if [%JS_ENGINE%] == [] (
set "JS_ENGINE=--browser^=Firefox"
)
if [%JS_ENGINE_ARGS%] == [] (
set "JS_ENGINE_ARGS=--browser-arg^=-private-window"
)
)
)
)

Expand Down
17 changes: 14 additions & 3 deletions eng/testing/WasmRunnerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ else
fi

if [[ -z "$XHARNESS_COMMAND" ]]; then
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
if [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
XHARNESS_COMMAND="test-browser"
elif [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
XHARNESS_COMMAND="test-browser"
else
XHARNESS_COMMAND="test"
Expand Down Expand Up @@ -59,8 +61,17 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
fi
fi
else
if [[ -z "$JS_ENGINE_ARGS" ]]; then
JS_ENGINE_ARGS="--browser-arg=--js-flags=--stack-trace-limit=1000"
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
if [[ -z "$JS_ENGINE_ARGS" ]]; then
JS_ENGINE_ARGS="--browser-arg=--js-flags=--stack-trace-limit=1000"
fi
elif [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
if [[ -z "$JS_ENGINE" ]]; then
JS_ENGINE="--browser=Firefox"
fi
if [[ -z "$JS_ENGINE_ARGS" ]]; then
JS_ENGINE_ARGS="--browser-arg=-private-window"
fi
fi
fi

Expand Down
9 changes: 9 additions & 0 deletions eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,18 @@
<_NodeNpmModuleStringTrimmed Include="@(_NodeNpmModuleString->Trim(':'))" />
</ItemGroup>
<PropertyGroup>
<Scenario Condition="'$(Scenario)' == ''">WasmTestOnV8</Scenario>
<NodeNpmModuleString>@(_NodeNpmModuleStringTrimmed, ',')</NodeNpmModuleString>
</PropertyGroup>

<Error Condition="'$(Scenario)' != 'WasmTestOnV8' and
'$(Scenario)' != 'WasmTestOnChrome' and
'$(Scenario)' != 'WasmTestOnFirefox' and
'$(Scenario)' != 'WasmTestOnNodeJS' and
'$(Scenario)' != 'WasmDebuggerTests' and
'$(Scenario)' != 'BuildWasmApps'"
Text="Only supported scenarios are WasmTestOnV8, WasmTestOnNodeJS, WasmTestOnChrome, WasmTestOnFirefox, WasmDebuggerTests and BuildWasmApps at the moment. It was $(Scenario)." />

<!-- Restore NPM packages -->
<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
<SetScriptCommands Include="if [[ &quot;$SCENARIO&quot; == &quot;WasmTestOnNodeJS&quot; || &quot;$SCENARIO&quot; == &quot;wasmtestonnodejs&quot; ]]; then export WasmXHarnessMonoArgs=&quot;$WasmXHarnessMonoArgs --setenv=NPM_MODULES=$(NodeNpmModuleString)&quot;; fi" />
Expand Down
7 changes: 7 additions & 0 deletions eng/testing/tests.wasi.targets
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@
</Target>

<Target Name="_WasiAddToRunScript" BeforeTargets="GenerateRunScript">
<PropertyGroup>
<Scenario Condition="'$(Scenario)' == ''">WasmTestOnWasmtime</Scenario>
</PropertyGroup>
<Error Condition="'$(Scenario)' != 'WasmTestOnWasmtime' and
'$(Scenario)' != 'BuildWasmApps'"
Text="Only supported scenarios are WasmTestOnWasmtime and BuildWasmApps at the moment. It was $(Scenario)." />

<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
<SetScriptCommands Condition="'$(InstallWasmtimeForTests)' == 'true' and Exists($(WasmtimeDir))" Include="export PREPEND_PATH=$(WasmtimeDir)" />
<SetScriptCommands Condition="'$(IsWasiProject)' == 'true'" Include="export RuntimeIdentifier=wasi-wasm" />
Expand Down
59 changes: 33 additions & 26 deletions eng/testing/wasm-provisioning.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,30 @@

<Import Project="$(MSBuildThisFileDirectory)BrowserVersions.props" />

<PropertyGroup Condition="'$(BrowserHost)' != 'windows'">
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</FirefoxUrl>
<GeckoDriverUrl>https://github.com/mozilla/geckodriver/releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl>
<FirefoxBinaryName>firefox</FirefoxBinaryName>
<GeckoDriverBinaryName>geckodriver</GeckoDriverBinaryName>
<PropertyGroup>
<FirefoxDir>$(ArtifactsBinDir)firefox\</FirefoxDir>
<FirefoxDirName>firefox</FirefoxDirName>
<GeckoDriverDirName>geckodriver</GeckoDriverDirName>
<GeckoDriverDir>$(ArtifactsBinDir)geckodriver\</GeckoDriverDir>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('linux'))">
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</FirefoxUrl>
<GeckoDriverUrl>https://github.com/mozilla/geckodriver/releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl>
<FirefoxBinaryName>firefox</FirefoxBinaryName>
<GeckoDriverBinaryName>geckodriver</GeckoDriverBinaryName>
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(linux_FirefoxRevision).stamp'))</FirefoxStampFile>
<GeckoDriverStampFile>$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(linux_GeckoDriverRevision).stamp'))</GeckoDriverStampFile>
<FirefoxBinaryPath>$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxDirName), $(FirefoxBinaryName)))</FirefoxBinaryPath>
<GeckoDriverBinaryPath>$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverDirName), $(GeckoDriverBinaryName)))</GeckoDriverBinaryPath>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(win_FirefoxRevision)/win64/en-US/Firefox%20Setup%20$(win_FirefoxRevision).exe</FirefoxUrl>
<GeckoDriverUrl>https://github.com/mozilla/geckodriver/releases/download/v$(win_GeckoDriverRevision)/geckodriver-v$(win_GeckoDriverRevision)-win64.zip</GeckoDriverUrl>
<FirefoxBinaryName>firefox.exe</FirefoxBinaryName>
<GeckoDriverBinaryName>geckodriver.exe</GeckoDriverBinaryName>
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(win_FirefoxRevision).stamp'))</FirefoxStampFile>
<GeckoDriverStampFile>$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(win_GeckoDriverRevision).stamp'))</GeckoDriverStampFile>
<FirefoxBinaryPath>$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxDirName), $(FirefoxBinaryName)))</FirefoxBinaryPath>
<GeckoDriverBinaryPath>$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverDirName), $(GeckoDriverBinaryName)))</GeckoDriverBinaryPath>
</PropertyGroup>
Expand Down Expand Up @@ -183,7 +195,7 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &amp;>

<Target Name="DownloadAndInstallFirefox"
AfterTargets="$(WasmProvisionAfterTarget)"
Condition="!Exists($(FirefoxStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows'))">
Condition="!Exists($(FirefoxStampFile)) and '$(InstallFirefoxForTests)' == 'true'">
<ItemGroup>
<_StampFile Include="$(_BrowserStampDir).install-firefox*.stamp" />
</ItemGroup>
Expand All @@ -197,24 +209,22 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &amp;>
<DownloadFile SourceUrl="$(FirefoxUrl)" DestinationFolder="$(FirefoxDir)" SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
</DownloadFile>
<Exec Command="tar -xf $(_DownloadedFile) -C $(FirefoxDir)"/>
<Exec Command="rm -rf $(_DownloadedFile)"/>

<PropertyGroup>
<_FirefoxBinaryPath>$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxBinaryName)))</_FirefoxBinaryPath>
</PropertyGroup>
<MakeDir Directories="$(FirefoxDir)\$(FirefoxDirName)"/>
<Exec Command="tar -xf $(_DownloadedFile) -C $(FirefoxDir)" Condition="$([MSBuild]::IsOSPlatform('linux'))" />
<Exec Command="&quot;$(_DownloadedFile)&quot; /InstallDirectoryPath=$(FirefoxDir)$(FirefoxDirName) /TaskbarShortcut=false /DesktopShortcut=false /StartMenuShortcut=false /PrivateBrowsingShortcut=false /MaintenanceService=false /PreventRebootRequired=true" Condition="$([MSBuild]::IsOSPlatform('windows'))" />
<Delete Files="$(_DownloadedFile)" />

<Error Text="Cannot find firefox at $(_FirefoxBinaryPath) in the downloaded copy"
Condition="!Exists($(_FirefoxBinaryPath))" />
<Error Text="Cannot find firefox at $(FirefoxBinaryPath) in the downloaded copy"
Condition="!Exists($(FirefoxBinaryPath))" />

<Exec Command="chmod +x $(_FirefoxBinaryPath)"/>
<Exec Command="chmod +x $(FirefoxBinaryPath)" Condition="$([MSBuild]::IsOSPlatform('linux'))"/>

<Touch Files="$(FirefoxStampFile)" AlwaysCreate="true" />
</Target>

<Target Name="DownloadAndInstallGeckoDriver"
AfterTargets="$(WasmProvisionAfterTarget)"
Condition="!Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows'))">
Condition="!Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true'">
<ItemGroup>
<_StampFile Include="$(_BrowserStampDir).install-geckodriver*.stamp" />
</ItemGroup>
Expand All @@ -228,18 +238,15 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &amp;>
<DownloadFile SourceUrl="$(GeckoDriverUrl)" DestinationFolder="$(GeckoDriverDir)" SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
</DownloadFile>
<Exec Command="mkdir -p $(GeckoDriverDir)/$(GeckoDriverDirName)"/>
<Exec Command="tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)/$(GeckoDriverDirName)"/>
<Exec Command="rm -rf $(_DownloadedFile)"/>

<PropertyGroup>
<_GeckoDriverBinaryPath>$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverBinaryName)))</_GeckoDriverBinaryPath>
</PropertyGroup>
<MakeDir Directories="$(GeckoDriverDir)/$(GeckoDriverDirName)"/>
<Exec Command="tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)/$(GeckoDriverDirName)" Condition="$([MSBuild]::IsOSPlatform('linux'))" />
<Unzip SourceFiles="$(_DownloadedFile)" DestinationFolder="$(GeckoDriverDir)/$(GeckoDriverDirName)" Condition="$([MSBuild]::IsOSPlatform('windows'))" />
<Delete Files="$(_DownloadedFile)" />

<Error Text="Cannot find GeckoDriver at $(_GeckoDriverBinaryPath) in the downloaded copy"
Condition="!Exists($(_GeckoDriverBinaryPath))" />
<Error Text="Cannot find GeckoDriver at $(GeckoDriverBinaryPath) in the downloaded copy"
Condition="!Exists($(GeckoDriverBinaryPath))" />

<Exec Command="chmod +x $(_GeckoDriverBinaryPath)"/>
<Exec Command="chmod +x $(GeckoDriverBinaryPath)" Condition="$([MSBuild]::IsOSPlatform('linux'))" />

<Touch Files="$(GeckoDriverStampFile)" AlwaysCreate="true" />
</Target>
Expand Down
25 changes: 20 additions & 5 deletions src/libraries/Common/tests/System/Net/Configuration.Http.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,19 @@ public static partial class Http
public static readonly Uri RemoteEchoServer = new Uri("http://" + Host + "/" + EchoHandler);
public static readonly Uri SecureRemoteEchoServer = new Uri("https://" + SecureHost + "/" + EchoHandler);
public static readonly Uri Http2RemoteEchoServer = new Uri("https://" + Http2Host + "/" + EchoHandler);
public static readonly Uri[] EchoServerList = new Uri[] { RemoteEchoServer, SecureRemoteEchoServer, Http2RemoteEchoServer };
public static Uri[] GetEchoServerList()
{
if (PlatformDetection.IsFirefox)
{
// https://github.com/dotnet/runtime/issues/101115
return [RemoteEchoServer];
}
return [RemoteEchoServer, SecureRemoteEchoServer, Http2RemoteEchoServer];
}

public static readonly Uri RemoteVerifyUploadServer = new Uri("http://" + Host + "/" + VerifyUploadHandler);
public static readonly Uri SecureRemoteVerifyUploadServer = new Uri("https://" + SecureHost + "/" + VerifyUploadHandler);
public static readonly Uri Http2RemoteVerifyUploadServer = new Uri("https://" + Http2Host + "/" + VerifyUploadHandler);
public static readonly Uri[] VerifyUploadServerList = new Uri[] { RemoteVerifyUploadServer, SecureRemoteVerifyUploadServer, Http2RemoteVerifyUploadServer };

public static readonly Uri RemoteEmptyContentServer = new Uri("http://" + Host + "/" + EmptyContentHandler);
public static readonly Uri RemoteDeflateServer = new Uri("http://" + Host + "/" + DeflateHandler);
Expand All @@ -72,7 +79,7 @@ public static partial class Http
public static readonly Uri Http2RemoteGZipServer = new Uri("https://" + Http2Host + "/" + GZipHandler);
public static Uri RemoteLoopServer => new Uri("ws://" + RemoteLoopHost + "/" + RemoteLoopHandler);

public static readonly object[][] EchoServers = EchoServerList.Select(x => new object[] { x }).ToArray();
public static readonly object[][] EchoServers = GetEchoServerList().Select(x => new object[] { x }).ToArray();
public static readonly object[][] VerifyUploadServers = { new object[] { RemoteVerifyUploadServer }, new object[] { SecureRemoteVerifyUploadServer }, new object[] { Http2RemoteVerifyUploadServer } };
public static readonly object[][] CompressedServers = { new object[] { RemoteDeflateServer }, new object[] { RemoteGZipServer }, new object[] { Http2RemoteDeflateServer }, new object[] { Http2RemoteGZipServer } };

Expand All @@ -83,9 +90,17 @@ public static partial class Http
public static readonly RemoteServer RemoteSecureHttp11Server = new RemoteServer(new Uri("https://" + SecureHost + "/"), HttpVersion.Version11);
public static readonly RemoteServer RemoteHttp2Server = new RemoteServer(new Uri("https://" + Http2Host + "/"), new Version(2, 0));

public static readonly IEnumerable<RemoteServer> RemoteServers = new RemoteServer[] { RemoteHttp11Server, RemoteSecureHttp11Server, RemoteHttp2Server };
public static IEnumerable<RemoteServer> GetRemoteServers()
{
if (PlatformDetection.IsFirefox)
{
// https://github.com/dotnet/runtime/issues/101115
return new RemoteServer[] { RemoteHttp11Server };
}
return new RemoteServer[] { RemoteHttp11Server, RemoteSecureHttp11Server, RemoteHttp2Server };
}

public static readonly IEnumerable<object[]> RemoteServersMemberData = RemoteServers.Select(s => new object[] { s });
public static readonly IEnumerable<object[]> RemoteServersMemberData = GetRemoteServers().Select(s => new object[] { s });

public sealed class RemoteServer
{
Expand Down
Loading
Loading