summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_sandbox_atob.js
blob: a4bd75c13d724f146e9512cf6034a1925bb9cefb (plain)
1
2
3
4
5
6
7
8
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);
}