intl/uconv/tests/unit/test_bug457886.js

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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