blob: b97aab9f7c1adfd89fb338a09fac5e041e3774c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
function run_test() {
sb = new Cu.Sandbox('http://www.example.com',
{ wantGlobalProperties: ["TextDecoder", "TextEncoder"] });
sb.equal = equal;
Cu.evalInSandbox('equal(new TextDecoder().encoding, "utf-8");' +
'equal(new TextEncoder().encoding, "utf-8");',
sb);
Cu.importGlobalProperties(["TextDecoder", "TextEncoder"]);
Assert.equal(new TextDecoder().encoding, "utf-8");
Assert.equal(new TextEncoder().encoding, "utf-8");
}
|