aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/compileSpec.js
diff options
context:
space:
mode:
authorChirayu Krishnappa2013-08-26 17:26:08 -0700
committerChirayu Krishnappa2013-08-29 16:07:49 -0700
commit427ee93f11d0ef64b8844f9b43b2a0f21f2be2cb (patch)
treecad19245850549d9ce765164a8f114a443e16cba /test/ng/compileSpec.js
parent366c0e084b16c51dc1d1e5a47ac71d2770fdcc40 (diff)
downloadangular.js-427ee93f11d0ef64b8844f9b43b2a0f21f2be2cb.tar.bz2
fix(core): parse IE11 UA string correctly
It's great that IE11 wants to be compatible enough that it doesn't want to be special cased and treated differently. However, as long as one has to have a different code path for IE than for the other supported browsers, we still need to detect and special case it. For instance, our URL parsing code still needs the same workaround the we used for IE10. We still see the same Access denied / TypeError exceptions when setting certain values. FYI, Angular doesn't generally blindly test for IE – we also check the version number. Thanks to modern.ie for the free IE11 test VM. Closes #3682
Diffstat (limited to 'test/ng/compileSpec.js')
-rwxr-xr-xtest/ng/compileSpec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js
index 13604f6f..d2643878 100755
--- a/test/ng/compileSpec.js
+++ b/test/ng/compileSpec.js
@@ -2897,7 +2897,7 @@ describe('$compile', function() {
}));
- // Fails on IE < 10 with "TypeError: Access is denied" when trying to set img[src]
+ // Fails on IE <= 10 with "TypeError: Access is denied" when trying to set img[src]
if (!msie || msie > 10) {
it('should sanitize mailto: urls', inject(function($compile, $rootScope) {
element = $compile('<img src="{{testUrl}}"></a>')($rootScope);
@@ -3008,9 +3008,9 @@ describe('$compile', function() {
inject(function($compile, $rootScope) {
element = $compile('<img src="{{testUrl}}"></img>')($rootScope);
- // Fails on IE < 10 with "TypeError: Object doesn't support this property or method" when
+ // Fails on IE <= 11 with "TypeError: Object doesn't support this property or method" when
// trying to set img[src]
- if (!msie || msie > 10) {
+ if (!msie || msie > 11) {
$rootScope.testUrl = "javascript:doEvilStuff()";
$rootScope.$apply();
expect(element.attr('src')).toBe('javascript:doEvilStuff()');