From aea0ef3659803527950268a5172862d2876c6ad5 Mon Sep 17 00:00:00 2001 From: Andy Patterson Date: Mon, 7 Dec 2015 15:12:36 +0000 Subject: [PATCH] test(booleanAttrsSpec): add unit test for IE11 URL parsing failure IE11/10/Edge fail when setting a href to a URL containing a % that isn't a valid escape sequence Reference: https://github.com/angular/angular.js/issues/13388 --- test/ng/directive/booleanAttrsSpec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/ng/directive/booleanAttrsSpec.js b/test/ng/directive/booleanAttrsSpec.js index 77d5c0f58c54..2a4c9f0de15c 100644 --- a/test/ng/directive/booleanAttrsSpec.js +++ b/test/ng/directive/booleanAttrsSpec.js @@ -283,6 +283,16 @@ describe('ngHref', function() { expect(element.attr('href')).toEqual(undefined); })); + if (msie) { + it('should throw error if ng-href contains a non-escaped percent symbol', inject(function($rootScope, $compile) { + element = $compile('')($rootScope); + + expect(function() { + $rootScope.$digest(); + }).toThrow(); + })); + } + if (isDefined(window.SVGElement)) { describe('SVGAElement', function() { it('should interpolate the expression and bind to xlink:href', inject(function($compile, $rootScope) {