Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Turn Server-Timing experimental feature on #621

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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 @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions src/master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
11 changes: 11 additions & 0 deletions src/scripts/safari-enable-experimental-features.sh
Original file line number Diff line number Diff line change
@@ -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