Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
6fbb4b43
Commit
6fbb4b43
authored
Apr 27, 2012
by
Mike Sherov
Committed by
Rick Waldron waldron.rick@gmail.com
Apr 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dimensions unit tests from changes in #11604
parent
6e066a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
dimensions.js
test/unit/dimensions.js
+8
-8
No files found.
test/unit/dimensions.js
View file @
6fbb4b43
...
...
@@ -17,12 +17,12 @@ function testWidth( val ) {
$div
.
hide
();
equal
(
$div
.
width
(),
30
,
"Test hidden div"
);
$div
.
show
();
$div
.
width
(
val
(
-
1
)
);
// handle negative numbers by
ignoring #1599
equal
(
$div
.
width
(),
30
,
"Test negative width ignored
"
);
$div
.
width
(
val
(
-
1
)
);
// handle negative numbers by
setting to 0 #11604
equal
(
$div
.
width
(),
0
,
"Test negative width normalized to 0
"
);
$div
.
css
(
"padding"
,
"20px"
);
equal
(
$div
.
width
(),
3
0
,
"Test padding specified with pixels"
);
equal
(
$div
.
width
(),
0
,
"Test padding specified with pixels"
);
$div
.
css
(
"border"
,
"2px solid #fff"
);
equal
(
$div
.
width
(),
3
0
,
"Test border specified with pixels"
);
equal
(
$div
.
width
(),
0
,
"Test border specified with pixels"
);
$div
.
css
({
display
:
""
,
border
:
""
,
padding
:
""
});
...
...
@@ -71,12 +71,12 @@ function testHeight( val ) {
$div
.
hide
();
equal
(
$div
.
height
(),
30
,
"Test hidden div"
);
$div
.
show
();
$div
.
height
(
val
(
-
1
)
);
// handle negative numbers by
ignoring #1599
equal
(
$div
.
height
(),
30
,
"Test negative height ignored
"
);
$div
.
height
(
val
(
-
1
)
);
// handle negative numbers by
setting to 0 #11604
equal
(
$div
.
height
(),
0
,
"Test negative height normalized to 0
"
);
$div
.
css
(
"padding"
,
"20px"
);
equal
(
$div
.
height
(),
3
0
,
"Test padding specified with pixels"
);
equal
(
$div
.
height
(),
0
,
"Test padding specified with pixels"
);
$div
.
css
(
"border"
,
"2px solid #fff"
);
equal
(
$div
.
height
(),
3
0
,
"Test border specified with pixels"
);
equal
(
$div
.
height
(),
0
,
"Test border specified with pixels"
);
$div
.
css
({
display
:
""
,
border
:
""
,
padding
:
""
,
height
:
"1px"
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment