X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcss.js;h=fbbf937ca6e2b54ec5927c073f001b49876f0668;hb=0f28835ee91a8aec5f9de60be42b55b802c67928;hp=cddd90256ec74d4bc051955d8bb1f41e48395dd1;hpb=3394d32ea75cffb8c8c386d607823cae878b9145;p=jquery.git
diff --git a/test/unit/css.js b/test/unit/css.js
index cddd902..fbbf937 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -178,24 +178,24 @@ if ( !jQuery.support.opacity ) {
test("css(String, Function)", function() {
expect(3);
-
+
var sizes = ["10px", "20px", "30px"];
-
- jQuery("
" +
- "
" +
+
+ jQuery("
")
.appendTo("body");
-
+
var index = 0;
-
+
jQuery("#cssFunctionTest div").css("font-size", function() {
var size = sizes[index];
index++;
return size;
});
-
+
index = 0;
-
+
jQuery("#cssFunctionTest div").each(function() {
var computedSize = jQuery(this).css("font-size")
var expectedSize = sizes[index]
@@ -208,24 +208,24 @@ test("css(String, Function)", function() {
test("css(String, Function) with incoming value", function() {
expect(3);
-
+
var sizes = ["10px", "20px", "30px"];
-
- jQuery("
" +
- "
" +
+
+ jQuery("
")
.appendTo("body");
-
+
var index = 0;
-
+
jQuery("#cssFunctionTest div").css("font-size", function() {
var size = sizes[index];
index++;
return size;
});
-
+
index = 0;
-
+
jQuery("#cssFunctionTest div").css("font-size", function(i, computedSize) {
var expectedSize = sizes[index]
equals( computedSize, expectedSize, "Div #" + index + " should be " + expectedSize );
@@ -238,61 +238,61 @@ test("css(String, Function) with incoming value", function() {
test("css(Object) where values are Functions", function() {
expect(3);
-
+
var sizes = ["10px", "20px", "30px"];
-
- jQuery("
" +
- "
" +
+
+ jQuery("
")
.appendTo("body");
var index = 0;
-
+
jQuery("#cssFunctionTest div").css({fontSize: function() {
var size = sizes[index];
index++;
return size;
}});
-
+
index = 0;
-
+
jQuery("#cssFunctionTest div").each(function() {
var computedSize = jQuery(this).css("font-size")
var expectedSize = sizes[index]
equals( computedSize, expectedSize, "Div #" + index + " should be " + expectedSize );
index++;
});
-
+
jQuery("#cssFunctionTest").remove();
});
test("css(Object) where values are Functions with incoming values", function() {
expect(3);
-
+
var sizes = ["10px", "20px", "30px"];
-
- jQuery("
" +
- "
" +
+
+ jQuery("
")
.appendTo("body");
var index = 0;
-
+
jQuery("#cssFunctionTest div").css({fontSize: function() {
var size = sizes[index];
index++;
return size;
}});
-
+
index = 0;
-
+
jQuery("#cssFunctionTest div").css({"font-size": function(i, computedSize) {
var expectedSize = sizes[index]
equals( computedSize, expectedSize, "Div #" + index + " should be " + expectedSize );
index++;
return computedSize;
}});
-
+
jQuery("#cssFunctionTest").remove();
});