tests: Fix encoding of prefs cookie

pull/4987/head
Richard Hansen 2021-03-31 04:37:38 -04:00 committed by webzwo0i
parent 63e6e163b7
commit 5666c34061
1 changed files with 2 additions and 1 deletions

View File

@ -69,8 +69,9 @@ const helper = {};
// I don't fully understand it, but this function seems to properly simulate // I don't fully understand it, but this function seems to properly simulate
// padCookie.setPref in the client code // padCookie.setPref in the client code
helper.setPadPrefCookie = (prefs) => { helper.setPadPrefCookie = (prefs) => {
const val = encodeURIComponent(JSON.stringify(prefs));
helper.padChrome$.document.cookie = helper.padChrome$.document.cookie =
(`prefsHttp=${escape(JSON.stringify(prefs))};expires=Thu, 01 Jan 3000 00:00:00 GMT`); `prefsHttp=${val};expires=Thu, 01 Jan 3000 00:00:00 GMT`;
}; };
// Functionality for knowing what key event type is required for tests // Functionality for knowing what key event type is required for tests