diff options
Diffstat (limited to 'js/xpconnect/tests/unit/test_sandbox_atob.js')
-rw-r--r-- | js/xpconnect/tests/unit/test_sandbox_atob.js | 9 |
1 files changed, 9 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 0000000000..a4bd75c13d --- /dev/null +++ b/js/xpconnect/tests/unit/test_sandbox_atob.js @@ -0,0 +1,9 @@ +function run_test() { + sb = new Cu.Sandbox('http://www.example.com', + { wantGlobalProperties: ["atob", "btoa"] }); + sb.equal = equal; + Cu.evalInSandbox('var dummy = "Dummy test.";' + + 'equal(dummy, atob(btoa(dummy)));' + + 'equal(btoa("budapest"), "YnVkYXBlc3Q=");', + sb); +} |