From a2540fd581f35e8f79240d827d2252da5798c3a2 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 25 Jan 2010 23:49:52 -0800 Subject: fixes to make it pass on IE --- lib/jstestdriver/JsTestDriver.jar | Bin 3065205 -> 3081196 bytes src/API.js | 2 ++ src/Angular.js | 3 ++- test.sh | 2 +- test/ApiTest.js | 2 +- test/BinderTest.js | 2 +- test/testabilityPatch.js | 5 ++--- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/jstestdriver/JsTestDriver.jar b/lib/jstestdriver/JsTestDriver.jar index 256bfad9..fea70000 100644 Binary files a/lib/jstestdriver/JsTestDriver.jar and b/lib/jstestdriver/JsTestDriver.jar differ diff --git a/src/API.js b/src/API.js index d795f4c3..ce690ad1 100644 --- a/src/API.js +++ b/src/API.js @@ -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']); diff --git a/src/Angular.js b/src/Angular.js index bfbe8ee9..f06562da 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -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'] = {}), diff --git a/test.sh b/test.sh index c0d1e7ac..6b1cac89 100755 --- a/test.sh +++ b/test.sh @@ -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 diff --git a/test/ApiTest.js b/test/ApiTest.js index 250a27b1..fc9190ed 100644 --- a/test/ApiTest.js +++ b/test/ApiTest.js @@ -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(){ diff --git a/test/BinderTest.js b/test/BinderTest.js index 6ef46fae..cf2fa31a 100644 --- a/test/BinderTest.js +++ b/test/BinderTest.js @@ -401,7 +401,7 @@ BinderTest.prototype.testRepeaterUpdateBindings = function(){ }; BinderTest.prototype.testRepeaterContentDoesNotBind = function(){ - var a = compile('