diff options
author | Luiz Eduardo de Christo <dudu.christo@gmail.com> | 2017-08-03 08:12:31 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-08-03 08:12:31 +0300 |
commit | 287320647e09592d02635d19e3b173c8f468ee1f (patch) | |
tree | e6375d91e87cb3529cbe674f082344c1d2890e30 /tests/javascript | |
parent | 010a5d1e884efafcd67504d7fe1d2c43a06852f3 (diff) |
Fix #11410: Optional secure tracker cookie (#11891)
Diffstat (limited to 'tests/javascript')
-rw-r--r-- | tests/javascript/index.php | 9 | ||||
-rw-r--r-- | tests/javascript/piwiktest.js | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php index 2205b26a0b..389f8ff4df 100644 --- a/tests/javascript/index.php +++ b/tests/javascript/index.php @@ -2979,6 +2979,15 @@ function PiwikTest() { equal( tracker.hook.test._getCookie( cookieName ), expectedValue, 'getCookie(), setCookie()' ); }); + test("Tracker setSecureCookie(), isSecureCookie()", function() { + expect(1); + + var tracker = Piwik.getTracker(); + + tracker.hook.test._setSecureCookie(1); + equal( tracker.hook.test._isSecureCookie(), 1); + }); + test("Tracker getCookieName() contains website ID", function() { expect(4); diff --git a/tests/javascript/piwiktest.js b/tests/javascript/piwiktest.js index 514d1c5c8c..0909f31dba 100644 --- a/tests/javascript/piwiktest.js +++ b/tests/javascript/piwiktest.js @@ -26,7 +26,9 @@ Piwik.addPlugin('testPlugin', { '_getCookie : getCookie,' + '_getCookieName : getCookieName,' + '_setCookie : setCookie,' + - '_getLinkIfShouldBeProcessed : getLinkIfShouldBeProcessed,' + + '_setSecureCookie : setSecureCookie,' + + '_isSecureCookie : isSecureCookie,' + + '_getLinkIfShouldBeProcessed : getLinkIfShouldBeProcessed,' + '_encode : encodeWrapper,' + '_decode : decodeWrapper,' + '_urldecode : urldecode,' + |