aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorAriel Flesler <aflesler@gmail.com>2008-05-08 16:25:12 +0000
committerAriel Flesler <aflesler@gmail.com>2008-05-08 16:25:12 +0000
commit407c5eb4302d6e7a1989123cb0028f97f309c3e0 (patch)
tree16fdd49a1b8929bd5f8bb5a8784fce189b96303a /test/unit
parenta56317ea3ae99cee1783e27e36f3b9b323695bf8 (diff)
downloadjquery-407c5eb4302d6e7a1989123cb0028f97f309c3e0.tar.gz
jquery-407c5eb4302d6e7a1989123cb0028f97f309c3e0.zip
test runner: extra test case, [5501]
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/event.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index 71ea774b6..c393f6d62 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -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" );
});
-test("click()", function() {
- expect(5);
+test("trigger() shortcuts", function() {
+ expect(6);
$('<li><a href="#">Change location</a></li>').prependTo('#firstUL').find('a').bind('click', function() {
var close = $('spanx', this); // same with $(this).find('span');
equals( close.length, 0, "Context element does not exist, length must be zero" );
@@ -138,6 +138,10 @@ test("click()", function() {
};
$('#simon1').click();
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() {
@@ -341,4 +345,4 @@ test("event properties", function() {
ok( event.timeStamp, "assert event.timeStamp is present" );
start();
}).click();
-}); \ No newline at end of file
+});