mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
tests: properly clear cookies in test helper
This was introduced in 2012 with cd368b5f8e
.
This commit is contained in:
parent
30884dd93d
commit
770c1c80b7
1 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,10 @@ var helper = {};
|
|||
}
|
||||
|
||||
helper.clearCookies = function(){
|
||||
window.document.cookie = "";
|
||||
// Expire cookies, so author and language are changed after reloading the pad.
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#Example_4_Reset_the_previous_cookie
|
||||
window.document.cookie = 'token=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/';
|
||||
window.document.cookie = 'language=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/';
|
||||
}
|
||||
|
||||
// Functionality for knowing what key event type is required for tests
|
||||
|
|
Loading…
Reference in a new issue