steps:
# The conflicting google-chrome and chromedriver casks are first uninstalled.
# The raw google-chrome@dev.rb cask URL is used to bypass caching.
- script: |
    set -eux -o pipefail
    HOMEBREW_NO_AUTO_UPDATE=1 brew uninstall --cask google-chrome || true
    HOMEBREW_NO_AUTO_UPDATE=1 brew uninstall --cask chromedriver || true
    curl https://raw.githubusercontent.com/Homebrew/homebrew-cask/HEAD/Casks/g/google-chrome@dev.rb > google-chrome@dev.rb
    HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask google-chrome@dev.rb
  displayName: 'Install Chrome Dev'
  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
