aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2007-01-23 11:10:02 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2007-01-23 11:10:02 +0000
commit926e80b90226d176710e092bbfdcfd7b9f06389b (patch)
tree87aec333168fe71f7524b44e35825fcd18b492ea
parenta30b3211e68eeea04107059cc82b3c3026138337 (diff)
downloadjquery-926e80b90226d176710e092bbfdcfd7b9f06389b.tar.gz
jquery-926e80b90226d176710e092bbfdcfd7b9f06389b.zip
Modified toggle() test to stop IE from browsing to another site, problem not solved
-rw-r--r--src/event/eventTest.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/event/eventTest.js b/src/event/eventTest.js
index 13b47dedf..d62173549 100644
--- a/src/event/eventTest.js
+++ b/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)" );
});