aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/css.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/css.js')
-rw-r--r--test/unit/css.js64
1 files changed, 32 insertions, 32 deletions
diff --git a/test/unit/css.js b/test/unit/css.js
index cddd90256..fbbf937ca 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("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
- "<div class='cssFunction'></div>" +
+
+ jQuery("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
+ "<div class='cssFunction'></div>" +
"<div class='cssFunction'></div></div>")
.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("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
- "<div class='cssFunction'></div>" +
+
+ jQuery("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
+ "<div class='cssFunction'></div>" +
"<div class='cssFunction'></div></div>")
.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("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
- "<div class='cssFunction'></div>" +
+
+ jQuery("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
+ "<div class='cssFunction'></div>" +
"<div class='cssFunction'></div></div>")
.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("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
- "<div class='cssFunction'></div>" +
+
+ jQuery("<div id='cssFunctionTest'><div class='cssFunction'></div>" +
+ "<div class='cssFunction'></div>" +
"<div class='cssFunction'></div></div>")
.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();
});