diff options
| author | Igor Minar | 2012-12-05 00:02:29 +0100 | 
|---|---|---|
| committer | Igor Minar | 2013-05-09 05:23:39 -0700 | 
| commit | 5d2bb2c1b9179a66e37ac12241e14b03d42adaba (patch) | |
| tree | 863997d1e3dc39b15878eb1bc24a067464f801d2 /test/testabilityPatch.js | |
| parent | 9039ddbb568bdbd46cfbee2729b6f781ac413041 (diff) | |
| download | angular.js-5d2bb2c1b9179a66e37ac12241e14b03d42adaba.tar.bz2 | |
test(sortedHtml): ignore bogus rowspan=1 and colspan=1 in IE
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 16 | 
1 files changed, 11 insertions, 5 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index dd0f4f97..7d93720f 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -133,13 +133,19 @@ function sortedHtml(element, showNgClass) {              attr.name !='style' &&              attr.name.substr(0, 6) != 'jQuery') {            // in IE we need to check for all of these. -          if (!/ng-\d+/.exec(attr.name) && -              attr.name != 'getElementById' && +          if (/ng-\d+/.exec(attr.name) || +              attr.name == 'getElementById' ||                // IE7 has `selected` in attributes -              attr.name !='selected' && +              attr.name == 'selected' ||                // IE7 adds `value` attribute to all LI tags -              (node.nodeName != 'LI' || attr.name != 'value')) -            attrs.push(' ' + attr.name + '="' + attr.value + '"'); +              (node.nodeName == 'LI' && attr.name == 'value') || +              // IE8 adds bogus rowspan=1 and colspan=1 to TD elements +              (node.nodeName == 'TD' && attr.name == 'rowSpan' && attr.value == '1') || +              (node.nodeName == 'TD' && attr.name == 'colSpan' && attr.value == '1')) { +            continue; +          } + +          attrs.push(' ' + attr.name + '="' + attr.value + '"');          }        }        attrs.sort();  | 
