fixes to make it pass on IE

This commit is contained in:
Misko Hevery 2010-01-25 23:49:52 -08:00
parent ba9eef40cf
commit a2540fd581
7 changed files with 9 additions and 7 deletions

Binary file not shown.

View file

@ -319,5 +319,7 @@ defineApi('Object', [angularGlobal, angularCollection, angularObject],
['keys', 'values']);
defineApi('String', [angularGlobal, angularString], []);
defineApi('Date', [angularGlobal, angularDate], []);
//IE bug
angular['Date']['toString'] = angularDate['toString'];
defineApi('Function', [angularGlobal, angularCollection, angularFunction],
['bind', 'bindAll', 'delay', 'defer', 'wrap', 'compose']);

View file

@ -20,7 +20,8 @@ if (typeof Node == 'undefined') {
function noop() {}
if (!window['console']) window['console']={'log':noop, 'error':noop};
var consoleNode, jQuery, msie,
var consoleNode, msie,
jQuery = window['jQuery'] || window['$'], // weirdness to make IE happy
foreach = _.each,
extend = _.extend,
angular = window['angular'] || (window['angular'] = {}),

View file

@ -1,2 +1,2 @@
java -jar lib/jstestdriver/JsTestDriver.jar --tests all | grep -v lib/jasmine
java -jar lib/jstestdriver/JsTestDriver.jar --tests all | grep -v lib/jasmine

View file

@ -204,7 +204,7 @@ ApiTest.prototype.testQuoteString = function(){
};
ApiTest.prototype.testQuoteStringBug = function(){
assertEquals(angular.String.quote('"7\\\\\\\"7"', "7\\\"7"));
assertEquals('"7\\\\\\\"7"', angular.String.quote("7\\\"7"));
};
ApiTest.prototype.testQuoteUnicode = function(){

View file

@ -401,7 +401,7 @@ BinderTest.prototype.testRepeaterUpdateBindings = function(){
};
BinderTest.prototype.testRepeaterContentDoesNotBind = function(){
var a = compile('<ul><LI ng-repeat="item in model.items"><span ng-bind="item.a"/></li></ul>');
var a = compile('<ul><LI ng-repeat="item in model.items"><span ng-bind="item.a"></span></li></ul>');
a.scope.set('model', {items:[{a:"A"}]});
a.binder.updateView();
assertEquals('<ul>' +

View file

@ -1,5 +1,3 @@
TestCase = function(name) { return jstestdriver.testCaseManager.TestCase(name); };
HIDDEN = jQuery.browser.msie ?
'' :
jQuery.browser.safari ?
@ -7,7 +5,7 @@ HIDDEN = jQuery.browser.msie ?
' style="display: none;"';
msie = jQuery.browser.msie;
alert = function(msg) {jstestdriver.console.log("ALERT: " + msg);};
//alert = function(msg) {jstestdriver.console.log("ALERT: " + msg);};
function noop(){}
@ -35,6 +33,7 @@ function report(reportTest){
});
}
MockLocation = function() {
this.url = "http://server";
};