Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ private static bool IsCancelKeyPressNotSupported()
=> RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI")) ||
Comment thread
Youssef1313 marked this conversation as resolved.
Resolved
RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));

// Called automatically by the runtime through the MetadataUpdateHandlerAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ This package provides the core platform and the .NET implementation of the proto
<SupportedPlatform Include="ios" />
<SupportedPlatform Include="browser" />
<SupportedPlatform Include="tvos" />
<SupportedPlatform Include="wasi" />
</ItemGroup>

<!-- Version templating -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Microsoft.Testing.Platform.OutputDevice;
/// Implementation of output device that writes to terminal with progress and optionally with ANSI.
/// </summary>
[SupportedOSPlatform("browser")]
[SupportedOSPlatform("wasi")]
internal sealed partial class BrowserOutputDevice : IPlatformOutputDevice,
IDataConsumer,
IOutputDeviceDataProducer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal async Task<ProxyOutputDevice> BuildAsync(ServiceProvider serviceProvide
}

public static IPlatformOutputDevice GetDefaultTerminalOutputDevice(ServiceProvider serviceProvider)
=> RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"))
=> RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")) || RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI"))
? new BrowserOutputDevice(
serviceProvider.GetConsole(),
serviceProvider.GetTestApplicationModuleInfo(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,6 @@ private static bool IsForegroundColorNotSupported()
=> RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ private static bool IsCancelKeyPressNotSupported()
=> RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI")) ||
RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));

public void CancelAfter(TimeSpan timeout) => _cancellationTokenSource.CancelAfter(timeout);
Expand Down