intl/uconv/tests/unit/test_bug457886.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 // Tests conversion from Unicode to ISO-2022-JP
michael@0 2
michael@0 3 load('CharsetConversionTests.js');
michael@0 4
michael@0 5 const inString = "\u3042\u3044\u3046\u3048\u304A\u000D\u000A\u304B\u304D\u304F\u3051\u3053";
michael@0 6
michael@0 7 const expectedString = "\x1B$B$\"$$$&$($*\x1B(B\x0D\x0A\x1B$B$+$-$/$1$3\x1B(B";
michael@0 8
michael@0 9 const charset = "ISO-2022-JP";
michael@0 10
michael@0 11 function run_test()
michael@0 12 {
michael@0 13 checkEncode(CreateScriptableConverter(), charset, inString, expectedString);
michael@0 14 }

mercurial