Backed out changeset 713114c0331a (bug 1938707) by developer request CLOSED TREE
[gecko.git] / js / xpconnect / tests / unit / test_textDecoder.js
blobb97aab9f7c1adfd89fb338a09fac5e041e3774c4
1 function run_test() {
2   sb = new Cu.Sandbox('http://www.example.com',
3                       { wantGlobalProperties: ["TextDecoder", "TextEncoder"] });
4   sb.equal = equal;
5   Cu.evalInSandbox('equal(new TextDecoder().encoding, "utf-8");' +
6                    'equal(new TextEncoder().encoding, "utf-8");',
7                    sb);
8   Cu.importGlobalProperties(["TextDecoder", "TextEncoder"]);
9   Assert.equal(new TextDecoder().encoding, "utf-8");
10   Assert.equal(new TextEncoder().encoding, "utf-8");