summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_sandbox_atob.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/tests/unit/test_sandbox_atob.js')
-rw-r--r--js/xpconnect/tests/unit/test_sandbox_atob.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/test_sandbox_atob.js b/js/xpconnect/tests/unit/test_sandbox_atob.js
new file mode 100644
index 000000000..0c7586fe2
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_sandbox_atob.js
@@ -0,0 +1,10 @@
+function run_test() {
+ var Cu = Components.utils;
+ sb = new Cu.Sandbox('http://www.example.com',
+ { wantGlobalProperties: ["atob", "btoa"] });
+ sb.do_check_eq = do_check_eq;
+ Cu.evalInSandbox('var dummy = "Dummy test.";' +
+ 'do_check_eq(dummy, atob(btoa(dummy)));' +
+ 'do_check_eq(btoa("budapest"), "YnVkYXBlc3Q=");',
+ sb);
+}