summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_textDecoder.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/tests/unit/test_textDecoder.js')
-rw-r--r--js/xpconnect/tests/unit/test_textDecoder.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/test_textDecoder.js b/js/xpconnect/tests/unit/test_textDecoder.js
new file mode 100644
index 0000000000..b97aab9f7c
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_textDecoder.js
@@ -0,0 +1,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");
+}