test($parse): fix test for IE

This commit is contained in:
Lucas Mirelmann
2015-09-20 19:59:16 +02:00
parent afb65c11e5
commit c4817cdca4
+2 -2
View File
@@ -1120,9 +1120,9 @@ describe('parser', function() {
});
it('should prevent the exploit', function() {
expect(function() {
try {
scope.$eval('(1)[{0: "__proto__", 1: "__proto__", 2: "__proto__", 3: "safe", length: 4, toString: [].pop}].foo = 1');
}).toThrow();
} catch(e) { /* ignore */ };
if (!msie || msie > 10) {
expect((1)['__proto__'].foo).toBeUndefined();
}