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
5b0c3060
Commit
5b0c3060
authored
Jul 14, 2011
by
Corey Frang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test for #6652
parent
d1c4f0e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
testsuite.css
test/data/testsuite.css
+2
-0
index.html
test/index.html
+3
-0
css.js
test/unit/css.js
+17
-0
No files found.
test/data/testsuite.css
View file @
5b0c3060
...
...
@@ -121,3 +121,5 @@ dfn { display: none; }
/* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */
body
,
div
{
background
:
url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif)
no-repeat
-1000px
0
;
}
/* #6652 REMOVE FILTER:ALPHA(OPACITY=100) AFTER ANIMATION */
#t6652
div
{
filter
:
alpha
(
opacity
=
50
);
}
test/index.html
View file @
5b0c3060
...
...
@@ -226,6 +226,9 @@ Z</textarea>
<div
id=
"t2037"
>
<div><div
class=
"hidden"
>
hidden
</div></div>
</div>
<div
id=
"t6652"
>
<div></div>
</div>
</div>
<div
id=
"tabindex-tests"
>
...
...
test/unit/css.js
View file @
5b0c3060
...
...
@@ -259,6 +259,23 @@ if ( !jQuery.support.opacity ) {
jQuery
(
"#foo"
).
css
(
"filter"
,
filterVal3
).
css
(
"opacity"
,
1
);
ok
(
jQuery
(
"#foo"
).
css
(
"filter"
).
indexOf
(
filterVal3
)
!==
-
1
,
"Setting opacity in IE doesn't clobber other filters"
);
});
test
(
"Setting opacity to 1 properly removes filter: style (#6652)"
,
function
()
{
var
rfilter
=
/filter:
[^
;
]
*/i
,
test
=
jQuery
(
"#t6652"
).
css
(
"opacity"
,
1
),
test2
=
test
.
find
(
"div"
).
css
(
"opacity"
,
1
);
function
hasFilter
(
elem
)
{
var
match
=
rfilter
.
exec
(
elem
[
0
].
style
.
cssText
);
if
(
match
)
{
return
true
;
}
return
false
;
}
expect
(
2
);
ok
(
!
hasFilter
(
test
),
"Removed filter attribute on element without filter in stylesheet"
);
ok
(
hasFilter
(
test2
),
"Filter attribute remains on element that had filter in stylesheet"
);
});
}
test
(
"css(String, Function)"
,
function
()
{
...
...
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