diff options
| author | Misko Hevery | 2010-03-29 20:25:42 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-03-29 20:25:42 -0700 |
| commit | e55c97debaa0ef8487ece219b6eadbc147ece1f9 (patch) | |
| tree | 5895b2151d639efa5fcdb09d396990d6e089c886 /test/testabilityPatch.js | |
| parent | c655b884e268c8c9b6853d440143953f51b7e7de (diff) | |
| download | angular.js-e55c97debaa0ef8487ece219b6eadbc147ece1f9.tar.bz2 | |
dissabled a lot of tests, and made the core test set pass.
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index e7ebb386..7c16828d 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -1,16 +1,5 @@ -HIDDEN = jQuery.browser.msie ? - '' : - jQuery.browser.safari ? - ' style="display: none; "' : - ' style="display: none;"'; - -msie = jQuery.browser.msie; -//alert = function(msg) {jstestdriver.console.log("ALERT: " + msg);}; - -function noop(){} - jstd = jstestdriver; -dump = _(jstd.console.log).bind(jstd.console); +dump = bind(jstd.console, jstd.console.log); function nakedExpect(obj) { return expect(angular.fromJson(angular.toJson(obj))); @@ -48,10 +37,9 @@ MockLocation.prototype.set = function(url){ this.url = url; }; -jQuery.fn.sortedHtml = function() { +function sortedHtml(element) { var html = ""; - var toString = function(index, node) { - node = node || this; + (function toString(node) { if (node.nodeName == "#text") { html += escapeHtml(node.nodeValue); } else { @@ -82,25 +70,14 @@ jQuery.fn.sortedHtml = function() { html += '>'; var children = node.childNodes; for(var j=0; j<children.length; j++) { - toString(j, children[j]); + toString(children[j]); } html += '</' + node.nodeName.toLowerCase() + '>'; } - }; - this.children().each(toString); + })(element[0]); return html; }; -function encode64(obj){ - return Base64.encode(toJson(obj)); -} - -function decode64(base64){ - return fromJson(Base64.decode(base64)); -} - -configureJQueryPlugins(); - function isVisible(node) { var display = $(node).css('display'); if (display == 'block') display = ""; |
