Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-04-27 06:05:43 +0300
committerdiosmosis <benaka@piwik.pro>2015-04-27 06:05:43 +0300
commit7cc3bfc451532bb0fd074a7e95887e9f23e1fcb1 (patch)
tree1f2f1c008d1dc66c7cf555085ab05390237a4c98 /tests/resources/overlay-test-site
parentdffd7bc7fa34250c742d7d9fde6abf7bb51ccdec (diff)
Fixes #3135, fix opt-out form on Safari browsers by opening new window that sets the cookie.
This PR allows us to set 3rd party cookies in the opt-out form for Piwik. It works by opening a new window on form submission, reloading the new window, and setting the cookie on this reload. It is necessary to reload the window, because the session cookie isn't set, so the nonce won't be detected & so, the ignore cookie won't be set. It works whether JavaScript is enabled or not, and other browsers still get the better UX. The new window is closed immediately after opening, if JS is enabled. There is also a new UI test for the opt out form, plus a small change to the UI testing framework to allow switching the user agent during tests.
Diffstat (limited to 'tests/resources/overlay-test-site')
-rw-r--r--tests/resources/overlay-test-site/index.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/resources/overlay-test-site/index.html b/tests/resources/overlay-test-site/index.html
index c6911af4db..27517450b0 100644
--- a/tests/resources/overlay-test-site/index.html
+++ b/tests/resources/overlay-test-site/index.html
@@ -69,6 +69,9 @@
</p>
</div>
+ <!-- opt out frame -->
+ <iframe id="optOutIframe" src="../../../index.php?module=CoreAdminHome&action=optOut&language=en"></iframe>
+
</div> <!-- /container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->