aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/core.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-06-10 21:54:16 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-06-10 21:54:16 -0400
commit5f35b3d9f90d07ee084d59702a54051ee51fb0d3 (patch)
tree7c412b9602b6a3a48435f5adb1d3c84b97bd20dc /test/unit/core.js
parent1bb1432fe995881821f433c5b7bf86c61f3b3f50 (diff)
downloadjquery-5f35b3d9f90d07ee084d59702a54051ee51fb0d3.tar.gz
jquery-5f35b3d9f90d07ee084d59702a54051ee51fb0d3.zip
Fix #11857. Modularize css.js, add dependency management. Closes gh-816.
See the pull request for more info on the dependency management details.
Diffstat (limited to 'test/unit/core.js')
-rw-r--r--test/unit/core.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index 2daf5d24d..88c470104 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -27,9 +27,8 @@ test("jQuery()", function() {
div = jQuery("<div/><hr/><code/><b/>"),
exec = false,
long = "",
- expected = 28,
+ expected = 26,
attrObj = {
- css: { paddingLeft: 1, paddingRight: 1 },
click: function() { ok( exec, "Click executed." ); },
text: "test",
"class": "test2",
@@ -46,6 +45,11 @@ test("jQuery()", function() {
attrObj.offset = { top: 1, left: 1 };
}
+ if ( jQuery.css ) {
+ expected += 2;
+ attrObj.css = { paddingLeft: 1, paddingRight: 1 };
+ }
+
expect( expected );
// Basic constructor's behavior
@@ -103,8 +107,11 @@ test("jQuery()", function() {
equal( elem[0].style.top, "1px", "jQuery() quick setter offset");
}
- equal( elem[0].style.paddingLeft, "1px", "jQuery quick setter css");
- equal( elem[0].style.paddingRight, "1px", "jQuery quick setter css");
+ if ( jQuery.css ) {
+ equal( elem[0].style.paddingLeft, "1px", "jQuery quick setter css");
+ equal( elem[0].style.paddingRight, "1px", "jQuery quick setter css");
+ }
+
equal( elem[0].childNodes.length, 1, "jQuery quick setter text");
equal( elem[0].firstChild.nodeValue, "test", "jQuery quick setter text");
equal( elem[0].className, "test2", "jQuery() quick setter class");