aboutsummaryrefslogtreecommitdiffstats
path: root/test/testabilityPatch.js
diff options
context:
space:
mode:
authorMisko Hevery2010-03-29 20:25:42 -0700
committerMisko Hevery2010-03-29 20:25:42 -0700
commite55c97debaa0ef8487ece219b6eadbc147ece1f9 (patch)
tree5895b2151d639efa5fcdb09d396990d6e089c886 /test/testabilityPatch.js
parentc655b884e268c8c9b6853d440143953f51b7e7de (diff)
downloadangular.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.js33
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 = "";