Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-09-09 22:10:17 +0300
committerGitHub <noreply@github.com>2022-09-09 22:10:17 +0300
commitfcb841c4a49cbb7ecd434fd002420044eb66d049 (patch)
tree6f24a41d0ff96ed4fe121449d1152c382c8177d8 /src
parent784974e35ad464616ea12c5ef4b357bf6813f589 (diff)
[release/7.0] [wasm] Test, and app host fixes (#75295)
* [wasm] Use explicity allowed ports with playwright, on linux too Fixes https://github.com/dotnet/runtime/issues/72436 . * [wasm] Quote path, and arguments for wasm app host Fixes use of app host on windows, when it's installed in `c:\program files`. * Update BrowserRunner.cs Co-authored-by: Ankit Jain <radical@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mono/wasm/build/WasmApp.targets2
-rw-r--r--src/tests/BuildWasmApps/Wasm.Build.Tests/BrowserRunner.cs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets
index b324a4da7d2..1c5cb833874 100644
--- a/src/mono/wasm/build/WasmApp.targets
+++ b/src/mono/wasm/build/WasmApp.targets
@@ -126,7 +126,7 @@
<PropertyGroup Condition="'$(WasmGenerateAppBundle)' == 'true'">
<RunCommand Condition="'$(DOTNET_HOST_PATH)' != '' and Exists($(DOTNET_HOST_PATH))">$(DOTNET_HOST_PATH)</RunCommand>
<RunCommand Condition="'$(RunCommand)' == ''">dotnet</RunCommand>
- <RunArguments Condition="'$(RunArguments)' == ''">exec $([MSBuild]::NormalizePath($(WasmAppHostDir), 'WasmAppHost.dll')) --runtime-config $(_AppBundleDirForRunCommand)/$(AssemblyName).runtimeconfig.json $(WasmHostArguments)</RunArguments>
+ <RunArguments Condition="'$(RunArguments)' == ''">exec &quot;$([MSBuild]::NormalizePath($(WasmAppHostDir), 'WasmAppHost.dll'))&quot; --runtime-config &quot;$(_AppBundleDirForRunCommand)/$(AssemblyName).runtimeconfig.json&quot; $(WasmHostArguments)</RunArguments>
<RunWorkingDirectory Condition="'$(RunWorkingDirectory)' == ''">$(_AppBundleDirForRunCommand)</RunWorkingDirectory>
</PropertyGroup>
diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BrowserRunner.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BrowserRunner.cs
index c39818f033d..13a4ff96ab7 100644
--- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BrowserRunner.cs
+++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BrowserRunner.cs
@@ -77,12 +77,12 @@ internal class BrowserRunner : IAsyncDisposable
var url = new Uri(urlAvailable.Task.Result);
Playwright = await Microsoft.Playwright.Playwright.CreateAsync();
+ string[] chromeArgs = new[] { $"--explicitly-allowed-ports={url.Port}" };
+ Console.WriteLine($"Launching chrome ('{s_chromePath.Value}') via playwright with args = {string.Join(',', chromeArgs)}");
Browser = await Playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions{
ExecutablePath = s_chromePath.Value,
Headless = headless,
- Args = OperatingSystem.IsWindows()
- ? new[] { $"--explicitly-allowed-ports={url.Port}" }
- : Array.Empty<string>()
+ Args = chromeArgs
});
IPage page = await Browser.NewPageAsync();