mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-30 13:00:29 +00:00
Fix unit test in IE7
This commit is contained in:
parent
2e5199997c
commit
aa64d37a23
3 changed files with 5 additions and 4 deletions
4
src/angular-mocks.js
vendored
4
src/angular-mocks.js
vendored
|
|
@ -203,7 +203,9 @@ MockBrowser.prototype = {
|
|||
}
|
||||
return this.cookieHash;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
addJs: function(){}
|
||||
};
|
||||
|
||||
angular.service('$browser', function(){
|
||||
|
|
|
|||
|
|
@ -454,9 +454,8 @@ describe('angular', function(){
|
|||
return this.childNodes[1];
|
||||
};
|
||||
|
||||
angularInit({autobind: 'child'}, dom);
|
||||
|
||||
delete dom.getElementById; //make IE and sortedHtml happy
|
||||
angularInit({autobind: 'child'}, dom);
|
||||
|
||||
expect(sortedHtml(dom)).toEqual('<div foo="{{1+2}}">{{2+3}}' +
|
||||
'<div bar="7" id="child" ng:bind-attr="{"bar":"{{3+4}}"}">'+
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ 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))
|
||||
if (!/ng-\d+/.exec(attr.name) && attr.name != 'getElementById')
|
||||
attrs.push(' ' + attr.name + '="' + attr.value + '"');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue