From 27ceeddb7890938adea54de8e6207ff348fd7883 Mon Sep 17 00:00:00 2001 From: Charles Vazac Date: Mon, 29 Oct 2018 17:20:36 -0500 Subject: [PATCH 1/5] turn Server-Timing experimental feature on --- src/scripts/safari-disable-popup-blocker.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/safari-disable-popup-blocker.sh b/src/scripts/safari-disable-popup-blocker.sh index 0b8f02c6d..8647eb068 100755 --- a/src/scripts/safari-disable-popup-blocker.sh +++ b/src/scripts/safari-disable-popup-blocker.sh @@ -31,6 +31,9 @@ fi # https://github.com/web-platform-tests/wpt/blob/1999770b55cb8cdd93dbce0e78e5c94b2ba22e0e/tools/wptrunner/wptrunner/browsers/sauce_setup/safari-prerun.sh defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool true +# turn on experimental features +defaults write com.apple.Safari ExperimentalServerTimingEnabled -bool true + echo Closing all instances of the application to ensure the changes echo are observed. From 49ea7fa20b67e34cfcb95f6ffa73797156e9c725 Mon Sep 17 00:00:00 2001 From: Charles Vazac Date: Mon, 29 Oct 2018 20:29:26 -0500 Subject: [PATCH 2/5] add removal TODO --- src/scripts/safari-disable-popup-blocker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripts/safari-disable-popup-blocker.sh b/src/scripts/safari-disable-popup-blocker.sh index 8647eb068..e4134a313 100755 --- a/src/scripts/safari-disable-popup-blocker.sh +++ b/src/scripts/safari-disable-popup-blocker.sh @@ -32,6 +32,8 @@ fi defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool true # 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 From 8e551ecc98889b3cd8b65b9807136e4b29b7ca6a Mon Sep 17 00:00:00 2001 From: Charles Vazac Date: Mon, 5 Nov 2018 11:49:08 -0600 Subject: [PATCH 3/5] move experimental feature block --- .../roles/buildbot-worker/tasks/darwin.yml | 1 + src/master/master.cfg | 8 ++++++++ src/scripts/safari-disable-popup-blocker.sh | 5 ----- src/scripts/safari-enable-experimental-features.sh | 11 +++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100755 src/scripts/safari-enable-experimental-features.sh 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..95b507f9b 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 @@ -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'), diff --git a/src/scripts/safari-disable-popup-blocker.sh b/src/scripts/safari-disable-popup-blocker.sh index e4134a313..0b8f02c6d 100755 --- a/src/scripts/safari-disable-popup-blocker.sh +++ b/src/scripts/safari-disable-popup-blocker.sh @@ -31,11 +31,6 @@ fi # https://github.com/web-platform-tests/wpt/blob/1999770b55cb8cdd93dbce0e78e5c94b2ba22e0e/tools/wptrunner/wptrunner/browsers/sauce_setup/safari-prerun.sh defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool true -# 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. diff --git a/src/scripts/safari-enable-experimental-features.sh b/src/scripts/safari-enable-experimental-features.sh new file mode 100755 index 000000000..3c6651e20 --- /dev/null +++ b/src/scripts/safari-enable-experimental-features.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# turn on experimental features +safari-enable-experimental-features.shsafari-enable-experimental-features.sh +# 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 From f772c640e65435ecc1f61b16c852784168a722bc Mon Sep 17 00:00:00 2001 From: Charles Vazac Date: Tue, 6 Nov 2018 13:28:54 -0600 Subject: [PATCH 4/5] fix errant double paste --- src/scripts/safari-enable-experimental-features.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/safari-enable-experimental-features.sh b/src/scripts/safari-enable-experimental-features.sh index 3c6651e20..d58b57043 100755 --- a/src/scripts/safari-enable-experimental-features.sh +++ b/src/scripts/safari-enable-experimental-features.sh @@ -1,7 +1,7 @@ #!/bin/bash # turn on experimental features -safari-enable-experimental-features.shsafari-enable-experimental-features.sh + # TODO(cvazac) Remove this if/when Server-Timing is enabled by default in Safari defaults write com.apple.Safari ExperimentalServerTimingEnabled -bool true From 115e65cbd511e8d244cbbcf62fd208791ef7c37c Mon Sep 17 00:00:00 2001 From: Charles Vazac Date: Thu, 8 Nov 2018 22:20:48 -0600 Subject: [PATCH 5/5] move safari-enable-experimental-features.sh to after install-browser.sh --- src/master/master.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/master/master.cfg b/src/master/master.cfg index 95b507f9b..36d6bcc83 100644 --- a/src/master/master.cfg +++ b/src/master/master.cfg @@ -325,10 +325,6 @@ 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'), @@ -341,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,