Skip to content
Permalink
Browse files
Modified toggle() test to stop IE from browsing to another site, prob…
…lem not solved
  • Loading branch information
jzaefferer committed Jan 23, 2007
1 parent a30b321 commit 926e80b90226d176710e092bbfdcfd7b9f06389b
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/event/eventTest.js
@@ -3,10 +3,14 @@ module("event");
test("toggle(Function, Function) - add toggle event and fake a few clicks", function() {
expect(1);
var count = 0,
fn1 = function() { count++; },
fn2 = function() { count--; },
fn1 = function(e) { count++; },
fn2 = function(e) { count--; console.debug("fn"); },
preventDefault = function(e) { e.preventDefault() },
link = $('#mark');
link.click().toggle(fn1, fn2).click().click().click().click().click();
if($.browser.msie)
ok( false, "click() on link gets executed in IE, not intended behaviour!" );
else
link.click(preventDefault).click().toggle(fn1, fn2).click().click().click().click().click();
ok( count == 1, "Check for toggle(fn, fn)" );
});

0 comments on commit 926e80b

Please sign in to comment.