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 3 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 @@ -321,6 +325,10 @@ chunked_factory = util.BuildFactory(
command=['safari-disable-popup-blocker.sh'],
haltOnFailure=True,
doStepIf=is_local_safari),
steps.ShellCommand(name='Enable Safari Experimental Features',
command=['safari-enable-experimental-features.sh'],
haltOnFailure=True,
doStepIf=is_safari),
steps.SetProperties(properties={
'log_wptreport': temp_dir.prefix('report.json'),
'log_raw': temp_dir.prefix('log-raw.txt'),
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
safari-enable-experimental-features.shsafari-enable-experimental-features.sh
cvazac marked this conversation as resolved.
Show resolved Hide resolved
# 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