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
19 changes: 10 additions & 9 deletions docs/_running-tests/safari.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
layout: page
title: Safari
---
To run Safari on macOS, some manual setup is required:
To run Safari on macOS, some manual setup is required. Some steps are different
for Safari and Safari Technology Preview, in which case only step is needed.

* Allow Safari to be controlled by SafariDriver: `safaridriver --enable`
* Allow Safari to be controlled by SafariDriver:
* `safaridriver --enable` or
* `"/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable`

* Allow pop-up windows:
`defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1`
* `defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1` or
* `defaults write com.apple.SafariTechnologyPreview WebKitJavaScriptCanOpenWindowsAutomatically 1`

* Turn on experimental features that are "off" by default:

* `defaults write com.apple.Safari ExperimentalServerTimingEnabled -bool true`

[//]: # (TODO\(cvazac\) Remove this if/when Server-Timing is enabled by default in Safari)
* Turn on additional experimental features Safari Technology Preview:
* `defaults write com.apple.SafariTechnologyPreview ExperimentalServerTimingEnabled 1`

* Trust the certificate:
`security add-trusted-cert -k "$(security default-keychain | cut -d\" -f2)" tools/certs/cacert.pem`
* `security add-trusted-cert -k "$(security default-keychain | cut -d\" -f2)" tools/certs/cacert.pem`

* Set `no_proxy='*'` in your environment. This is a
workaround for a known
Expand Down
6 changes: 3 additions & 3 deletions tools/ci/azure/install_safari.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
parameters:
channel: preview

# Should match https://web-platform-tests.org/running-tests/safari.html
steps:
- ${{ if eq(parameters.channel, 'preview') }}:
- script: |
# This is equivalent to `Homebrew/homebrew-cask-versions/safari-technology-preview`,
# but the raw URL is used to bypass caching.
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/master/Casks/safari-technology-preview.rb
# https://web-platform-tests.org/running-tests/safari.html
sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
defaults write com.apple.SafariTechnologyPreview WebKitJavaScriptCanOpenWindowsAutomatically 1
defaults write com.apple.SafariTechnologyPreview ExperimentalServerTimingEnabled 1
displayName: 'Install Safari Technology Preview'
- ${{ if eq(parameters.channel, 'stable') }}:
- script: |
# https://web-platform-tests.org/running-tests/safari.html
sudo safaridriver --enable
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
displayName: 'Configure Safari'