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