1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/xpconnect/tests/unit/test_sandbox_atob.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,10 @@ 1.4 +function run_test() { 1.5 + var Cu = Components.utils; 1.6 + sb = new Cu.Sandbox('http://www.example.com', 1.7 + { wantGlobalProperties: ["atob", "btoa"] }); 1.8 + sb.do_check_eq = do_check_eq; 1.9 + Cu.evalInSandbox('var dummy = "Dummy test.";' + 1.10 + 'do_check_eq(dummy, atob(btoa(dummy)));' + 1.11 + 'do_check_eq(btoa("budapest"), "YnVkYXBlc3Q=");', 1.12 + sb); 1.13 +}