diff --git a/provisioning/configuration/roles/buildbot-worker/tasks/darwin.yml b/provisioning/configuration/roles/buildbot-worker/tasks/darwin.yml index 4a3d4cec5..e1a04a4dd 100644 --- a/provisioning/configuration/roles/buildbot-worker/tasks/darwin.yml +++ b/provisioning/configuration/roles/buildbot-worker/tasks/darwin.yml @@ -43,6 +43,7 @@ with_items: - ../../src/scripts/safari-enable-automation.sh - ../../src/scripts/safari-disable-popup-blocker.sh + - ../../src/scripts/safari-enable-experimental-features.sh - name: Allow application user to enable remote automation in Safari lineinfile: diff --git a/src/master/master.cfg b/src/master/master.cfg index 410dc3848..36d6bcc83 100644 --- a/src/master/master.cfg +++ b/src/master/master.cfg @@ -116,6 +116,10 @@ def render_chunked_builder(properties): return ['GNU/Linux Chunked Runner'] +@util.renderer +def is_safari(properties): + return properties.getProperty('browser_name') == 'safari' + @util.renderer def is_local_safari(properties): return (properties.getProperty('browser_name') == 'safari' and @@ -333,6 +337,10 @@ chunked_factory = util.BuildFactory( util.Property('browser_url')], haltOnFailure=True, doStepIf=lambda step: step.build.properties.getProperty('browser_url')), + steps.ShellCommand(name='Enable Safari Experimental Features', + command=['safari-enable-experimental-features.sh'], + haltOnFailure=True, + doStepIf=is_safari), steps.SetProperty(property='browser_binary', value='/Applications/Safari.app/Contents/MacOS/Safari', doStepIf=is_local_safari_stable, diff --git a/src/scripts/safari-enable-experimental-features.sh b/src/scripts/safari-enable-experimental-features.sh new file mode 100755 index 000000000..d58b57043 --- /dev/null +++ b/src/scripts/safari-enable-experimental-features.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# turn on experimental features + +# TODO(cvazac) Remove this if/when Server-Timing is enabled by default in Safari +defaults write com.apple.Safari ExperimentalServerTimingEnabled -bool true + +echo Closing all instances of the application to ensure the changes +echo are observed. + +killall -9 Safari || true