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
407c5eb4
Commit
407c5eb4
authored
May 08, 2008
by
Ariel Flesler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test runner: extra test case, [5501]
parent
a56317ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
event.js
test/unit/event.js
+7
-3
No files found.
test/unit/event.js
View file @
407c5eb4
...
@@ -112,8 +112,8 @@ test("bind(), namespaced events, cloned events", function() {
...
@@ -112,8 +112,8 @@ test("bind(), namespaced events, cloned events", function() {
ok
(
$
(
"a.test:first"
).
triggerHandler
(
"click"
)
===
false
,
"Handler is bound to appendTo'd elements"
);
ok
(
$
(
"a.test:first"
).
triggerHandler
(
"click"
)
===
false
,
"Handler is bound to appendTo'd elements"
);
});
});
test
(
"
click()
"
,
function
()
{
test
(
"
trigger() shortcuts
"
,
function
()
{
expect
(
5
);
expect
(
6
);
$
(
'<li><a href="#">Change location</a></li>'
).
prependTo
(
'#firstUL'
).
find
(
'a'
).
bind
(
'click'
,
function
()
{
$
(
'<li><a href="#">Change location</a></li>'
).
prependTo
(
'#firstUL'
).
find
(
'a'
).
bind
(
'click'
,
function
()
{
var
close
=
$
(
'spanx'
,
this
);
// same with $(this).find('span');
var
close
=
$
(
'spanx'
,
this
);
// same with $(this).find('span');
equals
(
close
.
length
,
0
,
"Context element does not exist, length must be zero"
);
equals
(
close
.
length
,
0
,
"Context element does not exist, length must be zero"
);
...
@@ -138,6 +138,10 @@ test("click()", function() {
...
@@ -138,6 +138,10 @@ test("click()", function() {
};
};
$
(
'#simon1'
).
click
();
$
(
'#simon1'
).
click
();
equals
(
clickCounter
,
1
,
"Check that click, triggers onclick event handler on an a tag also"
);
equals
(
clickCounter
,
1
,
"Check that click, triggers onclick event handler on an a tag also"
);
$
(
'<img />'
).
load
(
function
(){
ok
(
true
,
"Trigger the load event, using the shortcut .load() (#2819)"
);
}).
load
();
});
});
test
(
"unbind(event)"
,
function
()
{
test
(
"unbind(event)"
,
function
()
{
...
@@ -341,4 +345,4 @@ test("event properties", function() {
...
@@ -341,4 +345,4 @@ test("event properties", function() {
ok
(
event
.
timeStamp
,
"assert event.timeStamp is present"
);
ok
(
event
.
timeStamp
,
"assert event.timeStamp is present"
);
start
();
start
();
}).
click
();
}).
click
();
});
});
\ No newline at end of file
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