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
ae630c40
Commit
ae630c40
authored
Aug 07, 2013
by
Oleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct assertion for #14049 ticket. Close gh-1327
parent
34cc4657
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
5 deletions
+28
-5
css.js
test/unit/css.js
+28
-5
No files found.
test/unit/css.js
View file @
ae630c40
...
@@ -113,8 +113,7 @@ test("css(String|Hash)", function() {
...
@@ -113,8 +113,7 @@ test("css(String|Hash)", function() {
equal
(
child
[
0
].
style
.
fontSize
,
old
,
"Make sure font-size isn't changed on null."
);
equal
(
child
[
0
].
style
.
fontSize
,
old
,
"Make sure font-size isn't changed on null."
);
});
});
test
(
"css() explicit and relative values"
,
function
()
{
test
(
"css() explicit and relative values"
,
29
,
function
()
{
expect
(
30
);
var
$elem
=
jQuery
(
"#nothiddendiv"
);
var
$elem
=
jQuery
(
"#nothiddendiv"
);
$elem
.
css
({
"width"
:
1
,
"height"
:
1
,
"paddingLeft"
:
"1px"
,
"opacity"
:
1
});
$elem
.
css
({
"width"
:
1
,
"height"
:
1
,
"paddingLeft"
:
"1px"
,
"opacity"
:
1
});
...
@@ -199,9 +198,6 @@ test("css() explicit and relative values", function() {
...
@@ -199,9 +198,6 @@ test("css() explicit and relative values", function() {
$elem
.
css
(
"opacity"
,
"+=0.5"
);
$elem
.
css
(
"opacity"
,
"+=0.5"
);
equal
(
$elem
.
css
(
"opacity"
),
"1"
,
"'+=0.5' on opacity (params)"
);
equal
(
$elem
.
css
(
"opacity"
),
"1"
,
"'+=0.5' on opacity (params)"
);
$elem
.
css
(
"order"
,
2
);
equal
(
$elem
.
css
(
"order"
),
"2"
,
"2 on order"
);
});
});
test
(
"css(String, Object)"
,
function
()
{
test
(
"css(String, Object)"
,
function
()
{
...
@@ -1053,4 +1049,31 @@ asyncTest( "Make sure initialized display value for disconnected nodes is correc
...
@@ -1053,4 +1049,31 @@ asyncTest( "Make sure initialized display value for disconnected nodes is correc
jQuery
.
_removeData
(
jQuery
(
"#display"
)[
0
]
);
jQuery
.
_removeData
(
jQuery
(
"#display"
)[
0
]
);
});
});
// Support: IE, Firefox < 22, Safari
// We have to jump through the hoops here in order to test work with "order" CSS property,
// that some browsers do not support, this test is not, strictly speaking, correct,
// but it's the best that we can do.
(
function
()
{
var
style
=
document
.
createElement
(
"div"
).
style
,
prefixes
=
[
"Webkit"
,
"O"
,
"Moz"
,
"ms"
],
exist
=
"order"
in
style
,
i
=
0
;
if
(
!
exist
)
{
for
(
;
i
<
prefixes
.
length
;
i
++
)
{
if
(
exist
=
prefixes
[
i
]
+
"Order"
in
style
)
{
break
;
}
}
}
if
(
exist
)
{
test
(
"Don't append px to CSS
\"
order
\"
value (#14049)"
,
1
,
function
()
{
var
$elem
=
jQuery
(
"<div/>"
);
$elem
.
css
(
"order"
,
2
);
equal
(
$elem
.
css
(
"order"
),
"2"
,
"2 on order"
);
});
}
})();
}
}
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