Skip to content

[browser] Add chrome provisioning on macos#124852

Open
radekdoulik wants to merge 1 commit intodotnet:mainfrom
radekdoulik:wasm-add-provisioning-on-macos
Open

[browser] Add chrome provisioning on macos#124852
radekdoulik wants to merge 1 commit intodotnet:mainfrom
radekdoulik:wasm-add-provisioning-on-macos

Conversation

@radekdoulik
Copy link
Member

No description provided.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds Chrome browser and ChromeDriver provisioning support for macOS to enable WASM browser testing on macOS. The changes align with existing Linux and Windows provisioning configurations.

Changes:

  • Added macOS-specific Chrome version properties to BrowserVersions.props (version, revision, snapshot URL, and V8 version)
  • Added macOS PropertyGroup in wasm-provisioning.targets to configure Chrome, ChromeDriver, and V8 binary paths and download URLs
  • Updated error messages in three provisioning targets to include macOS as a supported platform

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
eng/testing/BrowserVersions.props Adds macOS Chrome/V8 version properties matching Linux/Windows versions (143.0.7499.40, revision 1536371, V8 14.3.127)
eng/testing/wasm-provisioning.targets Adds macOS configuration block with directory names, binary names, URLs, and updates error conditions to include macOS support

Comment on lines +77 to +89
<_ChromeOSPrefix>Mac_Arm</_ChromeOSPrefix>

<ChromeVersion>$(macos_ChromeVersion)</ChromeVersion>
<ChromeRevision>$(macos_ChromeRevision)</ChromeRevision>
<_ChromeBaseSnapshotUrl>$(macos_ChromeBaseSnapshotUrl)</_ChromeBaseSnapshotUrl>

<ChromeUrl>$(macos_ChromeBaseSnapshotUrl)/chrome-mac.zip</ChromeUrl>
<ChromeDriverUrl>$(macos_ChromeBaseSnapshotUrl)/chromedriver_mac64.zip</ChromeDriverUrl>

<V8Version>$(macos_V8Version)</V8Version>
<V8DirName>v8-$(macos_V8Version)</V8DirName>
<V8BinaryName>$(V8DirName).sh</V8BinaryName>
<_V8PlatformId>mac-arm64</_V8PlatformId>
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration hardcodes Mac_Arm for the ChromeOSPrefix and mac-arm64 for V8PlatformId, which only supports ARM-based Macs. Intel-based Macs (x64) would not be supported with this configuration. Consider detecting the architecture dynamically using RuntimeInformation.ProcessArchitecture or providing separate configurations for both Mac_Arm and Mac x86_64, similar to how Windows uses Win_x64 and Linux uses Linux_x64. The chromium-browser-snapshots bucket typically has both Mac_Arm and Mac folders for different architectures.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to add intel mac support to provisioning now. It would be good to update the checks to report error on intel macs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback


<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows'))"
Text="Chrome provisioning only supported on Linux, and windows." />
<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows')) and !$([MSBuild]::IsOSPlatform('macos'))"
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Error condition uses IsOSPlatform('macos'), but MSBuild recognizes 'OSX' as the platform identifier for macOS, not 'macos'. This should be changed to IsOSPlatform('OSX') to be consistent with the rest of the codebase (see eng/OSArch.props line 4).

Suggested change
<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows')) and !$([MSBuild]::IsOSPlatform('macos'))"
<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows')) and !$([MSBuild]::IsOSPlatform('OSX'))"

Copilot uses AI. Check for mistakes.
Comment on lines +187 to +188
<Error Condition="!$([MSBuild]::IsOSPlatform('linux')) and !$([MSBuild]::IsOSPlatform('windows')) and !$([MSBuild]::IsOSPlatform('macos'))"
Text="V8 provisioning only supported on Linux, Windows, and macOS." />
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Error condition uses IsOSPlatform('macos'), but MSBuild recognizes 'OSX' as the platform identifier for macOS, not 'macos'. This should be changed to IsOSPlatform('OSX') to be consistent with the rest of the codebase (see eng/OSArch.props line 4).

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +90
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('macos'))">
<ChromeDirName>chrome-mac/Chromium.app/Contents/MacOS</ChromeDirName>
<ChromeDriverDirName>chromedriver_mac64</ChromeDriverDirName>
<ChromeBinaryName>Chromium</ChromeBinaryName>
<ChromeDriverBinaryName>chromedriver</ChromeDriverBinaryName>
<_ChromeOSPrefix>Mac_Arm</_ChromeOSPrefix>

<ChromeVersion>$(macos_ChromeVersion)</ChromeVersion>
<ChromeRevision>$(macos_ChromeRevision)</ChromeRevision>
<_ChromeBaseSnapshotUrl>$(macos_ChromeBaseSnapshotUrl)</_ChromeBaseSnapshotUrl>

<ChromeUrl>$(macos_ChromeBaseSnapshotUrl)/chrome-mac.zip</ChromeUrl>
<ChromeDriverUrl>$(macos_ChromeBaseSnapshotUrl)/chromedriver_mac64.zip</ChromeDriverUrl>

<V8Version>$(macos_V8Version)</V8Version>
<V8DirName>v8-$(macos_V8Version)</V8DirName>
<V8BinaryName>$(V8DirName).sh</V8BinaryName>
<_V8PlatformId>mac-arm64</_V8PlatformId>
</PropertyGroup>
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ChromeOSIdentifier property is not being set for macOS. Lines 8-10 set it for Windows and Linux but not for macOS. This means on macOS it will default to "unsupported-platform", which could cause unexpected behavior. You should add a line like:

ChromeOSIdentifier Condition="$([MSBuild]::IsOSPlatform('macos'))">macOS

between lines 9 and 10 in eng/testing/wasm-provisioning.targets.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Infrastructure

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants