aboutsummaryrefslogtreecommitdiffstats
path: root/test/jqLiteSpec.js
diff options
context:
space:
mode:
authorIgor Minar2011-09-01 02:37:32 -0700
committerIgor Minar2011-09-01 16:37:06 -0700
commit986608fe763482c79dfd0338e5041e5e673fec9f (patch)
tree659e9aaf97ab9cfc68966a4655763b166f219858 /test/jqLiteSpec.js
parent31b86241215bb37cc6bb81f98a47942738d710c2 (diff)
downloadangular.js-986608fe763482c79dfd0338e5041e5e673fec9f.tar.bz2
fix(jqLite): special-case attr('class') because of IE9 bug
Diffstat (limited to 'test/jqLiteSpec.js')
-rw-r--r--test/jqLiteSpec.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js
index c06fcae4..b75289bb 100644
--- a/test/jqLiteSpec.js
+++ b/test/jqLiteSpec.js
@@ -168,6 +168,15 @@ describe('jqLite', function(){
var elm = jqLite('<div class="any">a</div>');
expect(elm.attr('non-existing')).toBeUndefined();
});
+
+ it('should special-case "class" attribute', function() {
+ // stupid IE9 returns null for element.getAttribute('class') when element has ng:class attr
+ var elm = jqLite('<div class=" any " ng:class="dynCls">a</div>');
+ expect(elm.attr('class')).toBe(' any ');
+
+ elm.attr('class', 'foo bar');
+ expect(elm.attr('class')).toBe('foo bar');
+ });
});