diff options
| author | Misko Hevery | 2010-07-23 13:54:12 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-07-23 13:54:12 -0700 |
| commit | b2b170099f957e6575e309c35fed42915e95dd47 (patch) | |
| tree | 20dbd10697fd207bc56b98ca6307bef46a4f5a86 /test | |
| parent | 3b41979891f5dc6a68e05cd5ed9c355c34774193 (diff) | |
| download | angular.js-b2b170099f957e6575e309c35fed42915e95dd47.tar.bz2 | |
fix issues with ie 7
Diffstat (limited to 'test')
| -rw-r--r-- | test/BinderTest.js | 4 | ||||
| -rw-r--r-- | test/testabilityPatch.js | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/BinderTest.js b/test/BinderTest.js index b90d1789..f38383ae 100644 --- a/test/BinderTest.js +++ b/test/BinderTest.js @@ -407,6 +407,10 @@ BinderTest.prototype.testBindClass = function() { BinderTest.prototype.testBindClassEvenOdd = function() { var x = this.compile('<div><div ng:repeat="i in [0,1]" ng:class-even="\'e\'" ng:class-odd="\'o\'"/></div>'); x.scope.$eval(); + var d1 = jqLite(x.node[0].childNodes[1]); + var d2 = jqLite(x.node[0].childNodes[2]); + expect(d1.hasClass('o')).toBeTruthy(); + expect(d2.hasClass('e')).toBeTruthy(); assertEquals( '<div><#comment></#comment>' + '<div class="o" ng:class-even="\'e\'" ng:class-odd="\'o\'" ng:repeat-index="0"></div>' + diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index b71943f6..5d0df780 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -63,6 +63,8 @@ function sortedHtml(element) { html += '<' + node.nodeName.toLowerCase(); var attributes = node.attributes || []; var attrs = []; + if (node.className) + attrs.push(' class="' + node.className + '"'); for(var i=0; i<attributes.length; i++) { var attr = attributes[i]; if(attr.name.match(/^ng:/) || @@ -76,6 +78,7 @@ function sortedHtml(element) { attr.name !='complete' && attr.name !='maxLength' && attr.name !='size' && + attr.name !='class' && attr.name !='start' && attr.name !='tabIndex' && attr.name !='style' && |
