michael@0: function run_test() { michael@0: var Cu = Components.utils; michael@0: sb = new Cu.Sandbox('http://www.example.com', michael@0: { wantGlobalProperties: ["atob", "btoa"] }); michael@0: sb.do_check_eq = do_check_eq; michael@0: Cu.evalInSandbox('var dummy = "Dummy test.";' + michael@0: 'do_check_eq(dummy, atob(btoa(dummy)));' + michael@0: 'do_check_eq(btoa("budapest"), "YnVkYXBlc3Q=");', michael@0: sb); michael@0: }