Commit 407c5eb4 authored by Ariel Flesler's avatar Ariel Flesler

test runner: extra test case, [5501]

parent a56317ea
...@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment