bug673569.js (362B)
1 function qualified_tests(prefix) { 2 let scope = evalReturningScope(prefix + "var x = 1"); 3 assertEq(scope.x, 1); 4 } 5 6 qualified_tests(""); 7 qualified_tests("'use strict'; "); 8 9 let scope = evalReturningScope("x = 1"); 10 assertEq(scope.x, 1); 11 12 let fail = true; 13 try { 14 evalReturningScope("'use strict'; x = 1"); 15 } catch (e) { 16 fail = false; 17 } 18 assertEq(fail, false);